<style>
/* =========================================================
   Toozhao blog custom styles (injected via head.njk)
   阅读体验优化 — 微信读书风格
   ========================================================= */
html { scroll-behavior: smooth; }

/* 主内容阅读宽度 */
.post-block, .posts-expand .post-block {
  max-width: 760px;
}

.post-title {
  font-size: 1.7em;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.post-meta { color: #999; font-size: 0.9em; }

.post-body {
  font-size: 1.05em;
  line-height: 1.9;
  letter-spacing: 0.02em;
  color: #333;
}
.post-body p {
  margin: 1.1em 0;
  text-align: justify;
  text-justify: inter-ideograph;
}
.post-body h1, .post-body h2, .post-body h3, .post-body h4, .post-body h5, .post-body h6 {
  line-height: 1.4;
  margin-top: 1.6em;
  margin-bottom: 0.8em;
  font-weight: 600;
  color: #222;
}
.post-body h2::before, .post-body h3::before, .post-body h4::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 0.9em;
  background: #4a90d9;
  border-radius: 2px;
  margin-right: 10px;
  vertical-align: -0.08em;
}
.post-body img {
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  margin: 0.6em auto;
  display: block;
  max-width: 100%;
}
.post-body blockquote {
  border-left: 4px solid #4a90d9;
  background: rgba(74, 144, 217, 0.06);
  margin: 1.4em 0;
  padding: 0.8em 1.2em;
  border-radius: 0 8px 8px 0;
  color: #555;
}
.post-body blockquote p { margin: 0.4em 0; }
.post-body a {
  color: #2d6cdf;
  border-bottom: 1px solid rgba(45, 108, 223, 0.3);
  transition: color 0.2s, border-color 0.2s;
}
.post-body a:hover { color: #1a4fae; border-bottom-color: #1a4fae; }
.post-body code {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.9em;
  color: #c7254e;
}
.post-body table {
  border-collapse: collapse;
  margin: 1.2em auto;
  font-size: 0.95em;
}
.post-body table th, .post-body table td {
  border: 1px solid #ddd;
  padding: 8px 14px;
}
.post-body table th { background: #f5f7fa; font-weight: 600; }
.post-body table tr:nth-child(even) { background: #fafbfc; }
.post-body ul, .post-body ol { padding-left: 1.6em; margin: 0.8em 0; }
.post-body ul li, .post-body ol li { margin: 0.35em 0; }
.post-body hr {
  border: none;
  border-top: 1px dashed #ccc;
  margin: 2em auto;
  width: 60%;
}

/* 暗色模式（跟随系统，不依赖 NexT darkmode class） */
@media (prefers-color-scheme: dark) {
  body { background: #1b1f24; color: #c8cdd3; }
  .post-body { color: #c8cdd3; }
  .post-body h1, .post-body h2, .post-body h3, .post-body h4, .post-body h5, .post-body h6 { color: #e8eaed; }
  .post-body blockquote { background: rgba(74, 144, 217, 0.1); color: #9aa5b1; }
  .post-body code { background: rgba(255, 255, 255, 0.1); color: #e88388; }
  .post-body table th, .post-body table td { border-color: #3a3f45; }
  .post-body table th { background: #2d3238; }
  .post-body table tr:nth-child(even) { background: #262a2f; }
  .post-meta { color: #777; }
}

::selection { background: rgba(74, 144, 217, 0.25); }

/* 字体调节按钮 */
.font-size-control {
  position: fixed;
  right: 18px;
  bottom: 90px;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  border-radius: 20px;
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  user-select: none;
}
.font-size-control button {
  background: none;
  border: none;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  padding: 3px 8px;
  opacity: 0.85;
}
.font-size-control button:hover { opacity: 1; }
</style>
