.top-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 38px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(238, 229, 215, 0.72);
  font: inherit;
  font-size: 14px;
  letter-spacing: 0.04em;
}

.article-mode .top-back {
  color: #6b521b;
}

.site-bottom-nav {
  /* 液态玻璃：深色内容下的默认配色（浅色文字 + 深玻璃） */
  --nav-edge-line: rgba(246, 225, 160, 0.24);
  --nav-edge-top: rgba(255, 255, 255, 0.34);
  --nav-edge-bottom: rgba(255, 255, 255, 0.06);
  --nav-fg: rgba(248, 243, 234, 0.96);
  --nav-fg-muted: rgba(240, 232, 219, 0.84);
  --nav-active-fg: #f7d97a;
  --nav-active-bg: rgba(242, 202, 80, 0.2);
  --nav-tint-top: rgba(34, 29, 18, 0.34);
  --nav-tint-bottom: rgba(12, 9, 6, 0.46);
  --nav-sheen: rgba(255, 255, 255, 0.26);
  --nav-sheen-side: rgba(255, 255, 255, 0.12);
  --nav-glare: rgba(255, 255, 255, 0.24);
  --nav-shadow: rgba(0, 0, 0, 0.34);
  --nav-brightness: 1.06;
  /* -1 ~ 1，由 site-nav.js 按滚动进度写入，驱动边缘高光位移 */
  --glass-shift: 0;

  position: fixed;
  right: max(12px, calc((100vw - 448px) / 2 + 12px));
  bottom: 14px;
  left: max(12px, calc((100vw - 448px) / 2 + 12px));
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  padding: 7px;
  border: 1px solid var(--nav-edge-line);
  border-radius: 24px;
  background: linear-gradient(180deg, var(--nav-tint-top), var(--nav-tint-bottom));
  box-shadow:
    0 18px 40px var(--nav-shadow),
    inset 0 1px 0 var(--nav-edge-top),
    inset 0 -1px 0 var(--nav-edge-bottom);
  color: var(--nav-fg-muted);
  isolation: isolate;
  overflow: hidden;
  transform: translateZ(0);
  backdrop-filter: blur(26px) saturate(190%) brightness(var(--nav-brightness));
  -webkit-backdrop-filter: blur(26px) saturate(190%) brightness(var(--nav-brightness));
}

/* 玻璃边缘的折射感：上沿一圈亮边、左右收边、下沿极弱 */
.site-bottom-nav::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(130% 120% at 50% -34%, var(--nav-sheen), transparent 62%),
    linear-gradient(90deg, var(--nav-sheen-side), transparent 16%, transparent 84%, var(--nav-sheen-side)),
    linear-gradient(0deg, var(--nav-glare), transparent 26%);
  mix-blend-mode: screen;
  opacity: 0.85;
}

/* 随滚动左右位移的高光带 */
.site-bottom-nav::after {
  content: "";
  position: absolute;
  top: -60%;
  bottom: -60%;
  left: 0;
  width: 62%;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(closest-side, var(--nav-glare), transparent 72%);
  mix-blend-mode: screen;
  opacity: 0.6;
  transform: translate3d(calc((var(--glass-shift) + 1) * 46%), 0, 0) rotate(6deg);
  transition: transform 90ms linear;
}

.site-bottom-nav > * {
  position: relative;
  z-index: 1;
}

/* 浅色内容下的配色（深色文字 + 浅玻璃），由 site-nav.js 按背后亮度切换 */
.site-bottom-nav.is-glass-light {
  --nav-edge-line: rgba(255, 255, 255, 0.8);
  --nav-edge-top: rgba(255, 255, 255, 0.9);
  --nav-edge-bottom: rgba(120, 95, 40, 0.12);
  --nav-fg: rgba(28, 22, 13, 0.97);
  --nav-fg-muted: rgba(56, 45, 29, 0.82);
  --nav-active-fg: #63491a;
  --nav-active-bg: rgba(212, 175, 55, 0.3);
  --nav-tint-top: rgba(255, 253, 247, 0.8);
  --nav-tint-bottom: rgba(243, 236, 222, 0.9);
  --nav-sheen: rgba(255, 255, 255, 0.55);
  --nav-sheen-side: rgba(255, 255, 255, 0.4);
  --nav-glare: rgba(255, 255, 255, 0.5);
  --nav-shadow: rgba(70, 47, 12, 0.18);
  --nav-brightness: 1.02;
}

/* 不支持背景模糊时退回接近实色，保证可读性 */
@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
  .site-bottom-nav {
    background: rgba(20, 17, 10, 0.95);
  }

  .site-bottom-nav.is-glass-light {
    background: rgba(247, 241, 229, 0.97);
  }
}

@media (prefers-reduced-transparency: reduce) {
  .site-bottom-nav {
    background: rgba(20, 17, 10, 0.95);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .site-bottom-nav.is-glass-light {
    background: rgba(247, 241, 229, 0.97);
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-bottom-nav::after {
    transform: none;
    transition: none;
  }
}

.site-bottom-nav-item {
  display: grid;
  min-width: 0;
  min-height: 54px;
  padding: 6px 0 5px;
  place-items: center;
  gap: 3px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: var(--nav-fg-muted);
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease;
}

.site-bottom-nav-item:hover,
.site-bottom-nav-item:focus-visible {
  color: var(--nav-fg);
}

.site-bottom-nav-item.is-active,
.site-bottom-nav-item:active {
  background: var(--nav-active-bg);
  color: var(--nav-active-fg);
}

.site-bottom-nav-item svg {
  width: 20px;
  height: 20px;
}
