/* ============================================================================
   EVENT HORIZON — style.css
   模块职责：全站唯一样式表。
   覆盖：设计变量 / reset / 固定层叠背景（canvas·vignette·grain）/ 毛玻璃
   header / 首页 Hero / 文章列表 / 文章页排版 / TOC 侧栏 / 滚动进度 /
   TUNE 参数面板 / Intro 逐字动画 / shot-mode / WebGL 降级（eh-fallback ·
   signal-lost）/ selection · scrollbar / 响应式 / prefers-reduced-motion。
   依赖公共 DOM 契约中的全部 id/class 命名；零外部资源（字体为系统栈，
   噪点为内联 SVG data-URI）。
   ============================================================================ */


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

:root {
  /* 色板 —— 低饱和暖调暗黑 */
  --bg-void: #050507;
  --bg-elevated: #0C0C10;
  --text-primary: #E8E8EC;
  --text-secondary: #8A8A94;
  --text-faint: #4A4A52;
  --accent: #FF9F43;
  --accent-hot: #FFD9A0;
  --accent-cold: #5B8DEF;
  --border-subtle: rgba(255, 255, 255, 0.06);

  /* 字体栈 —— 纯系统回退，不引 CDN */
  --font-body: "Inter", "Noto Sans SC", -apple-system, "PingFang SC",
    "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Consolas, "Courier New", monospace;
  --font-display: "Space Grotesk", "Inter", "Noto Sans SC", -apple-system,
    sans-serif;

  /* 层叠契约：canvas 0 / vignette 1 / grain 2 / content 5 / toc 8 /
     header 10 / progress 20 / console 30 */
  --z-canvas: 0;
  --z-vignette: 1;
  --z-grain: 2;
  --z-content: 5;
  --z-toc: 8;
  --z-header: 10;
  --z-progress: 20;
  --z-console: 30;
  --z-signal: 40;
  --z-intro: 100;

  /* 尺寸 */
  --header-h: 64px;
  --content-max: 680px;
  --radius-card: 12px;
  --radius-pill: 999px;

  /* 动效 */
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur-fast: 200ms;
  --dur-med: 400ms;
}


/* ---------------------------------------------------------------------------
   2. Reset
   --------------------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  background: var(--bg-void);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

input {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

::selection {
  background: var(--accent);
  color: var(--bg-void);
}

:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}

/* 滚动条 —— 细、暗、 hover 微亮 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-void);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.16);
}

html {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.08) var(--bg-void);
}


/* ---------------------------------------------------------------------------
   3. 固定层叠背景：canvas / vignette / grain
   --------------------------------------------------------------------------- */

#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-canvas);
  pointer-events: none;
  background: var(--bg-void);
}

/* 径向暗角 —— 中心通透、四周沉入虚空 */
#vignette-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-vignette);
  pointer-events: none;
  background: radial-gradient(
    ellipse 90% 75% at 50% 42%,
    transparent 40%,
    rgba(5, 5, 7, 0.38) 74%,
    rgba(5, 5, 7, 0.82) 100%
  );
}

/* 胶片噪点 —— 内联 SVG feTurbulence，opacity 0.03 */
#grain-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n' x='0' y='0' width='100%25' height='100%25'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 240px 240px;
  background-repeat: repeat;
}


/* ---------------------------------------------------------------------------
   4. 毛玻璃 Header
   --------------------------------------------------------------------------- */

#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  border-bottom: 1px solid transparent;
  transition: background var(--dur-med) var(--ease-out),
    border-color var(--dur-med) var(--ease-out),
    backdrop-filter var(--dur-med) var(--ease-out);
}

#site-header.scrolled {
  background: rgba(12, 12, 16, 0.72);
  border-bottom-color: var(--border-subtle);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  backdrop-filter: blur(12px) saturate(1.2);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  #site-header.scrolled {
    background: rgba(12, 12, 16, 0.94);
  }
}

#site-header .brand {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--text-primary);
  transition: color var(--dur-fast) var(--ease-out);
  white-space: nowrap;
}

#site-header .brand:hover {
  color: var(--accent-hot);
}

#site-header .site-nav {
  display: flex;
  gap: 28px;
}

#site-header .site-nav a {
  position: relative;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--text-secondary);
  padding: 6px 2px;
  transition: color var(--dur-fast) var(--ease-out);
}

#site-header .site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--dur-fast) var(--ease-out);
}

#site-header .site-nav a:hover {
  color: var(--text-primary);
}

#site-header .site-nav a:hover::after,
#site-header .site-nav a.active::after,
#site-header .site-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

#site-header .site-nav a.active,
#site-header .site-nav a[aria-current="page"] {
  color: var(--accent);
}


/* ---------------------------------------------------------------------------
   5. 内容层
   --------------------------------------------------------------------------- */

#content {
  position: relative;
  z-index: var(--z-content);
  min-height: 100vh;
}


/* ---------------------------------------------------------------------------
   6. 首页 Hero —— 巨型 display 排版
   --------------------------------------------------------------------------- */

#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px;
  position: relative;
}

#hero .hero-kicker,
#hero .kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 28px;
}

#hero .hero-title,
#hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 7.5rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  text-shadow: 0 0 80px rgba(255, 159, 67, 0.12);
  margin-bottom: 24px;
}

#hero .hero-title .accent,
#hero h1 .accent {
  color: var(--accent);
}

#hero .hero-subtitle,
#hero .subtitle,
#hero > p {
  max-width: 520px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--text-secondary);
}

#hero .hero-meta,
#hero .meta {
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--text-faint);
}

/* 底部 scroll-hint —— 呼吸动画 */
#hero .scroll-hint,
.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.4em;
  color: var(--text-faint);
  animation: eh-breathe 2.4s ease-in-out infinite;
}

.scroll-hint::after {
  content: "";
  width: 1px;
  height: 42px;
  background: linear-gradient(
    to bottom,
    var(--text-faint),
    transparent
  );
}

@keyframes eh-breathe {
  0%,
  100% {
    opacity: 0.35;
    transform: translateX(-50%) translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateX(-50%) translateY(6px);
  }
}


/* ---------------------------------------------------------------------------
   7. 分类过滤器
   --------------------------------------------------------------------------- */

#category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 24px 24px 8px;
}

#category-filter .cat-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 7px 16px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  background: transparent;
  transition: color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    background var(--dur-fast) var(--ease-out);
}

#category-filter .cat-btn:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.18);
}

#category-filter .cat-btn.active {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(255, 159, 67, 0.08);
}


/* ---------------------------------------------------------------------------
   8. 文章列表 —— 纯文字 · 左 mono 日期 / 中标题 / 右胶囊分类
   --------------------------------------------------------------------------- */

#post-list {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 16px 24px 120px;
}

#post-list .post-row {
  border-bottom: 1px solid var(--border-subtle);
}

#post-list .post-row:first-child {
  border-top: 1px solid var(--border-subtle);
}

#post-list .post-row a {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 24px;
  padding: 22px 12px;
  transition: transform var(--dur-fast) var(--ease-out);
}

/* accent 左竖线 —— 默认收起，hover 展开 */
#post-list .post-row a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 2px;
  height: 60%;
  background: var(--accent);
  border-radius: 1px;
  transform: translateY(-50%) scaleY(0);
  transform-origin: center;
  transition: transform var(--dur-fast) var(--ease-out);
}

#post-list .post-row a:hover {
  transform: translateX(4px);
}

#post-list .post-row a:hover::before {
  transform: translateY(-50%) scaleY(1);
}

#post-list .post-row a:hover .post-title {
  color: var(--accent-hot);
}

#post-list .post-date {
  flex: 0 0 92px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  white-space: nowrap;
}

#post-list .post-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--dur-fast) var(--ease-out);
}

#post-list .post-cat {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--text-secondary);
  padding: 3px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

/* 空列表提示（若 JS 渲染 empty 态） */
#post-list .post-empty {
  padding: 80px 12px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--text-faint);
}


/* ---------------------------------------------------------------------------
   9. 文章页排版 —— 680px 居中 · 17px / 1.8
   --------------------------------------------------------------------------- */

#article {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: calc(var(--header-h) + 72px) 24px 140px;
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-primary);
}

/* 文章头部（标题/日期/标签由 ui.js 或 HTML 产出，给出通用兜底样式） */
#article .article-head {
  margin-bottom: 56px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border-subtle);
}

#article .article-head .article-title,
#article > h1:first-child {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.01em;
  margin-bottom: 16px;
}

#article .article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--text-faint);
}

#article .article-meta .article-cat {
  color: var(--accent);
}

#article .article-meta .tag {
  padding: 2px 10px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-size: 10px;
  color: var(--text-secondary);
}

/* Markdown 渲染流式排版 */
#article p {
  margin: 0 0 1.6em;
  color: rgba(232, 232, 236, 0.88);
}

#article h1,
#article h2,
#article h3,
#article h4 {
  font-family: var(--font-display);
  color: var(--text-primary);
  scroll-margin-top: calc(var(--header-h) + 24px);
}

#article h1 {
  font-size: 32px;
  line-height: 1.3;
  margin: 2.2em 0 0.9em;
}

#article h2 {
  font-size: 24px;
  line-height: 1.35;
  margin: 2.4em 0 0.9em;
  padding-top: 0.4em;
}

#article h2::before {
  content: "§ ";
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.72em;
  font-weight: 400;
}

#article h3 {
  font-size: 20px;
  line-height: 1.4;
  margin: 2em 0 0.7em;
}

#article h4 {
  font-size: 17px;
  line-height: 1.45;
  margin: 1.8em 0 0.6em;
  color: var(--text-secondary);
}

#article strong {
  color: var(--text-primary);
  font-weight: 600;
}

#article em {
  color: var(--accent-hot);
  font-style: italic;
}

#article a {
  color: var(--accent);
  border-bottom: 1px solid rgba(255, 159, 67, 0.32);
  transition: color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out);
}

#article a:hover {
  color: var(--accent-hot);
  border-bottom-color: var(--accent-hot);
}

/* 列表 */
#article ul,
#article ol {
  margin: 0 0 1.6em;
  padding-left: 1.4em;
}

#article ul li,
#article ol li {
  margin-bottom: 0.5em;
  color: rgba(232, 232, 236, 0.88);
}

#article ul {
  list-style: none;
}

#article ul li {
  position: relative;
}

#article ul li::before {
  content: "";
  position: absolute;
  left: -1.1em;
  top: 0.72em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
}

#article ol {
  list-style: decimal;
}

#article ol li::marker {
  font-family: var(--font-mono);
  font-size: 0.82em;
  color: var(--accent);
}

/* 引用块 —— 2px accent 左竖线 */
#article blockquote {
  margin: 0 0 1.6em;
  padding: 4px 0 4px 20px;
  border-left: 2px solid var(--accent);
  color: var(--text-secondary);
  font-style: italic;
}

#article blockquote p {
  color: inherit;
  margin-bottom: 0.6em;
}

#article blockquote p:last-child {
  margin-bottom: 0;
}

/* 分隔线 */
#article hr {
  border: none;
  height: 1px;
  margin: 3em auto;
  width: 64px;
  background: linear-gradient(
    to right,
    transparent,
    var(--text-faint),
    transparent
  );
}

/* 行内代码 */
#article code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  color: var(--accent-hot);
  background: rgba(255, 217, 160, 0.07);
  padding: 2px 6px;
  border-radius: 4px;
}

/* 代码块 —— --bg-elevated + 左上语言标签 */
#article .code-block {
  position: relative;
  margin: 0 0 1.8em;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  overflow: hidden;
}

#article .code-block .code-lang {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-right: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  border-bottom-right-radius: 8px;
}

#article .code-block pre {
  margin: 0;
  padding: 40px 20px 18px;
  overflow-x: auto;
}

#article .code-block pre code {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: rgba(232, 232, 236, 0.92);
  background: none;
  padding: 0;
  border-radius: 0;
  white-space: pre;
}

/* 表格 */
#article table {
  width: 100%;
  margin: 0 0 1.8em;
  border-collapse: collapse;
  font-size: 14px;
}

#article th,
#article td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

#article th {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
  border-bottom-color: rgba(255, 255, 255, 0.14);
}

#article td {
  color: rgba(232, 232, 236, 0.85);
}

#article tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* 图片 */
#article img {
  margin: 2em auto;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}

/* 返回链接等辅助元素兜底 */
#article .back-link {
  display: inline-block;
  margin-bottom: 40px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--text-faint);
  border-bottom: none;
  transition: color var(--dur-fast) var(--ease-out);
}

#article .back-link:hover {
  color: var(--accent);
}


/* ---------------------------------------------------------------------------
   10. 关于页
   --------------------------------------------------------------------------- */

#about-card {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: calc(var(--header-h) + 72px) 24px 140px;
}

#about-card .card-inner,
#about-card > .about-body {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 48px;
}

#about-card h1 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 20px;
}

#about-card h2 {
  font-family: var(--font-display);
  font-size: 22px;
  margin: 2em 0 0.8em;
}

#about-card h2::before {
  content: "§ ";
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.72em;
}

#about-card p {
  margin-bottom: 1.4em;
  color: var(--text-secondary);
  line-height: 1.85;
}

#about-card a {
  color: var(--accent);
  border-bottom: 1px solid rgba(255, 159, 67, 0.32);
  transition: color var(--dur-fast) var(--ease-out);
}

#about-card a:hover {
  color: var(--accent-hot);
}

#about-card .mono-note {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--text-faint);
}

#about-card ul {
  margin-bottom: 1.4em;
  padding-left: 1.2em;
}

#about-card ul li {
  position: relative;
  margin-bottom: 0.5em;
  color: var(--text-secondary);
}

#about-card ul li::before {
  content: "";
  position: absolute;
  left: -1em;
  top: 0.68em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
}


/* ---------------------------------------------------------------------------
   11. TOC 侧栏（仅 post.html）
   --------------------------------------------------------------------------- */

#toc-sidebar {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: var(--z-toc);
  width: 200px;
  max-height: 60vh;
  overflow-y: auto;
  padding: 16px 0 16px 16px;
  border-left: 1px solid var(--border-subtle);
}

#toc-sidebar .toc-title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 14px;
}

#toc-sidebar #toc {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#toc-sidebar .toc-link {
  display: block;
  position: relative;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary);
  padding: 5px 8px 5px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--dur-fast) var(--ease-out),
    padding-left var(--dur-fast) var(--ease-out);
}

#toc-sidebar .toc-link.toc-h3 {
  padding-left: 16px;
  font-size: 11px;
  color: var(--text-faint);
}

#toc-sidebar .toc-link:hover {
  color: var(--text-primary);
}

#toc-sidebar .toc-link.active {
  color: var(--accent);
}

#toc-sidebar .toc-link.active::before {
  content: "";
  position: absolute;
  left: -17px;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 14px;
  background: var(--accent);
  border-radius: 1px;
}


/* ---------------------------------------------------------------------------
   12. 顶部滚动进度条 —— 2px · accent → accent-cold 渐变
   --------------------------------------------------------------------------- */

#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: var(--z-progress);
  background: rgba(255, 255, 255, 0.03);
  pointer-events: none;
}

#scroll-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(
    90deg,
    var(--accent) 0%,
    var(--accent-cold) 100%
  );
  transition: width 60ms linear;
}


/* ---------------------------------------------------------------------------
   13. TUNE 参数面板 —— 右下折叠 · mono 控制台
   --------------------------------------------------------------------------- */

#console-panel {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: var(--z-console);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  font-family: var(--font-mono);
}

#tune-toggle {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.28em;
  color: var(--text-secondary);
  padding: 10px 18px;
  background: rgba(12, 12, 16, 0.78);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out);
}

#tune-toggle:hover {
  color: var(--accent);
  border-color: rgba(255, 159, 67, 0.4);
}

#tune-toggle[aria-expanded="true"] {
  color: var(--accent);
  border-color: var(--accent);
}

/* 折叠体 —— 默认收起 */
#tune-body {
  width: 308px;
  max-width: calc(100vw - 48px);
  max-height: 0;
  opacity: 0;
  visibility: hidden;
  overflow: hidden;
  transform: translateY(8px);
  background: rgba(12, 12, 16, 0.88);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: max-height var(--dur-med) var(--ease-out),
    opacity var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out),
    visibility 0s linear var(--dur-med);
}

#console-panel.open #tune-body,
#tune-body.open {
  max-height: min(70vh, 560px);
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  overflow-y: auto;
  transition: max-height var(--dur-med) var(--ease-out),
    opacity var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}

#tune-body .tune-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: rgba(12, 12, 16, 0.95);
  border-bottom: 1px solid var(--border-subtle);
}

#eh-fps {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--text-secondary);
}

#eh-fps.warn {
  color: var(--accent);
}

#tune-reset {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--text-faint);
  padding: 4px 10px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  transition: color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out);
}

#tune-reset:hover {
  color: var(--accent);
  border-color: var(--accent);
}

#tune-controls {
  padding: 8px 16px 16px;
}

/* 滑杆行：label / range / value */
.tune-row {
  display: grid;
  grid-template-columns: 108px 1fr 46px;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.tune-row:last-child {
  border-bottom: none;
}

.tune-row label {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tune-val {
  font-size: 11px;
  color: var(--accent-hot);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* range 滑杆 —— WebKit */
.tune-row input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 18px;
  background: transparent;
  cursor: pointer;
}

.tune-row input[type="range"]::-webkit-slider-runnable-track {
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 1px;
}

.tune-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  margin-top: -4px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-void);
  box-shadow: 0 0 0 1px var(--accent);
  transition: transform var(--dur-fast) var(--ease-out);
}

.tune-row input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

/* range 滑杆 —— Firefox */
.tune-row input[type="range"]::-moz-range-track {
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 1px;
}

.tune-row input[type="range"]::-moz-range-thumb {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-void);
  box-shadow: 0 0 0 1px var(--accent);
}

/* 质量三档按钮 */
.tune-row.tune-quality {
  grid-template-columns: 108px 1fr;
}

.tune-quality .q-group,
.tune-row.tune-quality > div {
  display: flex;
  gap: 6px;
}

.q-btn {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 6px 4px;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  transition: color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    background var(--dur-fast) var(--ease-out);
}

.q-btn:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.q-btn.active {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(255, 159, 67, 0.08);
}

/* 开关型行（Auto Rotate / Debug 等按钮态兜底） */
.tune-row .toggle-btn {
  grid-column: 2 / 4;
  justify-self: start;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-secondary);
  padding: 5px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  transition: color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out);
}

.tune-row .toggle-btn.active {
  color: var(--accent);
  border-color: var(--accent);
}


/* ---------------------------------------------------------------------------
   14. Intro —— 吸入式逐字动画（main.js 构建 DOM，此处只管动画）
   --------------------------------------------------------------------------- */

#intro {
  position: fixed;
  inset: 0;
  z-index: var(--z-intro);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-void);
  transition: opacity 0.6s var(--ease-out), visibility 0s linear 0.6s;
}

#intro .intro-word,
#intro > span,
#intro .intro-line {
  display: inline-flex;
}

#intro span[style*="--i"] {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 8vw, 6rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  opacity: 0;
  transform: scale(0);
  filter: blur(8px);
  animation: eh-intro-letter 0.7s var(--ease-out) forwards;
  animation-delay: calc(var(--i) * 40ms);
}

@keyframes eh-intro-letter {
  0% {
    opacity: 0;
    transform: scale(0);
    filter: blur(8px);
  }
  60% {
    opacity: 1;
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
}

/* 播完淡出（main.js 添加 .done 后移除节点） */
#intro.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}


/* ---------------------------------------------------------------------------
   15. shot-mode —— 截图模式隐藏交互件
   --------------------------------------------------------------------------- */

body.shot-mode #console-panel,
body.shot-mode .scroll-hint {
  display: none !important;
}


/* ---------------------------------------------------------------------------
   16. WebGL 降级 —— eh-fallback / fallback-note / signal-lost
   --------------------------------------------------------------------------- */

body.eh-fallback {
  background: radial-gradient(
    ellipse 100% 80% at 50% 38%,
    #1A1208 0%,
    #050507 72%
  );
  background-attachment: fixed;
}

body.eh-fallback #bg-canvas {
  display: none;
}

.fallback-note {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: var(--z-content);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  pointer-events: none;
}

/* context lost —— 全屏信号丢失覆盖层，点击重建 */
.signal-lost {
  position: fixed;
  inset: 0;
  z-index: var(--z-signal);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 5, 7, 0.88);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--accent);
  cursor: pointer;
  animation: eh-signal-blink 1.6s ease-in-out infinite;
}

@keyframes eh-signal-blink {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}


/* ---------------------------------------------------------------------------
   17. 响应式
   --------------------------------------------------------------------------- */

/* TOC：<1100px 隐藏 */
@media (max-width: 1100px) {
  #toc-sidebar {
    display: none;
  }
}

@media (max-width: 900px) {
  #site-header {
    padding: 0 20px;
  }
}

/* 移动端：<768px —— TUNE 面板变底部抽屉 */
@media (max-width: 768px) {
  #site-header {
    padding: 0 16px;
  }

  #site-header .brand {
    font-size: 13px;
    letter-spacing: 0.12em;
  }

  #site-header .site-nav {
    gap: 12px;
    min-width: 0;
    justify-content: flex-end;
  }

  #site-header .site-nav a {
    flex: 0 0 auto;
    padding-inline: 0;
    font-size: 10px;
    letter-spacing: 0.12em;
    white-space: nowrap;
  }

  #hero .hero-title,
  #hero h1 {
    font-size: clamp(2.4rem, 13vw, 4rem);
  }

  #console-panel {
    right: 12px;
    bottom: 12px;
    left: 12px;
    align-items: stretch;
  }

  #tune-toggle {
    align-self: flex-end;
  }

  #tune-body {
    width: 100%;
    max-width: none;
  }

  #console-panel.open #tune-body,
  #tune-body.open {
    max-height: 62vh;
  }

  #article,
  #about-card {
    padding-top: calc(var(--header-h) + 48px);
  }

  #article {
    font-size: 16px;
  }

  #about-card .card-inner,
  #about-card > .about-body {
    padding: 32px 24px;
  }

  .fallback-note {
    left: 16px;
    bottom: 72px;
    font-size: 10px;
  }
}

/* 窄屏：文章列表优雅截断 */
@media (max-width: 520px) {
  #post-list .post-row a {
    gap: 14px;
    padding: 18px 8px;
  }

  #post-list .post-date {
    flex-basis: 78px;
    font-size: 11px;
  }

  #post-list .post-cat {
    display: none;
  }
}

@media (max-width: 360px) {
  #post-list .post-date {
    flex-basis: 70px;
    font-size: 10px;
  }

  #post-list .post-title {
    font-size: 14px;
  }

  #category-filter .cat-btn {
    font-size: 10px;
    padding: 6px 12px;
  }
}


/* ---------------------------------------------------------------------------
   18. prefers-reduced-motion —— 全面降动效
   --------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }

  #intro {
    display: none;
  }

  .scroll-hint {
    animation: none;
    opacity: 0.6;
  }

  .signal-lost {
    animation: none;
    opacity: 1;
  }

  #scroll-progress-bar {
    transition: none;
  }
}


/* ---------------------------------------------------------------------------
   19. 集成补丁 —— JS 动态结构与关于页实际 class 的样式覆盖
       （.tune-switch / .is-disabled / .article-date / .article-tag /
         .post-404 / .about-kicker / .about-meta / .about-note / .noscript-note）
   --------------------------------------------------------------------------- */

/* Auto Rotate 开关（对齐 .toggle-btn 视觉语言） */
.tune-row .tune-switch {
  grid-column: 2 / 4;
  justify-self: start;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-faint);
  padding: 5px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  background: transparent;
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    background var(--dur-fast) var(--ease-out);
}

.tune-row .tune-switch:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.tune-row .tune-switch.on {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(255, 159, 67, 0.08);
}

/* 渲染器降级时面板置灰（仍允许展开/收起与 RESET） */
#console-panel.is-disabled #tune-controls {
  opacity: 0.45;
}

#console-panel.is-disabled input[type="range"],
#console-panel.is-disabled .q-btn,
#console-panel.is-disabled .tune-switch {
  cursor: not-allowed;
}

/* 文章头：mono 日期与 #标签行 */
#article .article-meta .article-date {
  color: var(--text-secondary);
}

#article .article-meta .article-date::after {
  content: "//";
  margin-left: 16px;
  color: var(--text-faint);
}

#article .article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

#article .article-tags .article-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  transition: color var(--dur-fast) var(--ease-out);
}

#article .article-tags .article-tag:hover {
  color: var(--accent);
}

/* 404 块（post.html?id= 缺失时由 main.js 生成） */
.post-404 {
  padding: 48px 0 24px;
  text-align: left;
}

.post-404-title {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 16px;
}

.post-404-desc {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 32px;
}

.post-404-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-404-list li {
  border-top: 1px solid var(--border-subtle);
}

.post-404-list li:last-child {
  border-bottom: 1px solid var(--border-subtle);
}

.post-404-list a {
  display: block;
  padding: 14px 4px;
  font-size: 15px;
  color: var(--text-primary);
  text-decoration: none;
  transition: transform 200ms ease-out, color var(--dur-fast) var(--ease-out);
}

.post-404-list a:hover {
  color: var(--accent);
  transform: translateX(4px);
}

/* 关于页：kicker / CODENAME 键值表 / 底部注记 */
#about-card .about-kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--text-faint);
  margin-bottom: 20px;
}

#about-card .about-meta {
  margin: 0 0 24px;
  padding: 0;
}

#about-card .about-meta .about-row {
  display: flex;
  align-items: baseline;
  gap: 24px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--border-subtle);
}

#about-card .about-meta .about-row:first-child {
  border-top: 1px solid var(--border-subtle);
}

#about-card .about-meta dt {
  flex: 0 0 96px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-faint);
}

#about-card .about-meta dd {
  margin: 0;
  font-size: 15px;
  color: var(--text-primary);
}

#about-card .about-links {
  list-style: none;
  padding-left: 0;
}

#about-card .about-links li::before {
  display: none;
}

#about-card .about-links a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
}

#about-card .about-note {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  margin-top: 32px;
}

/* ---------------------------------------------------------------------------
   20. Hugo integration — lists, pagination, search, archives, comments
   --------------------------------------------------------------------------- */

.page-heading {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: calc(var(--header-h) + 72px) 24px 24px;
}

.page-heading h1 {
  margin: 8px 0 16px;
  font-family: var(--font-display);
  font-size: clamp(32px, 7vw, 58px);
  line-height: 1.05;
}

.page-kicker,
.page-description,
.search-status {
  font-family: var(--font-mono);
  color: var(--text-faint);
}

.page-kicker {
  font-size: 11px;
  letter-spacing: 0.2em;
}

.page-description {
  color: var(--text-secondary);
  line-height: 1.8;
}

.list-page-posts,
.terms-list,
.search-results {
  padding-bottom: 48px !important;
}

.pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  max-width: var(--content-max);
  margin: -72px auto 96px;
  padding: 0 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
}

.pagination-link {
  color: var(--text-secondary);
}

.pagination-link:last-child {
  text-align: right;
}

.pagination-link:hover {
  color: var(--accent);
}

.pagination-link.disabled {
  opacity: 0.25;
  pointer-events: none;
}

.pagination-state {
  color: var(--text-faint);
}

.article-cover {
  margin: 32px 0 0;
}

#article .article-cover img {
  width: 100%;
  max-height: 460px;
  margin: 0;
  object-fit: cover;
}

#article .content-figure {
  margin: 2.2em 0;
}

#article .content-figure img {
  margin: 0 auto;
}

#article .content-figure figcaption {
  margin-top: 10px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
}

#article .zoomable-image {
  cursor: zoom-in;
}

body.lightbox-open {
  overflow: hidden;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 64px 24px 24px;
  background: rgba(2, 2, 4, 0.94);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-med) var(--ease-out), visibility var(--dur-med) var(--ease-out);
}

.image-lightbox.open {
  opacity: 1;
  visibility: visible;
}

.image-lightbox img {
  max-width: min(96vw, 1600px);
  max-height: calc(100vh - 88px);
  object-fit: contain;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
}

.image-lightbox-close {
  position: absolute;
  top: 18px;
  right: 24px;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--accent);
}

#article .highlight,
#article pre.standalone-code,
#article .article-body > pre {
  margin: 0 0 1.8em;
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: var(--bg-elevated);
}

#article .highlight pre,
#article pre.standalone-code,
#article .article-body > pre {
  margin: 0;
  padding: 20px;
  background: transparent !important;
}

#article .highlight code,
#article pre.standalone-code code,
#article .article-body > pre code {
  display: block;
  padding: 0;
  color: rgba(232, 232, 236, 0.92);
  background: transparent;
  white-space: pre;
}

#article .highlight table,
#article .highlight td {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

#article .highlight .lntd:first-child {
  width: 1%;
  border-right: 1px solid var(--border-subtle);
  opacity: 0.55;
}

#article details {
  margin: 0 0 1.6em;
  padding: 14px 18px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}

#article summary {
  cursor: pointer;
  color: var(--accent);
  font-family: var(--font-mono);
}

.article-footer {
  margin-top: 72px;
  padding-top: 28px;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
}

.article-updated,
.article-license {
  color: var(--text-faint) !important;
}

.article-neighbors {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 28px;
}

.article-neighbors a {
  max-width: 46%;
}

.related-posts {
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid var(--border-subtle);
}

.related-posts > h2 {
  margin: 0 0 18px !important;
  font-family: var(--font-mono) !important;
  font-size: 12px !important;
  letter-spacing: 0.18em;
  color: var(--text-secondary) !important;
}

.related-posts > h2::before {
  content: none !important;
}

.related-posts ul {
  padding: 0 !important;
  list-style: none;
}

.related-posts li {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.related-posts li::before {
  content: none !important;
}

.related-posts time,
.busuanzi-page,
.busuanzi-site {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-faint);
}

.video-wrapper {
  position: relative;
  width: 100%;
  margin: 2em 0;
  padding-bottom: 56.25%;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: #000;
}

.video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.archives {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 16px 24px 100px;
}

.archives-group {
  margin-bottom: 54px;
}

.archives-group > h2 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-display);
  font-size: 28px;
}

.archives-group > h2 span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--text-faint);
}

.archives-list {
  padding: 0 !important;
}

.search-form {
  margin-top: 32px;
}

.search-form label {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--text-secondary);
}

.search-control {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.search-control input,
.search-control button {
  min-height: 48px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: rgba(7, 7, 10, 0.78);
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.search-control input {
  min-width: 0;
  padding: 0 16px;
  outline: none;
}

.search-control input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 159, 67, 0.1);
}

.search-control button {
  padding: 0 20px;
  color: var(--accent);
  cursor: pointer;
}

.search-status {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 4px 24px 0;
  font-size: 11px;
  letter-spacing: 0.14em;
}

.comments-section {
  margin-top: 72px;
  padding-top: 32px;
  border-top: 1px solid var(--border-subtle);
}

.comments-section > h2 {
  margin-bottom: 24px !important;
  font-family: var(--font-mono) !important;
  font-size: 12px !important;
  letter-spacing: 0.18em;
  color: var(--text-secondary) !important;
}

.comments-section > h2::before {
  content: none !important;
}

#tcomment,
.twikoo {
  color: var(--text-primary);
}

.comments-loading {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint) !important;
}

.comments-placeholder {
  padding: 28px;
  text-align: center;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: rgba(12, 12, 16, 0.72);
}

#comments-load {
  margin-top: 12px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 159, 67, 0.35);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--accent);
}

#site-footer {
  position: relative;
  z-index: var(--z-content);
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 24px 64px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--text-faint);
}

#site-footer p {
  margin: 4px 0;
}

#site-footer a {
  color: var(--accent);
}

@media (max-width: 720px) {
  .page-heading {
    padding-top: calc(var(--header-h) + 42px);
  }

  .pagination {
    gap: 10px;
    margin-top: -82px;
    font-size: 9px;
  }

  .article-neighbors {
    flex-direction: column;
  }

  .article-neighbors a {
    max-width: 100%;
  }

  .search-control {
    grid-template-columns: 1fr;
  }
}

/* noscript 提示 */
.noscript-note {
  position: fixed;
  left: 50%;
  bottom: 48px;
  transform: translateX(-50%);
  z-index: var(--z-console);
  max-width: min(90vw, 520px);
  padding: 16px 24px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.8;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  text-align: center;
}
