/*!
 * Ramune · 波子汽水 — Typecho Theme
 * 淡蓝色玻璃拟态主题
 * License: MIT
 */

/* ==========================================================================
   1. 设计变量
   ========================================================================== */

:root {
  color-scheme: light;

  /* 主题色：由 functions.php 按设置重新生成，这里是「淡蓝」默认值 */
  --rm-primary: #5aaaf0;
  --rm-primary-strong: #1b67ae;
  --rm-primary-soft: #d6eafc;
  --rm-primary-faint: #eef6fe;
  --rm-primary-ink: #08345f;
  --rm-primary-light: #9cd2fb;

  /* 点缀色：只在细节里出现 */
  --rm-pink: #ffa3bc;
  --rm-mint: #84dcc6;
  --rm-lilac: #bdb4f6;
  --rm-lemon: #ffe08a;

  --rm-text: #213043;
  --rm-text-2: #465669;
  --rm-text-3: #5d6e82;
  --rm-line: rgba(33, 92, 156, .12);
  --rm-line-strong: rgba(33, 92, 156, .2);

  --rm-bg: #ecf5fe;
  --rm-bg-grad: linear-gradient(165deg, #f5fbff 0%, #e7f2fd 48%, #eef0fd 100%);
  --rm-blob-1: rgba(112, 186, 250, .42);
  --rm-blob-2: rgba(255, 170, 196, .26);
  --rm-blob-3: rgba(132, 220, 198, .26);
  --rm-blob-4: rgba(189, 180, 246, .3);

  /* 玻璃 */
  --rm-glass: rgba(255, 255, 255, .56);
  --rm-glass-strong: rgba(255, 255, 255, .8);
  --rm-glass-pop: rgba(255, 255, 255, .9);
  --rm-glass-border: rgba(255, 255, 255, .78);
  --rm-glass-highlight: inset 0 1px 0 rgba(255, 255, 255, .75);
  --rm-blur: 18px;
  --rm-saturate: 170%;
  --rm-shadow: 0 1px 2px rgba(28, 78, 138, .05), 0 10px 30px -12px rgba(28, 88, 158, .2);
  --rm-shadow-hover: 0 2px 4px rgba(28, 78, 138, .06), 0 18px 42px -16px rgba(28, 88, 158, .32);

  --rm-surface: rgba(255, 255, 255, .55);
  --rm-surface-hover: rgba(255, 255, 255, .8);
  --rm-code-bg: rgba(240, 247, 254, .9);
  --rm-code-text: #24456a;
  --rm-mark: #fff1a8;
  --rm-danger: #c4364f;
  --rm-success: #12806d;

  --rm-radius-lg: 24px;
  --rm-radius: 18px;
  --rm-radius-sm: 12px;
  --rm-radius-xs: 8px;

  --rm-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", "Helvetica Neue", Arial, sans-serif;
  --rm-font-round: "Nunito", "Varela Round", "Quicksand", var(--rm-font);
  --rm-font-mono: "JetBrains Mono", "Cascadia Code", "Fira Code", "SFMono-Regular", Consolas,
    "Liberation Mono", Menlo, monospace;

  --rm-header-h: 62px;
  --rm-container: 1180px;
  --rm-sidebar: 300px;
  --rm-rail: 196px;
  --rm-measure: 780px;
  --rm-gap: 24px;
  --rm-ease: cubic-bezier(.22, .8, .32, 1);
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --rm-primary: #6db8f5;
  --rm-primary-strong: #93cdf8;
  --rm-primary-soft: rgba(109, 184, 245, .18);
  --rm-primary-faint: rgba(109, 184, 245, .09);
  --rm-primary-ink: #052340;
  --rm-primary-light: #a9daff;

  --rm-text: #dce7f3;
  --rm-text-2: #a9b9cb;
  --rm-text-3: #8495aa;
  --rm-line: rgba(150, 196, 255, .11);
  --rm-line-strong: rgba(150, 196, 255, .2);

  --rm-bg: #0b1420;
  --rm-bg-grad: linear-gradient(165deg, #0a121e 0%, #0e1a2b 50%, #121a2e 100%);
  --rm-blob-1: rgba(64, 140, 230, .3);
  --rm-blob-2: rgba(220, 110, 160, .12);
  --rm-blob-3: rgba(60, 170, 150, .13);
  --rm-blob-4: rgba(130, 110, 230, .18);

  --rm-glass: rgba(20, 32, 50, .58);
  --rm-glass-strong: rgba(16, 26, 41, .84);
  --rm-glass-pop: rgba(16, 26, 41, .93);
  --rm-glass-border: rgba(150, 200, 255, .11);
  --rm-glass-highlight: inset 0 1px 0 rgba(255, 255, 255, .05);
  --rm-saturate: 140%;
  --rm-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -14px rgba(0, 0, 0, .6);
  --rm-shadow-hover: 0 2px 4px rgba(0, 0, 0, .35), 0 20px 44px -16px rgba(0, 0, 0, .7);

  --rm-surface: rgba(255, 255, 255, .035);
  --rm-surface-hover: rgba(255, 255, 255, .06);
  --rm-code-bg: rgba(6, 13, 24, .55);
  --rm-code-text: #cfe2f6;
  --rm-mark: rgba(255, 214, 102, .28);
  --rm-danger: #ff8fa3;
  --rm-success: #7fe0cd;
}

/* 玻璃通透度（后台可选） */
:root[data-glass="clear"] {
  --rm-glass: rgba(255, 255, 255, .42);
  --rm-glass-strong: rgba(255, 255, 255, .72);
}

:root[data-glass="solid"] {
  --rm-glass: rgba(255, 255, 255, .78);
  --rm-glass-strong: rgba(255, 255, 255, .92);
}

:root[data-theme="dark"][data-glass="clear"] {
  --rm-glass: rgba(20, 32, 50, .44);
  --rm-glass-strong: rgba(16, 26, 41, .74);
}

:root[data-theme="dark"][data-glass="solid"] {
  --rm-glass: rgba(20, 32, 50, .8);
  --rm-glass-strong: rgba(16, 26, 41, .93);
}

/* 不支持毛玻璃、或系统要求降低透明度时，改用接近不透明的面板，保证可读性 */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  :root {
    --rm-glass: rgba(255, 255, 255, .9);
    --rm-glass-strong: rgba(255, 255, 255, .97);
  }

  :root[data-theme="dark"] {
    --rm-glass: rgba(20, 31, 48, .94);
    --rm-glass-strong: rgba(16, 26, 41, .98);
  }
}

@media (prefers-reduced-transparency: reduce) {
  :root {
    --rm-glass: rgba(255, 255, 255, .92);
    --rm-glass-strong: rgba(255, 255, 255, .98);
  }

  :root[data-theme="dark"] {
    --rm-glass: rgba(20, 31, 48, .95);
    --rm-glass-strong: rgba(16, 26, 41, .98);
  }
}

/* ==========================================================================
   2. 基础
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--rm-header-h) + 32px);
  -webkit-tap-highlight-color: transparent;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--rm-font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--rm-text);
  background: var(--rm-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg,
video,
canvas,
iframe {
  max-width: 100%;
}

img,
video {
  height: auto;
}

a {
  color: var(--rm-primary-strong);
  text-decoration: none;
  transition: color .2s, background-color .2s, border-color .2s;
}

a:hover {
  color: var(--rm-primary);
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.4;
  color: var(--rm-text);
}

:focus-visible {
  outline: 2px solid var(--rm-primary);
  outline-offset: 2px;
}

::selection {
  background: var(--rm-primary-soft);
  color: var(--rm-text);
}

:root[data-theme="dark"] ::selection {
  background: rgba(109, 184, 245, .35);
}

html {
  scrollbar-color: var(--rm-primary-light) transparent;
}

:root[data-theme="dark"] {
  scrollbar-color: rgba(109, 184, 245, .35) transparent;
}

[hidden] {
  display: none !important;
}

.rm-sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.rm-skip {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--rm-glass-strong);
  box-shadow: var(--rm-shadow);
  transform: translateY(-160%);
  transition: transform .2s;
}

.rm-skip:focus {
  transform: none;
}

.rm-icon {
  width: 1.2em;
  height: 1.2em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -.22em;
}

/* ==========================================================================
   3. 背景：渐变光斑 + 缓缓上浮的汽水气泡
   ========================================================================== */

.rm-backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: var(--rm-bg-grad);
}

.rm-backdrop.has-image {
  background: var(--rm-bg-image) center / cover no-repeat;
}

.rm-backdrop.has-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(240, 247, 255, .28);
}

:root[data-theme="dark"] .rm-backdrop.has-image::after {
  background: rgba(6, 12, 22, .55);
}

.rm-blob {
  position: absolute;
  border-radius: 50%;
}

.rm-blob--1 {
  width: 62vmax;
  height: 62vmax;
  top: -26vmax;
  left: -18vmax;
  background: radial-gradient(closest-side, var(--rm-blob-1), transparent);
}

.rm-blob--2 {
  width: 44vmax;
  height: 44vmax;
  top: 12vh;
  right: -18vmax;
  background: radial-gradient(closest-side, var(--rm-blob-2), transparent);
}

.rm-blob--3 {
  width: 50vmax;
  height: 50vmax;
  bottom: -26vmax;
  left: 8vw;
  background: radial-gradient(closest-side, var(--rm-blob-3), transparent);
}

.rm-blob--4 {
  width: 46vmax;
  height: 46vmax;
  bottom: -18vmax;
  right: -8vmax;
  background: radial-gradient(closest-side, var(--rm-blob-4), transparent);
}

.has-image .rm-blob {
  display: none;
}

.rm-bubbles i {
  position: absolute;
  bottom: -80px;
  left: var(--x, 50%);
  width: var(--s, 18px);
  height: var(--s, 18px);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .8);
  background:
    radial-gradient(circle at 32% 30%, rgba(255, 255, 255, .95) 0 9%, transparent 10%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .06) 45%, rgba(150, 205, 255, .28) 100%);
  box-shadow: inset 0 0 6px rgba(255, 255, 255, .45), 0 2px 8px rgba(70, 150, 230, .12);
  opacity: 0;
  animation: rm-rise var(--d, 24s) linear infinite;
  animation-delay: var(--delay, 0s);
}

:root[data-theme="dark"] .rm-bubbles i {
  border-color: rgba(170, 215, 255, .32);
  background:
    radial-gradient(circle at 32% 30%, rgba(220, 240, 255, .7) 0 9%, transparent 10%),
    radial-gradient(circle at 50% 50%, transparent 45%, rgba(100, 170, 240, .22) 100%);
  box-shadow: inset 0 0 6px rgba(140, 200, 255, .2);
}

@keyframes rm-rise {
  0% {
    transform: translate3d(0, 0, 0);
    opacity: 0;
  }

  8% {
    opacity: .9;
  }

  50% {
    transform: translate3d(16px, -55vh, 0);
  }

  88% {
    opacity: .75;
  }

  100% {
    transform: translate3d(-10px, -112vh, 0);
    opacity: 0;
  }
}

@media (max-width: 768px) {
  .rm-bubbles i:nth-child(n+5) {
    display: none;
  }
}

/* ==========================================================================
   4. 玻璃面板
   ========================================================================== */

.rm-glass,
.rm-panel {
  background: var(--rm-glass);
  border: 1px solid var(--rm-glass-border);
  box-shadow: var(--rm-shadow), var(--rm-glass-highlight);
  -webkit-backdrop-filter: blur(var(--rm-blur)) saturate(var(--rm-saturate));
  backdrop-filter: blur(var(--rm-blur)) saturate(var(--rm-saturate));
}

/* 正文阅读区：更高的不透明度，背景再花哨也不影响阅读 */
.rm-panel--read {
  background: var(--rm-glass-strong);
}

.rm-panel {
  position: relative;
  border-radius: var(--rm-radius-lg);
  padding: 28px 32px;
}

/* ==========================================================================
   5. 布局
   ========================================================================== */

.rm-container {
  width: 100%;
  max-width: var(--rm-container);
  margin: 0 auto;
  padding: 0 20px;
}

.rm-main {
  flex: 1 0 auto;
  padding-top: 28px;
  padding-bottom: 64px;
}

.rm-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--rm-sidebar);
  gap: var(--rm-gap);
  align-items: start;
}

.rm-layout--single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 880px;
  margin: 0 auto;
}

.rm-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--rm-gap);
}

@media (max-width: 1180px) {
  :root {
    --rm-sidebar: 280px;
    --rm-gap: 20px;
  }
}

@media (max-width: 960px) {
  .rm-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  :root {
    --rm-blur: 14px;
  }

  .rm-container {
    padding: 0 14px;
  }

  .rm-main {
    padding-top: 18px;
    padding-bottom: 44px;
  }

  .rm-panel {
    padding: 22px 18px;
    border-radius: var(--rm-radius);
  }

  :root {
    --rm-gap: 16px;
  }
}

/* ==========================================================================
   6. 页头与导航
   ========================================================================== */

.rm-header {
  position: sticky;
  top: 0;
  z-index: 60;
  padding-top: 12px;
}

.rm-header__bar {
  position: relative;
  z-index: 0;
  height: var(--rm-header-h);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 10px 0 14px;
  border-radius: 20px;
}

/* 毛玻璃画在伪元素上：避免成为下拉菜单的 backdrop root，菜单自己也能模糊页面 */
.rm-header__bar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--rm-glass);
  border: 1px solid var(--rm-glass-border);
  box-shadow: var(--rm-shadow), var(--rm-glass-highlight);
  -webkit-backdrop-filter: blur(var(--rm-blur)) saturate(var(--rm-saturate));
  backdrop-filter: blur(var(--rm-blur)) saturate(var(--rm-saturate));
  transition: background-color .3s, box-shadow .3s;
}

.rm-header.is-scrolled .rm-header__bar::before {
  background: var(--rm-glass-strong);
}

.rm-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: none;
  color: var(--rm-text);
  font-family: var(--rm-font-round);
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: .01em;
}

.rm-brand:hover {
  color: var(--rm-text);
}

.rm-brand__logo {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  object-fit: cover;
  flex: none;
  transition: transform .5s var(--rm-ease);
}

.rm-brand:hover .rm-brand__logo {
  transform: rotate(-8deg) scale(1.05);
}

.rm-brand__name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 16em;
}

.rm-nav {
  flex: 1;
  min-width: 0;
}

.rm-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}

.rm-nav__list::-webkit-scrollbar {
  display: none;
}

.rm-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  color: var(--rm-text-2);
  font-size: .95rem;
  white-space: nowrap;
}

.rm-nav__link .rm-icon {
  width: 17px;
  height: 17px;
}

.rm-nav__link:hover {
  color: var(--rm-primary-strong);
  background: var(--rm-primary-faint);
}

.rm-nav__link.is-active {
  color: var(--rm-primary-strong);
  background: var(--rm-primary-soft);
  font-weight: 600;
}

.rm-header__actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex: none;
}

.rm-icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--rm-text-2);
  cursor: pointer;
  transition: background-color .2s, color .2s, transform .2s;
}

.rm-icon-btn:hover {
  color: var(--rm-primary-strong);
  background: var(--rm-primary-faint);
}

.rm-icon-btn:active {
  transform: scale(.94);
}

.rm-icon-btn .rm-icon {
  width: 21px;
  height: 21px;
}

.rm-theme-toggle .rm-icon--moon,
:root[data-theme="dark"] .rm-theme-toggle .rm-icon--sun {
  display: none;
}

:root[data-theme="dark"] .rm-theme-toggle .rm-icon--moon {
  display: block;
}

.rm-menu-btn,
.no-js .rm-theme-toggle,
.rm-menu-btn .rm-icon--close,
.rm-menu-btn[aria-expanded="true"] .rm-icon--menu {
  display: none;
}

.rm-menu-btn[aria-expanded="true"] .rm-icon--close {
  display: block;
}

@media (max-width: 860px) {
  .js .rm-menu-btn {
    display: inline-grid;
  }

  .js .rm-nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    padding: 10px;
    border-radius: 20px;
    background: var(--rm-glass-pop);
    border: 1px solid var(--rm-glass-border);
    box-shadow: var(--rm-shadow-hover), var(--rm-glass-highlight);
    -webkit-backdrop-filter: blur(var(--rm-blur)) saturate(var(--rm-saturate));
    backdrop-filter: blur(var(--rm-blur)) saturate(var(--rm-saturate));
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(.98);
    transform-origin: top center;
    transition: opacity .25s var(--rm-ease), transform .25s var(--rm-ease), visibility 0s .25s;
  }

  .js .rm-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .25s var(--rm-ease), transform .25s var(--rm-ease);
  }

  .js .rm-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    overflow: visible;
  }

  .js .rm-nav__link {
    padding: 11px 14px;
    border-radius: 14px;
  }

  .rm-brand__name {
    max-width: 12em;
  }
}

/* 无 JavaScript 时，窄屏导航换到第二行横向滚动 */
@media (max-width: 860px) {
  .no-js .rm-header__bar {
    flex-wrap: wrap;
    height: auto;
    padding-top: 8px;
    padding-bottom: 8px;
    row-gap: 4px;
  }

  .no-js .rm-nav {
    order: 3;
    flex-basis: 100%;
  }
}

@media (max-width: 640px) {
  .rm-header {
    padding-top: 8px;
  }

  :root {
    --rm-header-h: 56px;
  }

  .rm-header__bar {
    border-radius: 18px;
    gap: 10px;
  }

  .rm-brand__logo {
    width: 34px;
    height: 34px;
  }
}

/* ==========================================================================
   7. 按钮、标签、元信息
   ========================================================================== */

.rm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: .95rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .2s var(--rm-ease), box-shadow .2s, background-color .2s, color .2s;
}

.rm-btn .rm-icon {
  width: 18px;
  height: 18px;
}

.rm-btn:active {
  transform: scale(.97);
}

.rm-btn--primary {
  color: var(--rm-primary-ink);
  background: linear-gradient(180deg, var(--rm-primary-light) 0%, var(--rm-primary) 100%);
  border-color: rgba(255, 255, 255, .55);
  box-shadow: 0 8px 18px -8px var(--rm-primary), inset 0 1px 0 rgba(255, 255, 255, .6);
}

.rm-btn--primary:hover {
  color: var(--rm-primary-ink);
  transform: translateY(-1px);
  box-shadow: 0 12px 22px -10px var(--rm-primary), inset 0 1px 0 rgba(255, 255, 255, .6);
}

:root[data-theme="dark"] .rm-btn--primary {
  border-color: rgba(255, 255, 255, .18);
  box-shadow: 0 8px 20px -10px rgba(109, 184, 245, .7), inset 0 1px 0 rgba(255, 255, 255, .35);
}

.rm-btn--soft {
  color: var(--rm-primary-strong);
  background: var(--rm-primary-soft);
}

.rm-btn--soft:hover {
  color: var(--rm-primary-strong);
  background: var(--rm-primary-faint);
  border-color: var(--rm-primary-soft);
}

.rm-btn--ghost {
  color: var(--rm-text-2);
  background: transparent;
  border-color: var(--rm-line-strong);
}

.rm-btn--ghost:hover {
  color: var(--rm-primary-strong);
  border-color: var(--rm-primary);
}

.rm-btn--sm {
  height: 34px;
  padding: 0 14px;
  font-size: .85rem;
}

.rm-btn[disabled],
.rm-btn.is-loading {
  opacity: .65;
  cursor: not-allowed;
  transform: none;
}

.rm-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--rm-primary-soft);
  background: var(--rm-primary-faint);
  color: var(--rm-primary-strong);
  font-size: .8rem;
  line-height: 1.7;
  white-space: nowrap;
}

a.rm-chip:hover {
  color: var(--rm-primary-strong);
  background: var(--rm-primary-soft);
}

.rm-chip .rm-icon {
  width: 13px;
  height: 13px;
}

.rm-chip--pink {
  border-color: rgba(255, 163, 188, .45);
  background: rgba(255, 163, 188, .14);
  color: #b4365d;
}

:root[data-theme="dark"] .rm-chip--pink {
  color: #ffb5c9;
}

.rm-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rm-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--rm-text-3);
  font-size: .86rem;
}

.rm-meta__item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.rm-meta__item .rm-icon {
  width: 15px;
  height: 15px;
  color: var(--rm-primary);
}

.rm-meta a {
  color: inherit;
}

.rm-meta a:hover {
  color: var(--rm-primary-strong);
}

.rm-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
}

.rm-section-title .rm-icon {
  width: 22px;
  height: 22px;
  color: var(--rm-primary);
}

.rm-count {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--rm-primary-soft);
  color: var(--rm-primary-strong);
  font-size: .78rem;
  font-weight: 700;
}

.rm-sparkle {
  display: inline-block;
  width: .7em;
  height: .7em;
  color: var(--rm-pink);
  vertical-align: .35em;
}

.rm-empty {
  margin: 0;
  padding: 36px 16px;
  text-align: center;
  color: var(--rm-text-3);
}

.rm-empty__face {
  display: block;
  margin-bottom: 8px;
  font-size: 1.6rem;
  color: var(--rm-primary-strong);
  letter-spacing: .05em;
}

/* ==========================================================================
   8. 首页横幅
   ========================================================================== */

.rm-hero {
  display: flex;
  align-items: center;
  gap: 28px;
  overflow: hidden;
  padding: 32px 36px;
}

.rm-hero__text {
  flex: 1;
  min-width: 0;
}

.rm-hero__hello {
  margin: 0 0 6px;
  color: var(--rm-primary-strong);
  font-family: var(--rm-font-round);
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.rm-hero__title {
  margin: 0 0 10px;
  font-family: var(--rm-font-round);
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem);
  font-weight: 800;
}

.rm-hero__desc {
  margin: 0;
  color: var(--rm-text-2);
  font-size: 1.02rem;
}

.rm-hero__art {
  position: relative;
  flex: none;
  width: 150px;
  height: 150px;
}

.rm-hero__art svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.rm-hero__bottle {
  transform-box: view-box;
  transform-origin: 50% 90%;
  animation: rm-sway 6s ease-in-out infinite;
}

.rm-hero__fizz circle,
.rm-nf__bubbles circle {
  fill: none;
  stroke: var(--rm-primary);
  stroke-width: 1.4;
  animation: rm-fizz 3.6s ease-in infinite;
}

.rm-nf__bubbles circle:nth-child(2) {
  animation-delay: 1.2s;
}

.rm-nf__bubbles circle:nth-child(3) {
  animation-delay: 2.4s;
}

.rm-hero__fizz circle:nth-child(2) {
  animation-delay: 1.1s;
}

.rm-hero__fizz circle:nth-child(3) {
  animation-delay: 2.2s;
}

.rm-hero__fizz circle:nth-child(4) {
  animation-delay: .6s;
}

/* 插画通用 */
.rm-art__shadow {
  fill: var(--rm-primary-soft);
}

.rm-art__glass {
  fill: rgba(255, 255, 255, .9);
}

:root[data-theme="dark"] .rm-art__glass {
  fill: rgba(210, 232, 255, .12);
}

.rm-art__outline {
  fill: none;
  stroke: var(--rm-primary-strong);
  stroke-width: .5;
  stroke-linejoin: round;
}

.rm-art__marble {
  stroke: var(--rm-primary-strong);
  stroke-width: .42;
}

.rm-notfound .rm-art__marble {
  stroke-width: 2;
}

.rm-art__glint {
  fill: none;
  stroke: #fff;
  stroke-width: .5;
  stroke-linecap: round;
}

.rm-notfound .rm-art__glint {
  stroke-width: 2.2;
}

.rm-art__puddle {
  fill: var(--rm-primary-light);
  opacity: .55;
}

.rm-art__dot {
  fill: var(--rm-primary-light);
  opacity: .7;
}

.rm-art__star {
  transform-box: fill-box;
  transform-origin: center;
  animation: rm-twinkle 3.2s ease-in-out infinite;
}

.rm-art__star--pink {
  fill: var(--rm-pink);
}

.rm-art__star--lemon {
  fill: var(--rm-lemon);
  animation-delay: 1.5s;
}

@keyframes rm-twinkle {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(.6);
    opacity: .55;
  }
}

@keyframes rm-sway {
  0%,
  100% {
    transform: rotate(-4deg);
  }

  50% {
    transform: rotate(4deg);
  }
}

@keyframes rm-fizz {
  0% {
    transform: translateY(0);
    opacity: 0;
  }

  20% {
    opacity: 1;
  }

  100% {
    transform: translateY(-34px);
    opacity: 0;
  }
}

@media (max-width: 640px) {
  .rm-hero {
    padding: 22px 20px;
    gap: 14px;
  }

  .rm-hero__art {
    width: 92px;
    height: 92px;
  }
}

/* ==========================================================================
   9. 文章卡片与列表
   ========================================================================== */

.rm-post-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.rm-post-card {
  display: flex;
  gap: 24px;
  padding: 24px 26px;
  border-radius: var(--rm-radius-lg);
  transition: transform .35s var(--rm-ease), box-shadow .35s var(--rm-ease);
}

.rm-post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--rm-shadow-hover), var(--rm-glass-highlight);
}

.rm-post-card__cover {
  order: 2;
  position: relative;
  flex: 0 0 34%;
  max-width: 250px;
  min-height: 150px;
  overflow: hidden;
  border-radius: 16px;
  background: var(--rm-primary-faint);
}

.rm-post-card__cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s var(--rm-ease);
}

.rm-post-card:hover .rm-post-card__cover img {
  transform: scale(1.05);
}

.rm-post-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.rm-post-card__title {
  margin: 8px 0 8px;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.5;
}

.rm-post-card__title a {
  color: var(--rm-text);
  background-image: linear-gradient(transparent 62%, var(--rm-primary-soft) 62%, var(--rm-primary-soft) 92%, transparent 92%);
  background-repeat: no-repeat;
  background-size: 0 100%;
  transition: background-size .45s var(--rm-ease), color .2s;
}

.rm-post-card__title a:hover {
  color: var(--rm-text);
  background-size: 100% 100%;
}

.rm-post-card__excerpt {
  margin: 0 0 16px;
  color: var(--rm-text-2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rm-post-card__foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: auto;
}

.rm-post-card__more {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .88rem;
  font-weight: 600;
  white-space: nowrap;
}

.rm-post-card__more .rm-icon {
  width: 16px;
  height: 16px;
  transition: transform .25s var(--rm-ease);
}

.rm-post-card__more:hover .rm-icon {
  transform: translateX(3px);
}

/* 没有封面时的占位封面：只在宽屏双列卡片中显示，让卡片高度整齐 */
.rm-post-card__cover.is-placeholder {
  display: none;
  background:
    radial-gradient(circle at 18% 28%, transparent 0 9px, rgba(255, 255, 255, .85) 9.5px 11px, transparent 11.5px),
    radial-gradient(circle at 82% 72%, transparent 0 15px, rgba(255, 255, 255, .7) 15.5px 17px, transparent 17.5px),
    radial-gradient(circle at 70% 22%, rgba(255, 255, 255, .85) 0 4px, transparent 4.5px),
    radial-gradient(circle at 30% 78%, rgba(255, 255, 255, .7) 0 3px, transparent 3.5px),
    linear-gradient(135deg, hsl(var(--hue, 205), 90%, 91%) 0%, hsl(calc(var(--hue, 205) + 30), 85%, 84%) 100%);
}

:root[data-theme="dark"] .rm-post-card__cover.is-placeholder {
  background:
    radial-gradient(circle at 18% 28%, transparent 0 9px, rgba(200, 230, 255, .35) 9.5px 11px, transparent 11.5px),
    radial-gradient(circle at 82% 72%, transparent 0 15px, rgba(200, 230, 255, .28) 15.5px 17px, transparent 17.5px),
    radial-gradient(circle at 70% 22%, rgba(200, 230, 255, .4) 0 4px, transparent 4.5px),
    radial-gradient(circle at 30% 78%, rgba(200, 230, 255, .3) 0 3px, transparent 3.5px),
    linear-gradient(135deg, hsl(var(--hue, 205), 45%, 25%) 0%, hsl(calc(var(--hue, 205) + 30), 40%, 18%) 100%);
}

.rm-post-card__glyph {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 76px;
  height: 76px;
  margin: -38px 0 0 -38px;
  color: #fff;
  stroke-width: 1.3;
  filter: drop-shadow(0 8px 16px hsla(var(--hue, 205), 60%, 40%, .28));
  transition: transform .6s var(--rm-ease);
}

:root[data-theme="dark"] .rm-post-card__glyph {
  color: rgba(220, 238, 255, .75);
}

.rm-post-card:hover .rm-post-card__glyph {
  transform: translateY(-4px) rotate(-8deg);
}

.rm-post-card.is-locked .rm-post-card__excerpt {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--rm-text-3);
}

@media (max-width: 640px) {
  .rm-post-card {
    flex-direction: column;
    gap: 14px;
    padding: 16px 16px 18px;
    border-radius: var(--rm-radius);
  }

  .rm-post-card__cover {
    order: 0;
    flex: none;
    max-width: none;
    min-height: 0;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
  }

  .rm-post-card__title {
    margin-top: 4px;
    font-size: 1.15rem;
  }

  .rm-post-card__more {
    display: none;
  }
}

/* 归档/分类/搜索页的标题卡片 */
.rm-archive-head {
  display: flex;
  align-items: center;
  gap: 18px;
}

.rm-archive-head__icon {
  flex: none;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: var(--rm-primary-strong);
  background: linear-gradient(145deg, var(--rm-primary-faint), var(--rm-primary-soft));
}

.rm-archive-head__icon .rm-icon {
  width: 26px;
  height: 26px;
}

.rm-archive-head__label {
  margin: 0;
  color: var(--rm-text-3);
  font-size: .85rem;
}

.rm-archive-head__title {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 800;
  word-break: break-word;
}

.rm-archive-head__desc {
  margin: 4px 0 0;
  color: var(--rm-text-2);
}

/* 分页 */
.rm-pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.rm-pagination a,
.rm-pagination span {
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: var(--rm-text-2);
  font-weight: 600;
  background: var(--rm-glass);
  border: 1px solid var(--rm-glass-border);
  box-shadow: var(--rm-shadow);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.rm-pagination a:hover {
  color: var(--rm-primary-strong);
  transform: translateY(-1px);
}

.rm-pagination .is-current a {
  color: var(--rm-primary-ink);
  background: linear-gradient(180deg, var(--rm-primary-light), var(--rm-primary));
  border-color: rgba(255, 255, 255, .5);
}

.rm-pagination span {
  box-shadow: none;
  background: transparent;
  border-color: transparent;
}

.rm-pagination .rm-icon {
  width: 18px;
  height: 18px;
}

/* ==========================================================================
   10. 文章页
   ========================================================================== */

.rm-article {
  padding: 36px 44px 32px;
}

.rm-article__topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-bottom: 16px;
}

.rm-article__topbar .rm-breadcrumb {
  margin-bottom: 0;
}

/* 返回按钮：回到站内的上一页，没有的话回首页 */
.rm-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px 0 10px;
  border-radius: 999px;
  border: 1px solid var(--rm-primary-soft);
  background: var(--rm-primary-faint);
  color: var(--rm-primary-strong);
  font-size: .86rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: background-color .2s, border-color .2s, box-shadow .3s var(--rm-ease);
}

.rm-back:hover {
  color: var(--rm-primary-strong);
  background: var(--rm-primary-soft);
}

.rm-back .rm-icon {
  width: 16px;
  height: 16px;
  transition: transform .35s var(--rm-ease);
}

.rm-back:hover .rm-icon {
  transform: translateX(-3px);
}

.rm-back--rail {
  height: 40px;
  padding: 0 18px 0 14px;
  font-size: .92rem;
  border-color: var(--rm-glass-border);
  background: var(--rm-glass);
  box-shadow: var(--rm-shadow), var(--rm-glass-highlight);
  -webkit-backdrop-filter: blur(var(--rm-blur)) saturate(var(--rm-saturate));
  backdrop-filter: blur(var(--rm-blur)) saturate(var(--rm-saturate));
}

.rm-back--rail:hover {
  background: var(--rm-glass-strong);
  box-shadow: var(--rm-shadow-hover), var(--rm-glass-highlight);
}

.rm-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-bottom: 14px;
  color: var(--rm-text-3);
  font-size: .85rem;
}

.rm-breadcrumb a {
  color: inherit;
}

.rm-breadcrumb a:hover {
  color: var(--rm-primary-strong);
}

.rm-breadcrumb .rm-icon {
  width: 14px;
  height: 14px;
  opacity: .7;
}

.rm-article__title {
  margin: 0 0 14px;
  font-size: clamp(1.55rem, 1.25rem + 1.1vw, 2.1rem);
  font-weight: 800;
  line-height: 1.38;
  letter-spacing: .005em;
  word-break: break-word;
}

.rm-article__meta .rm-avatar {
  width: 22px;
  height: 22px;
}

.rm-article__cover {
  margin: 24px 0 0;
  overflow: hidden;
  border-radius: 18px;
  background: var(--rm-primary-faint);
}

.rm-article__cover img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

.rm-article__body {
  margin-top: 28px;
}

/* 正文保持舒适的行宽，宽屏时在面板内居中；封面可以比正文更宽 */
.rm-article__header,
.rm-article__body,
.rm-article__foot {
  max-width: var(--rm-measure);
  margin-left: auto;
  margin-right: auto;
}

.rm-article__foot {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 36px;
}

.rm-updated {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--rm-text-3);
  font-size: .85rem;
}

.rm-updated .rm-icon {
  width: 15px;
  height: 15px;
  color: var(--rm-primary);
}

.rm-license {
  position: relative;
  overflow: hidden;
  padding: 16px 20px 16px 22px;
  border-radius: 16px;
  background: var(--rm-primary-faint);
  border: 1px solid var(--rm-primary-soft);
  color: var(--rm-text-2);
  font-size: .88rem;
  line-height: 1.8;
}

.rm-license::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(var(--rm-primary), var(--rm-lilac));
}

.rm-license p {
  margin: 0;
}

.rm-license strong {
  color: var(--rm-text);
}

.rm-license a {
  word-break: break-all;
  text-decoration: underline;
  text-decoration-color: var(--rm-primary-light);
  text-underline-offset: 3px;
}

.rm-license__bubble {
  position: absolute;
  right: -18px;
  bottom: -22px;
  width: 96px;
  height: 96px;
  color: var(--rm-primary);
  opacity: .14;
}

.rm-post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.rm-post-nav__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 18px 22px;
  border-radius: var(--rm-radius);
  color: var(--rm-text);
  transition: transform .3s var(--rm-ease), box-shadow .3s;
}

.rm-post-nav__item:hover {
  color: var(--rm-text);
  transform: translateY(-2px);
  box-shadow: var(--rm-shadow-hover), var(--rm-glass-highlight);
}

.rm-post-nav__item--next {
  text-align: right;
  align-items: flex-end;
}

.rm-post-nav__label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--rm-text-3);
  font-size: .82rem;
}

.rm-post-nav__label .rm-icon {
  width: 15px;
  height: 15px;
}

.rm-post-nav__title {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.rm-post-nav__title::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.rm-post-nav__item {
  position: relative;
}

.rm-post-nav a.rm-post-nav__title {
  color: var(--rm-text);
}

.rm-post-nav__item:hover a.rm-post-nav__title {
  color: var(--rm-primary-strong);
}

.rm-post-nav__item.is-empty {
  color: var(--rm-text-3);
  pointer-events: none;
  background: transparent;
  border-style: dashed;
  box-shadow: none;
}

.rm-post-nav__item.is-empty .rm-post-nav__title {
  font-weight: 400;
}

@media (max-width: 640px) {
  .rm-article {
    padding: 24px 18px 22px;
  }

  .rm-article__body {
    margin-top: 22px;
  }

  .rm-post-nav {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .rm-post-nav__item--next {
    text-align: left;
    align-items: flex-start;
  }
}

/* ==========================================================================
   11. 正文排版
   ========================================================================== */

.rm-prose {
  font-size: 1.0625rem;
  line-height: 1.9;
  color: var(--rm-text);
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.rm-prose > :first-child {
  margin-top: 0;
}

.rm-prose > :last-child {
  margin-bottom: 0;
}

.rm-prose p {
  margin: 0 0 1.15em;
}

.rm-prose h1,
.rm-prose h2,
.rm-prose h3,
.rm-prose h4,
.rm-prose h5,
.rm-prose h6 {
  position: relative;
  margin: 1.9em 0 .75em;
  font-weight: 700;
  scroll-margin-top: calc(var(--rm-header-h) + 32px);
}

.rm-prose h1 {
  font-size: 1.6em;
}

.rm-prose h2 {
  padding-left: 1.05em;
  font-size: 1.42em;
}

/* 标题前的一大一小两颗汽水泡泡 */
.rm-prose h2::before {
  content: "";
  position: absolute;
  left: .05em;
  top: .58em;
  width: .5em;
  height: .5em;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--rm-primary-light), var(--rm-primary));
  box-shadow: .42em -.34em 0 -.12em var(--rm-pink);
}

.rm-prose h3 {
  padding-left: .9em;
  font-size: 1.22em;
}

.rm-prose h3::before {
  content: "";
  position: absolute;
  left: .1em;
  top: .62em;
  width: .42em;
  height: .42em;
  border-radius: 50%;
  border: 2px solid var(--rm-primary);
}

.rm-prose h4 {
  font-size: 1.08em;
}

.rm-prose h5,
.rm-prose h6 {
  font-size: 1em;
  color: var(--rm-text-2);
}

.rm-prose a {
  color: var(--rm-primary-strong);
  text-decoration: underline;
  text-decoration-color: var(--rm-primary-light);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  border-radius: 4px;
}

.rm-prose a:hover {
  color: var(--rm-primary-strong);
  text-decoration-color: var(--rm-primary);
  background: var(--rm-primary-faint);
}

.rm-prose strong,
.rm-prose b {
  font-weight: 700;
  color: var(--rm-text);
}

.rm-prose mark {
  padding: 0 .2em;
  border-radius: 4px;
  background: var(--rm-mark);
  color: inherit;
}

.rm-prose del {
  color: var(--rm-text-3);
}

.rm-prose ul,
.rm-prose ol {
  margin: 0 0 1.15em;
  padding-left: 1.5em;
}

.rm-prose li {
  margin: .3em 0;
}

.rm-prose li > ul,
.rm-prose li > ol {
  margin: .2em 0;
}

.rm-prose li::marker {
  color: var(--rm-primary);
}

.rm-prose ol > li::marker {
  font-weight: 700;
}

.rm-prose blockquote {
  position: relative;
  margin: 1.4em 0;
  padding: .9em 1.2em .9em 1.3em;
  border-radius: 0 16px 16px 0;
  border-left: 4px solid var(--rm-primary);
  background: var(--rm-primary-faint);
  color: var(--rm-text-2);
}

.rm-prose blockquote > :last-child {
  margin-bottom: 0;
}

.rm-prose hr {
  height: auto;
  margin: 2.4em 0;
  border: 0;
  text-align: center;
  overflow: visible;
}

.rm-prose hr::before {
  content: "\2022\2002\2022\2002\2022";
  color: var(--rm-primary);
  font-size: 1.1em;
  letter-spacing: .3em;
}

.rm-prose img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  vertical-align: middle;
}

.rm-prose p > img:only-child,
.rm-prose p > a:only-child > img:only-child {
  display: block;
  margin: 0 auto;
}

.rm-prose figure {
  margin: 1.4em 0;
  text-align: center;
}

.rm-prose figcaption {
  margin-top: .5em;
  color: var(--rm-text-3);
  font-size: .88em;
}

.js .rm-prose img.rm-zoomable {
  cursor: zoom-in;
}

.rm-prose code,
.rm-prose kbd,
.rm-prose samp {
  font-family: var(--rm-font-mono);
  font-size: .86em;
}

.rm-prose :not(pre) > code {
  padding: .12em .45em;
  border-radius: 6px;
  background: var(--rm-primary-faint);
  border: 1px solid var(--rm-line);
  color: var(--rm-code-text);
  word-break: break-word;
}

.rm-prose kbd {
  padding: .1em .45em;
  border-radius: 6px;
  border: 1px solid var(--rm-line-strong);
  border-bottom-width: 2px;
  background: var(--rm-glass-strong);
}

.rm-prose pre {
  position: relative;
  margin: 1.4em 0;
  padding: 2.6em 1.2em 1.1em;
  overflow: auto;
  border-radius: 16px;
  border: 1px solid var(--rm-line);
  background: var(--rm-code-bg);
  color: var(--rm-code-text);
  font-size: .9em;
  line-height: 1.7;
  tab-size: 4;
}

/* 代码块左上角的三颗小圆点 */
.rm-prose pre::before {
  content: "";
  position: absolute;
  top: 1em;
  left: 1.1em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--rm-pink);
  box-shadow: 16px 0 0 var(--rm-lemon), 32px 0 0 var(--rm-mint);
}

.rm-prose pre code {
  display: block;
  min-width: max-content;
  padding: 0;
  font-size: 1em;
  background: none;
  border: 0;
  color: inherit;
}

/* 兼容自行引入的 highlight.js / Prism 等高亮库：沿用主题的代码块外观 */
.rm-prose pre code.hljs {
  padding: 0;
  background: transparent;
}

.rm-prose pre[class*="language-"] {
  padding: 2.6em 1.2em 1.1em;
  background: var(--rm-code-bg);
}

.rm-code {
  position: relative;
}

.rm-code__bar {
  position: absolute;
  top: .55em;
  right: .6em;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
}

.rm-code__lang {
  color: var(--rm-text-3);
  font-family: var(--rm-font-mono);
  text-transform: lowercase;
  user-select: none;
}

.rm-code__copy {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 9px;
  border: 1px solid var(--rm-line);
  border-radius: 8px;
  background: var(--rm-glass-strong);
  color: var(--rm-text-2);
  font-size: .78rem;
  cursor: pointer;
  transition: color .2s, border-color .2s;
}

.rm-code__copy:hover,
.rm-code__copy:focus-visible {
  color: var(--rm-primary-strong);
  border-color: var(--rm-primary-soft);
}

.rm-code__copy .rm-icon {
  width: 14px;
  height: 14px;
}

.rm-code__copy.is-done {
  color: var(--rm-success);
}

.rm-table-wrap {
  margin: 1.4em 0;
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid var(--rm-line);
}

.rm-prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: .94em;
  line-height: 1.6;
}

.rm-prose th,
.rm-prose td {
  padding: .65em .95em;
  border-bottom: 1px solid var(--rm-line);
  text-align: left;
  vertical-align: top;
}

.rm-prose thead th {
  background: var(--rm-primary-faint);
  font-weight: 700;
  white-space: nowrap;
}

.rm-prose tbody tr:last-child td {
  border-bottom: 0;
}

.rm-prose tbody tr:hover td {
  background: var(--rm-primary-faint);
}

.rm-prose details {
  margin: 1.2em 0;
  padding: .7em 1.1em;
  border-radius: 14px;
  border: 1px solid var(--rm-line);
  background: var(--rm-glass);
}

.rm-prose summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--rm-primary-strong);
}

.rm-prose details[open] summary {
  margin-bottom: .5em;
}

.rm-prose iframe,
.rm-prose video {
  display: block;
  max-width: 100%;
  margin: 1.4em auto;
  border: 0;
  border-radius: 14px;
}

/* 加密文章 */
.rm-prose .protected {
  max-width: 420px;
  margin: 1em auto;
  padding: 28px 24px;
  border-radius: 20px;
  text-align: center;
  background: var(--rm-primary-faint);
  border: 1px dashed var(--rm-primary-light);
}

.rm-prose .protected .word {
  margin: 0 0 14px;
  color: var(--rm-text-2);
  font-weight: 600;
}

.rm-prose .protected p:last-child {
  display: flex;
  gap: 8px;
  margin: 0;
}

.rm-prose .protected input.text {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--rm-line-strong);
  background: var(--rm-glass-strong);
}

.rm-prose .protected input.text:focus {
  outline: none;
  border-color: var(--rm-primary);
  box-shadow: 0 0 0 4px var(--rm-primary-soft);
}

.rm-prose .protected input.submit {
  height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--rm-primary-light), var(--rm-primary));
  color: var(--rm-primary-ink);
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 640px) {
  .rm-prose {
    font-size: 1rem;
    line-height: 1.85;
  }

  .rm-prose pre {
    margin-left: -6px;
    margin-right: -6px;
    border-radius: 12px;
  }
}

/* ==========================================================================
   12. 侧边栏
   ========================================================================== */

.rm-sidebar {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-self: stretch;
}

.rm-sidebar__sticky {
  position: sticky;
  top: calc(var(--rm-header-h) + 28px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.rm-widget {
  padding: 20px;
  border-radius: var(--rm-radius);
}

.rm-widget__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 1rem;
  font-weight: 700;
}

.rm-widget__title .rm-icon {
  width: 19px;
  height: 19px;
  color: var(--rm-primary);
}

.rm-widget__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rm-widget__list a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  margin: 0 -10px;
  border-radius: 10px;
  color: var(--rm-text-2);
  font-size: .93rem;
}

.rm-widget__list a:hover {
  color: var(--rm-primary-strong);
  background: var(--rm-primary-faint);
}

.rm-widget__list .rm-num {
  margin-left: auto;
  color: var(--rm-text-3);
  font-size: .8rem;
}

.rm-widget__text {
  margin: 0;
  color: var(--rm-text-2);
  font-size: .93rem;
}

.rm-widget__text > :last-child {
  margin-bottom: 0;
}

.rm-ellipsis {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* 最新文章 */
.rm-recent {
  counter-reset: rm-recent;
}

.rm-recent a::before {
  counter-increment: rm-recent;
  content: counter(rm-recent);
  flex: none;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--rm-primary-faint);
  color: var(--rm-primary-strong);
  font-size: .75rem;
  font-weight: 700;
}

.rm-recent li:nth-child(-n+3) a::before {
  background: linear-gradient(160deg, var(--rm-primary-light), var(--rm-primary));
  color: var(--rm-primary-ink);
}

/* 博主卡片 */
.rm-author {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding-top: 26px;
}

.rm-author::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 74px;
  background:
    radial-gradient(circle at 18% 30%, rgba(255, 255, 255, .55) 0 6px, transparent 7px),
    radial-gradient(circle at 82% 58%, rgba(255, 255, 255, .5) 0 4px, transparent 5px),
    radial-gradient(circle at 70% 22%, rgba(255, 255, 255, .45) 0 3px, transparent 4px),
    linear-gradient(120deg, var(--rm-primary-soft), rgba(255, 163, 188, .22));
}

.rm-author__avatar {
  position: relative;
  width: 86px;
  height: 86px;
  margin: 0 auto 10px;
  padding: 4px;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff, var(--rm-primary-light));
  box-shadow: 0 8px 20px -10px var(--rm-primary);
}

:root[data-theme="dark"] .rm-author__avatar {
  background: linear-gradient(145deg, rgba(255, 255, 255, .25), var(--rm-primary));
}

.rm-author__avatar img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--rm-primary-faint);
  transition: transform .6s var(--rm-ease);
}

.rm-author:hover .rm-author__avatar img {
  transform: rotate(360deg);
}

.rm-author__name {
  margin: 0;
  font-family: var(--rm-font-round);
  font-size: 1.12rem;
  font-weight: 800;
}

.rm-author__bio {
  margin: 4px 0 0;
  color: var(--rm-text-2);
  font-size: .9rem;
}

.rm-author__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 16px 0 0;
  padding: 12px 0 0;
  border-top: 1px dashed var(--rm-line-strong);
}

.rm-author__stats div {
  display: flex;
  flex-direction: column-reverse;
}

.rm-author__stats dt {
  color: var(--rm-text-3);
  font-size: .78rem;
}

.rm-author__stats dd {
  margin: 0;
  font-family: var(--rm-font-round);
  font-weight: 800;
  font-size: 1.12rem;
  color: var(--rm-text);
}

.rm-social {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.rm-social a {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--rm-primary-strong);
  background: var(--rm-primary-faint);
  transition: transform .25s var(--rm-ease), background-color .2s;
}

.rm-social a:hover {
  transform: translateY(-2px);
  background: var(--rm-primary-soft);
}

.rm-social .rm-icon {
  width: 19px;
  height: 19px;
}

/* 最近评论 */
.rm-recent-comments {
  gap: 12px;
}

.rm-recent-comments a {
  align-items: flex-start;
  gap: 10px;
  padding: 6px 10px;
}

.rm-recent-comments .rm-avatar {
  width: 32px;
  height: 32px;
  margin-top: 2px;
}

.rm-recent-comments__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}

.rm-recent-comments__name {
  color: var(--rm-text);
  font-weight: 600;
  font-size: .88rem;
}

.rm-recent-comments__text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--rm-text-2);
  font-size: .86rem;
}

/* 标签云 */
.rm-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rm-tag-cloud .rm-chip:nth-child(4n+2) {
  border-color: rgba(255, 163, 188, .4);
  background: rgba(255, 163, 188, .13);
  color: #ad3358;
}

.rm-tag-cloud .rm-chip:nth-child(4n+3) {
  border-color: rgba(132, 220, 198, .5);
  background: rgba(132, 220, 198, .15);
  color: #0f7563;
}

.rm-tag-cloud .rm-chip:nth-child(4n+4) {
  border-color: rgba(189, 180, 246, .5);
  background: rgba(189, 180, 246, .16);
  color: #5545b5;
}

:root[data-theme="dark"] .rm-tag-cloud .rm-chip:nth-child(4n+2) {
  color: #ffb5c9;
}

:root[data-theme="dark"] .rm-tag-cloud .rm-chip:nth-child(4n+3) {
  color: #8fe6d3;
}

:root[data-theme="dark"] .rm-tag-cloud .rm-chip:nth-child(4n+4) {
  color: #cdc6ff;
}

/* 目录 */
.rm-toc__list {
  max-height: calc(100vh - var(--rm-header-h) - 220px);
  margin: 0 -6px;
  padding: 0 6px;
  overflow-y: auto;
  list-style: none;
  font-size: .9rem;
  line-height: 1.5;
  scrollbar-width: thin;
}

.rm-toc__list a {
  display: block;
  padding: 6px 10px;
  border-radius: 10px;
  border-left: 2px solid transparent;
  color: var(--rm-text-2);
}

.rm-toc__list a:hover {
  color: var(--rm-primary-strong);
  background: var(--rm-primary-faint);
}

.rm-toc__list a.is-active {
  color: var(--rm-primary-strong);
  background: var(--rm-primary-faint);
  border-left-color: var(--rm-primary);
  font-weight: 600;
}

.rm-toc__list .is-h3 a {
  padding-left: 24px;
  font-size: .86rem;
}

.rm-toc__list .is-h4 a {
  padding-left: 38px;
  font-size: .84rem;
}

@media (max-height: 640px) {
  .rm-sidebar__sticky {
    position: static;
  }
}

@media (max-width: 960px) {
  .rm-sidebar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .rm-sidebar__sticky {
    position: static;
    display: contents;
  }

  .rm-widget--toc {
    display: none;
  }
}

@media (max-width: 640px) {
  .rm-sidebar {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
}

/* 头像 */
.rm-avatar {
  flex: none;
  display: inline-block;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--rm-primary-faint);
  vertical-align: middle;
}

/* ==========================================================================
   13. 页脚
   ========================================================================== */

.rm-footer {
  position: relative;
  padding: 0 0 26px;
  color: var(--rm-text-2);
  font-size: .88rem;
}

.rm-footer__wave {
  display: block;
  width: 100%;
  height: 22px;
  margin-bottom: -1px;
  color: var(--rm-primary-light);
  opacity: .7;
}

.rm-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 32px;
  padding: 22px 28px;
  border-radius: var(--rm-radius-lg);
}

.rm-footer__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.rm-footer__brand img {
  width: 40px;
  height: 40px;
  border-radius: 13px;
}

.rm-footer__title {
  margin: 0;
  color: var(--rm-text);
  font-family: var(--rm-font-round);
  font-weight: 800;
  font-size: 1rem;
}

.rm-footer__desc {
  margin: 0;
  color: var(--rm-text-3);
  font-size: .84rem;
}

.rm-footer__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  text-align: right;
}

.rm-footer__meta p {
  margin: 0;
}

.rm-footer a {
  color: var(--rm-text-2);
}

.rm-footer a:hover {
  color: var(--rm-primary-strong);
}

.rm-footer__heart {
  width: 14px;
  height: 14px;
  color: var(--rm-pink);
  fill: currentColor;
  vertical-align: -2px;
  animation: rm-beat 1.6s ease-in-out infinite;
}

@keyframes rm-beat {
  0%,
  60%,
  100% {
    transform: scale(1);
  }

  30% {
    transform: scale(1.2);
  }
}

.rm-dot {
  margin: 0 .45em;
  opacity: .5;
}

@media (max-width: 760px) {
  .rm-footer__inner {
    flex-direction: column;
    text-align: center;
    padding: 22px 18px;
  }

  .rm-footer__brand {
    flex-direction: column;
    gap: 6px;
  }

  .rm-footer__meta {
    align-items: center;
    text-align: center;
  }
}

/* ==========================================================================
   14. 悬浮按钮、搜索、灯箱
   ========================================================================== */

.rm-fab {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rm-fab__btn {
  position: relative;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 16px;
  color: var(--rm-primary-strong);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(.9);
  transition: opacity .3s var(--rm-ease), transform .3s var(--rm-ease), visibility 0s .3s, background-color .2s;
}

.rm-fab__btn.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .3s var(--rm-ease), transform .3s var(--rm-ease), background-color .2s;
}

.rm-fab__btn:hover {
  background: var(--rm-glass-strong);
}

.rm-fab__btn .rm-icon {
  width: 20px;
  height: 20px;
}

.rm-progress {
  position: absolute;
  inset: 4px;
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  transform: rotate(-90deg);
  pointer-events: none;
}

.rm-progress circle {
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
}

.rm-progress__track {
  stroke: var(--rm-primary-soft);
}

.rm-progress__bar {
  stroke: var(--rm-primary);
  transition: stroke-dashoffset .15s linear;
}

.rm-fab__toc {
  display: none;
}

@media (max-width: 960px) {
  .rm-fab__toc {
    display: grid;
  }
}

.rm-toc-sheet {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: calc(max(24px, env(safe-area-inset-bottom)) + 112px);
  z-index: 55;
  width: min(320px, calc(100vw - 40px));
  padding: 18px 16px;
  border-radius: 20px;
  background: var(--rm-glass-pop);
  box-shadow: var(--rm-shadow-hover), var(--rm-glass-highlight);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(.97);
  transform-origin: bottom right;
  transition: opacity .25s var(--rm-ease), transform .25s var(--rm-ease), visibility 0s .25s;
}

.rm-toc-sheet.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .25s var(--rm-ease), transform .25s var(--rm-ease);
}

.rm-toc-sheet .rm-toc__list {
  max-height: 52vh;
}

.rm-search {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 14vh 16px 16px;
}

.rm-search:target,
.rm-search.is-open {
  display: flex;
}

.rm-search__mask {
  position: absolute;
  inset: 0;
  background: rgba(30, 70, 120, .16);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  animation: rm-fade .2s ease-out;
}

:root[data-theme="dark"] .rm-search__mask {
  background: rgba(0, 0, 0, .4);
}

.rm-search__box {
  position: relative;
  width: min(620px, 100%);
  padding: 10px 10px 14px 18px;
  border-radius: 22px;
  background: var(--rm-glass-pop);
  animation: rm-pop .28s var(--rm-ease);
}

.rm-search__row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rm-search__row > .rm-icon {
  width: 22px;
  height: 22px;
  color: var(--rm-primary);
}

.rm-search__input {
  flex: 1;
  min-width: 0;
  height: 46px;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 1.1rem;
}

.rm-search__input::placeholder {
  color: var(--rm-text-3);
}

.rm-search__input::-webkit-search-cancel-button {
  display: none;
}

.rm-search__hint {
  margin: 4px 0 0;
  color: var(--rm-text-3);
  font-size: .8rem;
}

.rm-search__hint kbd {
  padding: 0 6px;
  border: 1px solid var(--rm-line-strong);
  border-radius: 6px;
  font-family: var(--rm-font-mono);
  font-size: .75rem;
}

.rm-lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(10, 24, 44, .62);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  cursor: zoom-out;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s, visibility 0s .25s;
}

.rm-lightbox.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity .25s;
}

.rm-lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
  transform: scale(.96);
  transition: transform .3s var(--rm-ease);
}

.rm-lightbox.is-open img {
  transform: none;
}

.rm-toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  z-index: 150;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100vw - 32px);
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--rm-glass-strong);
  color: var(--rm-text);
  font-size: .9rem;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s var(--rm-ease);
}

.rm-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.rm-toast .rm-icon {
  color: var(--rm-primary);
}

@keyframes rm-fade {
  from {
    opacity: 0;
  }
}

@keyframes rm-pop {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(.98);
  }
}

/* ==========================================================================
   15. 评论
   ========================================================================== */

.rm-comments {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.rm-comments__head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rm-comments__closed {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--rm-surface);
  color: var(--rm-text-3);
}

.rm-respond {
  scroll-margin-top: calc(var(--rm-header-h) + 40px);
}

.rm-comment-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rm-comment-form__login {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  color: var(--rm-text-2);
  font-size: .9rem;
}

.rm-comment-form__login .rm-avatar {
  width: 28px;
  height: 28px;
}

.rm-comment-form__logout {
  color: var(--rm-text-3);
  font-size: .85rem;
}

.rm-field {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}

.rm-field__icon {
  position: absolute;
  left: 14px;
  width: 17px;
  height: 17px;
  color: var(--rm-text-3);
  pointer-events: none;
  transition: color .2s;
}

.rm-field input,
.rm-field textarea {
  width: 100%;
  border: 1px solid var(--rm-line-strong);
  background: var(--rm-surface-hover);
  color: var(--rm-text);
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}

.rm-field input {
  height: 44px;
  padding: 0 14px 0 40px;
  border-radius: 14px;
}

.rm-field textarea {
  display: block;
  min-height: 124px;
  padding: 14px 16px;
  border-radius: 18px;
  line-height: 1.75;
  resize: vertical;
}

.rm-field input::placeholder,
.rm-field textarea::placeholder {
  color: var(--rm-text-3);
  opacity: 1;
}

.rm-field input:focus,
.rm-field textarea:focus {
  outline: none;
  border-color: var(--rm-primary);
  background: var(--rm-glass-strong);
  box-shadow: 0 0 0 4px var(--rm-primary-soft);
}

.rm-field:focus-within .rm-field__icon {
  color: var(--rm-primary-strong);
}

.rm-comment-form__fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.rm-comment-form__foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 16px;
}

.rm-comment-form__tip {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: -2px 0 0;
  color: var(--rm-text-3);
  font-size: .82rem;
}

.rm-comment-form__tip .rm-icon {
  width: 15px;
  height: 15px;
}

.rm-comment-form__foot .rm-btn--primary {
  margin-left: auto;
  min-width: 112px;
}

/* hCaptcha */
.rm-captcha {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 78px;
  max-width: 100%;
}

.rm-captcha__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 303px;
  max-width: 100%;
  height: 78px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px dashed var(--rm-line-strong);
  background: var(--rm-surface);
  color: var(--rm-text-3);
  font-size: .85rem;
  text-align: center;
}

.rm-captcha__placeholder .rm-icon {
  width: 20px;
  height: 20px;
  color: var(--rm-primary);
}

.rm-captcha.is-error .rm-captcha__placeholder {
  border-color: rgba(196, 54, 79, .4);
  color: var(--rm-danger);
}

.rm-captcha.is-error .rm-captcha__placeholder .rm-icon {
  color: var(--rm-danger);
}

.rm-captcha__retry {
  padding: 0;
  border: 0;
  background: none;
  color: var(--rm-primary-strong);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.rm-captcha__noscript {
  color: var(--rm-danger);
  font-size: .82rem;
}

.rm-captcha.is-ready {
  min-height: 0;
}

.rm-captcha.is-rendering .rm-captcha__placeholder {
  position: absolute;
  top: 0;
  left: 0;
}

.rm-captcha__widget {
  position: relative;
  z-index: 1;
}

.rm-captcha.is-compact .rm-captcha__placeholder {
  width: 164px;
  height: 144px;
  flex-direction: column;
}

.rm-captcha.is-shake {
  animation: rm-shake .5s ease-in-out;
}

@keyframes rm-shake {
  10%,
  90% {
    transform: translateX(-1px);
  }

  20%,
  80% {
    transform: translateX(2px);
  }

  30%,
  50%,
  70% {
    transform: translateX(-4px);
  }

  40%,
  60% {
    transform: translateX(4px);
  }
}

.rm-replying {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 6px;
  max-width: 100%;
  padding: 4px 5px 4px 12px;
  border-radius: 999px;
  background: var(--rm-primary-soft);
  color: var(--rm-primary-strong);
  font-size: .86rem;
}

.rm-replying b {
  font-weight: 700;
}

.rm-replying .rm-icon {
  width: 15px;
  height: 15px;
}

.rm-replying__cancel {
  padding: 1px 10px;
  border-radius: 999px;
  background: var(--rm-glass-strong);
  color: var(--rm-text-2);
  font-size: .8rem;
}

.rm-comment-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rm-comment__card {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--rm-surface);
  border: 1px solid var(--rm-line);
  transition: background-color .2s, box-shadow .3s;
}

.rm-comment__avatar {
  width: 44px;
  height: 44px;
  box-shadow: 0 0 0 2px var(--rm-glass-strong);
}

.rm-comment__main {
  flex: 1;
  min-width: 0;
}

.rm-comment__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 8px;
  line-height: 1.5;
}

.rm-comment__author {
  color: var(--rm-text);
  font-weight: 700;
  word-break: break-word;
}

.rm-comment__author a {
  color: inherit;
}

.rm-comment__author a:hover {
  color: var(--rm-primary-strong);
}

.rm-chip--owner {
  padding: 0 8px;
  border: 0;
  background: linear-gradient(180deg, var(--rm-primary-light), var(--rm-primary));
  color: var(--rm-primary-ink);
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.6;
}

.rm-comment__time {
  margin-left: auto;
  color: var(--rm-text-3);
  font-size: .8rem;
  white-space: nowrap;
}

.rm-comment__time:hover {
  color: var(--rm-primary-strong);
}

.rm-comment__waiting {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 6px 0 0;
  color: #b4365d;
  font-size: .82rem;
}

:root[data-theme="dark"] .rm-comment__waiting {
  color: #ffb5c9;
}

.rm-comment__waiting .rm-icon {
  width: 15px;
  height: 15px;
}

.rm-comment__content {
  margin-top: 6px;
}

.rm-comment__at {
  color: var(--rm-primary-strong);
  font-weight: 600;
}

.rm-comment__actions {
  display: flex;
  gap: 12px;
  margin-top: 6px;
}

.rm-comment__reply {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: -8px;
  padding: 2px 8px;
  border-radius: 8px;
  color: var(--rm-text-3);
  font-size: .82rem;
}

.rm-comment__reply:hover {
  color: var(--rm-primary-strong);
  background: var(--rm-primary-faint);
}

.rm-comment__reply .rm-icon {
  width: 15px;
  height: 15px;
}

.rm-comment__children {
  margin: 12px 0 0 26px;
  padding-left: 16px;
  border-left: 2px dashed var(--rm-line-strong);
}

.rm-comment__children .rm-comment-list {
  gap: 12px;
}

.rm-comment--child .rm-comment__card {
  padding: 12px 14px;
}

.rm-comment--child .rm-comment__avatar {
  width: 36px;
  height: 36px;
}

.rm-comment.is-owner > .rm-comment__card {
  border-color: var(--rm-primary-soft);
  background: linear-gradient(135deg, var(--rm-primary-faint), var(--rm-surface) 70%);
}

.rm-comment:target > .rm-comment__card,
.rm-comment.is-highlight > .rm-comment__card {
  box-shadow: 0 0 0 2px var(--rm-primary), 0 10px 26px -12px var(--rm-primary);
}

.rm-comments__pages {
  margin-top: -4px;
}

/* 评论正文：沿用正文排版，但更紧凑 */
.rm-prose--sm {
  font-size: .95rem;
  line-height: 1.8;
}

.rm-prose--sm p,
.rm-prose--sm ul,
.rm-prose--sm ol,
.rm-prose--sm blockquote {
  margin-bottom: .6em;
}

.rm-prose--sm pre {
  margin: .8em 0;
  font-size: .85em;
}

.rm-prose--sm img {
  max-height: 320px;
}

@media (max-width: 640px) {
  .rm-comment-form__fields {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .rm-comment__card {
    gap: 10px;
    padding: 14px;
  }

  .rm-comment__avatar {
    width: 36px;
    height: 36px;
  }

  .rm-comment--child .rm-comment__avatar {
    width: 30px;
    height: 30px;
  }

  .rm-comment__children {
    margin-left: 6px;
    padding-left: 10px;
  }

  .rm-comment__time {
    margin-left: 0;
    width: 100%;
  }
}

/* ==========================================================================
   16. 友情链接
   ========================================================================== */

.rm-page-head {
  margin-bottom: 26px;
}

.rm-links-group + .rm-links-group {
  margin-top: 28px;
}

.rm-links-group__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 1.08rem;
  font-weight: 700;
}

.rm-links-group__title .rm-sparkle {
  width: 16px;
  height: 16px;
  vertical-align: 0;
}

.rm-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rm-link-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 100%;
  padding: 14px 16px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--rm-line);
  background: var(--rm-surface);
  color: var(--rm-text);
  transition: transform .3s var(--rm-ease), box-shadow .3s var(--rm-ease), border-color .3s;
}

/* 悬停时右上角冒出一颗泡泡 */
.rm-link-card::after {
  content: "";
  position: absolute;
  top: -20px;
  right: -20px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 32%, rgba(255, 255, 255, .95) 0 10%, var(--rm-primary-soft) 60%, transparent 72%);
  opacity: 0;
  transform: scale(.5);
  transition: opacity .35s var(--rm-ease), transform .45s var(--rm-ease);
  pointer-events: none;
}

.rm-link-card:hover {
  color: var(--rm-text);
  transform: translateY(-3px);
  border-color: var(--rm-primary-soft);
  box-shadow: 0 14px 30px -16px var(--rm-primary);
}

.rm-link-card:hover::after {
  opacity: 1;
  transform: scale(1);
}

.rm-link-card__avatar {
  position: relative;
  flex: none;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: hsl(var(--hue, 205), 75%, 89%);
  color: hsl(var(--hue, 205), 45%, 32%);
  font-family: var(--rm-font-round);
  font-size: 1.25rem;
  font-weight: 800;
  box-shadow: 0 0 0 3px var(--rm-glass-strong);
  transition: transform .5s var(--rm-ease);
}

:root[data-theme="dark"] .rm-link-card__avatar {
  background: hsla(var(--hue, 205), 75%, 75%, .16);
  color: hsl(var(--hue, 205), 85%, 84%);
}

.rm-link-card__avatar::before {
  content: attr(data-letter);
}

.rm-link-card__avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--rm-glass-strong);
}

.rm-link-card:hover .rm-link-card__avatar {
  transform: rotate(-8deg) scale(1.06);
}

.rm-link-card__body {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rm-link-card__name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 700;
}

.rm-link-card__desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--rm-text-3);
  font-size: .84rem;
  line-height: 1.55;
}

.rm-links-note {
  margin-top: 30px;
  padding: 18px 22px;
  border-radius: 18px;
  background: var(--rm-surface);
  border: 1px solid var(--rm-line);
  font-size: .97rem;
}

.rm-link-self {
  margin-top: 30px;
}

.rm-link-self__card {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 14px;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px dashed var(--rm-primary-light);
  background: var(--rm-primary-faint);
}

.rm-link-self__card .rm-avatar {
  width: 60px;
  height: 60px;
  box-shadow: 0 0 0 3px var(--rm-glass-strong);
}

.rm-link-self__list {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 3px;
  margin: 0;
  font-size: .9rem;
  line-height: 1.6;
}

.rm-link-self__list div {
  display: flex;
  gap: 12px;
}

.rm-link-self__list dt {
  flex: none;
  color: var(--rm-text-3);
}

.rm-link-self__list dd {
  min-width: 0;
  margin: 0;
  color: var(--rm-text);
  word-break: break-all;
}

.rm-link-self__card .rm-btn {
  flex: none;
}

@media (max-width: 640px) {
  .rm-links {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .rm-link-self__card {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .rm-link-self__card .rm-btn {
    width: 100%;
  }
}

/* ==========================================================================
   17. 留言板
   ========================================================================== */

.rm-guestbook-hero {
  align-items: center;
}

.rm-guestbook-hero__intro {
  margin-top: 4px;
  color: var(--rm-text-2);
  font-size: 1rem;
}

.rm-guestbook-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.rm-guestbook-stats li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--rm-primary-faint);
  border: 1px solid var(--rm-primary-soft);
  color: var(--rm-text-2);
  font-size: .85rem;
}

.rm-guestbook-stats .rm-icon {
  width: 15px;
  height: 15px;
  color: var(--rm-primary);
}

.rm-guestbook-stats strong {
  color: var(--rm-primary-strong);
  font-family: var(--rm-font-round);
}

.rm-comment__floor {
  color: var(--rm-text-3);
  font-family: var(--rm-font-mono);
  font-size: .76rem;
}

/* 留言卡片像便签一样轮换几种淡淡的颜色 */
.is-guestbook .rm-comment-list > .rm-comment--parent > .rm-comment__card {
  --rm-note: var(--rm-primary);
  background: linear-gradient(135deg, color-mix(in srgb, var(--rm-note) 9%, transparent), var(--rm-surface) 65%);
  border-top: 3px solid color-mix(in srgb, var(--rm-note) 45%, transparent);
}

.is-guestbook .rm-comment-list > .rm-comment--parent:nth-child(4n+2) > .rm-comment__card {
  --rm-note: var(--rm-pink);
}

.is-guestbook .rm-comment-list > .rm-comment--parent:nth-child(4n+3) > .rm-comment__card {
  --rm-note: var(--rm-mint);
}

.is-guestbook .rm-comment-list > .rm-comment--parent:nth-child(4n+4) > .rm-comment__card {
  --rm-note: var(--rm-lilac);
}

.is-guestbook .rm-comment.is-owner > .rm-comment__card {
  --rm-note: var(--rm-primary);
}

/* 留言板插画里的信纸与爱心 */
.rm-art__letter {
  fill: #fff7d9;
  stroke: var(--rm-primary-strong);
  stroke-width: .35;
}

:root[data-theme="dark"] .rm-art__letter {
  fill: rgba(255, 240, 200, .85);
}

.rm-art__letter-lines {
  fill: none;
  stroke: var(--rm-primary-light);
  stroke-width: .45;
  stroke-linecap: round;
}

.rm-art__seal,
.rm-art__heart {
  fill: var(--rm-pink);
}

.rm-art__heart {
  transform-box: fill-box;
  transform-origin: center;
  animation: rm-float 4.2s ease-in-out infinite;
}

.rm-art__heart--sm {
  animation-delay: 1.6s;
}

@keyframes rm-float {
  0%,
  100% {
    transform: translateY(0) rotate(-6deg);
  }

  50% {
    transform: translateY(-8px) rotate(6deg);
  }
}

/* ==========================================================================
   18. 归档时间线
   ========================================================================== */

.rm-archives-intro {
  margin-bottom: 24px;
}

.rm-timeline__year + .rm-timeline__year {
  margin-top: 28px;
}

.rm-timeline__year-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font-family: var(--rm-font-round);
  font-size: 1.7rem;
  font-weight: 900;
  line-height: 1.3;
}

.rm-timeline__year-title > span:first-child {
  background: linear-gradient(135deg, var(--rm-primary), var(--rm-primary-strong));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.rm-timeline__month {
  position: relative;
  margin-left: 9px;
  padding: 0 0 16px 26px;
  border-left: 2px dashed var(--rm-line-strong);
}

.rm-timeline__month:last-child {
  padding-bottom: 4px;
}

/* 每个月份前是一颗汽水泡泡 */
.rm-timeline__month::before {
  content: "";
  position: absolute;
  top: 6px;
  left: -8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 30%, rgba(255, 255, 255, .95) 0 18%, transparent 20%),
    linear-gradient(160deg, var(--rm-primary-light), var(--rm-primary));
  box-shadow: 0 0 0 4px var(--rm-primary-faint);
}

.rm-timeline__month-title {
  margin: 0 0 4px;
  color: var(--rm-text-3);
  font-size: .9rem;
  font-weight: 700;
}

.rm-timeline__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rm-timeline__item {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-left: -10px;
  padding: 7px 10px;
  border-radius: 12px;
  transition: background-color .2s;
}

.rm-timeline__item:hover {
  background: var(--rm-primary-faint);
}

.rm-timeline__item time {
  flex: none;
  color: var(--rm-text-3);
  font-family: var(--rm-font-mono);
  font-size: .82rem;
}

.rm-timeline__item a {
  min-width: 0;
  color: var(--rm-text);
  word-break: break-word;
}

.rm-timeline__item a:hover {
  color: var(--rm-primary-strong);
}

.rm-timeline__comments {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
  color: var(--rm-text-3);
  font-size: .8rem;
}

.rm-timeline__comments .rm-icon {
  width: 14px;
  height: 14px;
}

.rm-archives-tags {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px dashed var(--rm-line-strong);
}

.rm-archives-tags .rm-tag-cloud {
  margin-top: 14px;
}

.rm-archives-tags small {
  opacity: .7;
}

/* ==========================================================================
   19. 404
   ========================================================================== */

.rm-notfound {
  max-width: 560px;
  margin: 4vh auto 0;
  padding: 44px 32px 40px;
  text-align: center;
}

.rm-notfound__art {
  width: 220px;
  max-width: 70%;
  margin: 0 auto 8px;
}

.rm-notfound__art svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.rm-notfound__code {
  margin: 0;
  font-family: var(--rm-font-round);
  font-size: 3.4rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: .06em;
  background: linear-gradient(135deg, var(--rm-primary-light), var(--rm-primary-strong));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.rm-notfound__title {
  margin: 6px 0 6px;
  font-size: 1.3rem;
}

.rm-notfound__desc {
  margin: 0 0 24px;
  color: var(--rm-text-2);
}

.rm-notfound__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* ==========================================================================
   20. 宽屏适配
   ========================================================================== */

/* 阅读侧栏（文章页左侧的返回按钮与目录），只在宽屏三栏布局中出现 */
.rm-rail {
  display: none;
}

.rm-rail__sticky {
  position: sticky;
  top: calc(var(--rm-header-h) + 28px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
}

.rm-rail__toc {
  width: 100%;
}

.rm-rail__title {
  margin: 0 0 10px;
  padding-left: 16px;
  color: var(--rm-text-3);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .2em;
}

.rm-rail .rm-toc__list {
  max-height: calc(100vh - var(--rm-header-h) - 220px);
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--rm-line);
}

.rm-rail .rm-toc__list a {
  margin-left: -2px;
  padding: 6px 10px 6px 16px;
  border-radius: 0 10px 10px 0;
  font-size: .88rem;
}

.rm-rail .rm-toc__list .is-h3 a {
  padding-left: 28px;
}

.rm-rail .rm-toc__list .is-h4 a {
  padding-left: 40px;
}

@media (min-width: 1440px) {
  :root {
    --rm-container: 1320px;
    --rm-gap: 28px;
  }

  /* 首页 / 归档列表：双列卡片，封面在上 */
  .rm-post-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

  .rm-post-card {
    flex-direction: column;
    gap: 0;
    padding: 0;
    overflow: hidden;
  }

  .rm-post-card__cover,
  .rm-post-card__cover.is-placeholder {
    display: block;
    order: 0;
    flex: none;
    max-width: none;
    min-height: 0;
    aspect-ratio: 16 / 9;
    border-radius: 0;
  }

  .rm-post-card__body {
    padding: 20px 24px 22px;
  }

  .rm-post-card__title {
    margin-top: 10px;
  }

  /* 数量为奇数时，最后一张卡片占满一整行，恢复左右排版 */
  .rm-post-list > .rm-post-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    flex-direction: row;
    gap: 26px;
    padding: 24px 26px;
  }

  .rm-post-list > .rm-post-card:last-child:nth-child(odd) .rm-post-card__cover {
    order: 2;
    flex: 0 0 38%;
    max-width: 440px;
    min-height: 210px;
    aspect-ratio: auto;
    border-radius: 16px;
  }

  .rm-post-list > .rm-post-card:last-child:nth-child(odd) .rm-post-card__body {
    padding: 0;
  }

  .rm-layout--single {
    max-width: 960px;
  }

  .rm-layout--links {
    max-width: 1120px;
  }
}

@media (min-width: 1680px) {
  :root {
    --rm-container: 1480px;
    --rm-sidebar: 320px;
    --rm-gap: 32px;
  }

  /* 文章页三栏：阅读侧栏 · 正文 · 侧边栏 */
  .rm-layout--post {
    grid-template-columns: var(--rm-rail) minmax(0, 1fr) var(--rm-sidebar);
  }

  .rm-layout--post .rm-rail {
    display: block;
    min-width: 0;
    align-self: stretch;
  }

  .rm-layout--post .rm-widget--toc,
  .rm-layout--post .rm-article__topbar .rm-back,
  .rm-fab__back {
    display: none !important;
  }

  .rm-article {
    padding-left: 56px;
    padding-right: 56px;
  }
}

@media (min-width: 1920px) {
  :root {
    --rm-container: 1600px;
    --rm-sidebar: 330px;
    --rm-rail: 210px;
    --rm-measure: 820px;
  }

  .rm-article .rm-prose {
    font-size: 1.125rem;
  }
}

@media (min-width: 2400px) {
  :root {
    --rm-container: 1760px;
    --rm-sidebar: 340px;
    --rm-rail: 230px;
    --rm-measure: 860px;
  }
}

/* ==========================================================================
   21. 页面切换与入场动画
   ========================================================================== */

/*
 * 页面切换使用跨文档 View Transitions（@view-transition 写在 header.php 中，可在设置里关闭）：
 * - 整页使用同一条缓动曲线交叉淡化，新旧两页完全相同的页头与背景因此保持静止；
 * - 文章标题与封面从列表卡片衔接到正文（后退时再飞回去）；
 * - 新页面的内容依次轻轻浮现（入场动画在不支持 View Transitions 的浏览器里同样生效）。
 * 毛玻璃元素不单独截图，避免截图里丢失 backdrop-filter 的效果。
 */

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: .36s;
  animation-timing-function: cubic-bezier(.4, 0, .2, 1);
}

::view-transition-group(rm-vt-title),
::view-transition-group(rm-vt-cover) {
  animation-duration: .64s;
  animation-timing-function: cubic-bezier(.32, .72, 0, 1);
}

::view-transition-group(rm-vt-cover) {
  overflow: clip;
  border-radius: 18px;
}

/* 标题：旧文字先淡出，新文字随后淡入，避免两行字叠在一起 */
::view-transition-old(rm-vt-title) {
  animation: rm-vt-out .2s cubic-bezier(.4, 0, 1, 1) both;
  mix-blend-mode: normal;
}

::view-transition-new(rm-vt-title) {
  animation: rm-vt-in .38s cubic-bezier(0, 0, .2, 1) .12s both;
  mix-blend-mode: normal;
}

/* 封面：宽高比不同也始终铺满，不会被拉伸 */
::view-transition-old(rm-vt-cover),
::view-transition-new(rm-vt-cover) {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation-duration: .64s;
  animation-timing-function: cubic-bezier(.32, .72, 0, 1);
}

@keyframes rm-vt-out {
  to {
    opacity: 0;
  }
}

@keyframes rm-vt-in {
  from {
    opacity: 0;
  }
}

@keyframes rm-enter {
  from {
    opacity: 0;
    transform: translate3d(0, 18px, 0) scale(.985);
  }
}

@keyframes rm-enter-back {
  from {
    opacity: 0;
    transform: translate3d(0, -14px, 0) scale(.99);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .rm-motion .rm-content > :not(.rm-post-list),
  .rm-motion .rm-post-list > *,
  .rm-motion .rm-sidebar > :not(.rm-sidebar__sticky),
  .rm-motion .rm-sidebar__sticky > *,
  .rm-motion .rm-rail__sticky > * {
    animation: rm-enter .82s cubic-bezier(.22, 1, .36, 1) backwards;
    animation-delay: calc(var(--rm-stagger, 0) * 50ms + 20ms);
  }

  .rm-motion.rm-nav-back .rm-content > :not(.rm-post-list),
  .rm-motion.rm-nav-back .rm-post-list > *,
  .rm-motion.rm-nav-back .rm-sidebar > :not(.rm-sidebar__sticky),
  .rm-motion.rm-nav-back .rm-sidebar__sticky > *,
  .rm-motion.rm-nav-back .rm-rail__sticky > * {
    animation-name: rm-enter-back;
  }

  /* 依次浮现：内容区先、侧边栏稍后 */
  .rm-content > :nth-child(2) {
    --rm-stagger: 1;
  }

  .rm-content > :nth-child(3) {
    --rm-stagger: 2;
  }

  .rm-content > :nth-child(n+4) {
    --rm-stagger: 3;
  }

  .rm-post-list > :nth-child(1) {
    --rm-stagger: 1;
  }

  .rm-post-list > :nth-child(2) {
    --rm-stagger: 2;
  }

  .rm-post-list > :nth-child(3) {
    --rm-stagger: 3;
  }

  .rm-post-list > :nth-child(4) {
    --rm-stagger: 4;
  }

  .rm-post-list > :nth-child(5) {
    --rm-stagger: 5;
  }

  .rm-post-list > :nth-child(n+6) {
    --rm-stagger: 6;
  }

  .rm-sidebar > :nth-child(1) {
    --rm-stagger: 2;
  }

  .rm-sidebar > :nth-child(2) {
    --rm-stagger: 3;
  }

  .rm-sidebar > :nth-child(3) {
    --rm-stagger: 4;
  }

  .rm-sidebar > :nth-child(n+4) {
    --rm-stagger: 5;
  }

  .rm-sidebar__sticky > :nth-child(1) {
    --rm-stagger: 4;
  }

  .rm-sidebar__sticky > :nth-child(n+2) {
    --rm-stagger: 5;
  }

  .rm-rail__sticky > :nth-child(1) {
    --rm-stagger: 1;
  }

  .rm-rail__sticky > :nth-child(n+2) {
    --rm-stagger: 2;
  }

  /* 标题与封面衔接时，文章面板保持不动，面板里的其它内容轻轻浮上来 */
  .rm-motion.rm-vt-morph .rm-content > .rm-article {
    animation: none;
  }

  .rm-motion.rm-vt-morph .rm-article__topbar,
  .rm-motion.rm-vt-morph .rm-article__meta,
  .rm-motion.rm-vt-morph .rm-article__body,
  .rm-motion.rm-vt-morph .rm-article__foot {
    animation: rm-enter .82s cubic-bezier(.22, 1, .36, 1) .12s backwards;
  }

  /* 后退时标题要飞回的那张卡片不做入场动画 */
  .rm-motion .rm-vt-target {
    animation: none !important;
  }
}

/* ==========================================================================
   22. 动效偏好与打印
   ========================================================================== */

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

  .rm-bubbles {
    display: none;
  }
}

@media print {
  .rm-backdrop,
  .rm-header,
  .rm-sidebar,
  .rm-footer,
  .rm-fab,
  .rm-toc-sheet,
  .rm-rail,
  .rm-back,
  .rm-post-nav,
  .rm-comments,
  .rm-code__bar {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .rm-layout {
    display: block;
  }

  .rm-panel,
  .rm-glass {
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    padding: 0 !important;
  }

  .rm-prose a::after {
    content: " (" attr(href) ")";
    font-size: .85em;
    color: #555;
  }
}
