@charset "UTF-8";

:root {
  --bg: #f7f7f9;
  --bg-gradient: linear-gradient(180deg, #ffffff 0%, #f7f7f9 100%);
  --card: #ffffff;
  --card-strong: #ffffff;
  --panel: #f5f6f8;
  --header-bg: #ffffff;
  --chip: rgba(15, 23, 42, 0.05);
  --line: rgba(15, 23, 42, 0.06);
  --text: #161922;
  --muted-strong: #61697c;
  --muted: #7e8698;
  --shadow: 0 18px 40px rgba(43, 53, 83, 0.06);
  --shadow-soft: 0 8px 24px rgba(43, 53, 83, 0.05);
  --tech: #5ea8ff;
  --tech-soft: rgba(94, 168, 255, 0.16);
  --life: #5ad691;
  --life-soft: rgba(90, 214, 145, 0.16);
  --note: #8d73ff;
  --note-soft: rgba(141, 115, 255, 0.16);
  --share: #ffa43b;
  --share-soft: rgba(255, 164, 59, 0.16);
  --radius-xl: 5px;
  --radius-lg: 5px;
  --radius-md: 5px;
  --radius-sm: 5px;
}

html[data-theme="dark"] {
  --bg: #0f1218;
  --bg-gradient: linear-gradient(180deg, #10131b 0%, #111725 38%, #0d1017 100%);
  --card: rgba(18, 23, 34, 0.82);
  --card-strong: rgba(18, 23, 34, 0.95);
  --panel: rgba(255, 255, 255, 0.04);
  --header-bg: rgba(11, 15, 23, 0.82);
  --chip: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.08);
  --text: #f6f8fc;
  --muted-strong: #c2cbdd;
  --muted: #97a0b3;
  --shadow: 0 20px 56px rgba(0, 0, 0, 0.3);
  --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg-gradient);
  position: relative;
}

body.modal-open {
  overflow: hidden;
}

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

button,
input {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

svg {
  flex: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

p {
  margin: 0;
}

.container {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  backdrop-filter: blur(18px);
}

.nav-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 84px;
}

.site-logo {
  flex-shrink: 0;
  font-family: "Segoe Script", "Snell Roundhand", "Apple Chancery", "Bradley Hand", "Brush Script MT", cursive;
  font-size: 2.35rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.site-nav {
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 42px;
}

.site-nav a {
  position: relative;
  padding: 10px 0;
  font-weight: 700;
  color: var(--muted-strong);
  transition: color 0.25s ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 28px;
  height: 3px;
  border-radius: 999px;
  background: var(--text);
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  transition: transform 0.25s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--text);
}

.site-nav a:hover::after,
.site-nav a.is-active::after {
  transform: translateX(-50%) scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn,
.nav-toggle {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text);
  background: var(--card-strong);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.icon-btn:hover,
.nav-toggle:hover {
  transform: translateY(-2px);
}

.icon-btn--solid {
  background: #171717;
  border-color: #171717;
  color: #ffffff;
}

html[data-theme="dark"] .icon-btn--solid {
  background: #ffffff;
  border-color: #ffffff;
  color: #171717;
}

.theme-toggle .icon-sun {
  display: none;
}

html[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

html[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

.nav-toggle {
  display: none;
  background: var(--card-strong);
}

.site-main {
  padding: 30px 0 84px;
}

.home-main {
  padding-top: 0;
}

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #edf4ff 0%, #eef5ff 54%, #f7f9ff 100%);
  border-bottom: 1px solid rgba(15, 23, 42, 0.04);
}

html[data-theme="dark"] .hero {
  background: linear-gradient(180deg, #131b29 0%, #141d2d 54%, #101721 100%);
  border-bottom-color: var(--line);
}

.hero::before {
  inset: 0;
  content: "";
  position: absolute;
  background: linear-gradient(90deg, rgba(248, 250, 255, 0.98) 0%, rgba(248, 250, 255, 0.95) 24%, rgba(248, 250, 255, 0.76) 42%, rgba(248, 250, 255, 0.2) 68%, rgba(248, 250, 255, 0) 100%);
  pointer-events: none;
  z-index: 0;
}

html[data-theme="dark"] .hero::before {
  background: linear-gradient(90deg, rgba(12, 18, 29, 0.92) 0%, rgba(12, 18, 29, 0.84) 24%, rgba(12, 18, 29, 0.58) 44%, rgba(12, 18, 29, 0.18) 72%, rgba(12, 18, 29, 0.06) 100%);
}

.hero-shell {
  width: 100%;
  max-width: 100%;
  margin: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: 390px;
  padding: 46px 0 26px;
}

.hero-copy-wrap {
  position: relative;
  z-index: 1;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 390px;
}

.hero-copy h1 {
  margin: 0 0 16px;
  font-family: "Songti SC", "STSongti-SC-Regular", "STSong", "Noto Serif SC", "SimSun", "Source Han Serif SC", serif;
  font-size: clamp(3rem, 3vw, 3rem);
  line-height: 1.26;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 320px;
  margin-bottom: 24px;
  font-size: 1rem;
  color: #697180;
}

html[data-theme="dark"] .hero-copy p {
  color: var(--muted-strong);
}

.hero-visual {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url("../images/bj.jpg") center bottom / cover no-repeat;
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(248, 250, 255, 0.18) 0%, rgba(248, 250, 255, 0.12) 30%, rgba(248, 250, 255, 0.04) 52%, rgba(248, 250, 255, 0) 100%);
}

html[data-theme="dark"] .hero-visual::after {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.14) 0%, rgba(0, 0, 0, 0.08) 40%, rgba(0, 0, 0, 0) 100%);
}

html[data-theme="dark"] .hero-visual {
  filter: saturate(0.85) brightness(0.72);
}

/* Hero 背景图轮播：多张图淡入淡出循环 */
.hero-bg-slideshow {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-bg-slide {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.2s ease;
  will-change: opacity;
}

.hero-bg-slide.is-active {
  opacity: 1;
}

.hero-bg-slideshow::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(248, 250, 255, 0.85) 0%, rgba(248, 250, 255, 0.62) 28%, rgba(248, 250, 255, 0.22) 56%, rgba(248, 250, 255, 0) 100%);
  pointer-events: none;
}

html[data-theme="dark"] .hero-bg-slideshow::after {
  background: linear-gradient(90deg, rgba(12, 18, 29, 0.92) 0%, rgba(12, 18, 29, 0.72) 28%, rgba(12, 18, 29, 0.32) 58%, rgba(12, 18, 29, 0.04) 100%);
}

html[data-theme="dark"] .hero-bg-slideshow {
  filter: saturate(0.85) brightness(0.72);
}

.hero.has-bg-slideshow .hero-inner {
  min-height: var(--hero-min-height, 390px);
}

@media (max-width: 768px) {
  .hero.has-bg-slideshow .hero-inner {
    min-height: var(--hero-min-height-mobile, 200px);
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #ffffff;
  background: #171717;
  box-shadow: none;
}

html[data-theme="dark"] .btn-primary {
  color: #171717;
  background: #ffffff;
}

.btn-secondary {
  color: var(--text);
  background: var(--card-strong);
  border-color: var(--line);
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: start;
  margin-top: 22px;
}

.layout--no-sidebar {
  grid-template-columns: minmax(0, 1fr);
}

.layout--sidebar-left {
  grid-template-columns: 300px minmax(0, 1fr);
}

.layout--sidebar-left .sidebar {
  order: -1;
}

.content-stack,
.sidebar {
  display: grid;
  gap: 18px;
}

.side-bar,
.column-small.side-bar {
  min-width: 0;
}

.blog-detail-side .sidebar,
.blog-detail-side.side-bar,
.side-bar.sidebar {
  display: grid;
  gap: 18px;
}

.sidebar {
  position: sticky;
  top: 98px;
}

.layout--sidebar-static .sidebar {
  position: static;
  top: auto;
}

.sidebar .widget {
  margin-bottom: 0;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  backdrop-filter: none;
}

.profile-card {
  padding: 28px 22px;
  text-align: center;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  margin: 0 auto 18px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 18px 36px rgb(31 41 55 / 5%)
}

.profile-card h3 {
  margin: 0 0 8px;
  font-size: 1.3rem;
  letter-spacing: -0.03em;
}

.profile-card p {
  max-width: 230px;
  margin: 0 auto 22px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 14px;
}

.social-links a {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--text);
  transition: transform 0.25s ease, background 0.25s ease;
}

.social-links a:hover {
  transform: translateY(-2px);
  background: var(--chip);
}

.social-links a i {
  font-size: 18px;
  line-height: 1;
}

.profile-actions {
  display: grid;
  gap: 10px;
}

.profile-actions-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  font-size: 0.85rem;
  line-height: 1;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.profile-action:hover {
  transform: translateY(-2px);
  background: var(--chip);
  border-color: transparent;
  color: var(--text);
}

.profile-action i {
  font-size: 1rem;
  line-height: 1;
}

.profile-widget-title {
  margin: 0 0 12px;
  text-align: center;
}

.sidebar-section {
  padding: 22px 20px;
}

.sidebar-title {
  margin: 0 0 20px;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

.category-list {
  display: grid;
  gap: 16px;
}

.category-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.category-list__item {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
}

.dot--tech {
  background: var(--tech);
}

.dot--life {
  background: var(--life);
}

.dot--note {
  background: var(--note);
}

.dot--share {
  background: var(--share);
}

.sidebar .widget,
.sidebar .widget:nth-child(2n) {
  margin-bottom: 0;
  padding: 22px 20px;
  transform: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.sidebar > .shadow-theme,
.sidebar > .blog-widget,
.sidebar > .side-widget {
  margin-bottom: 0;
  transform: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.sidebar .shadow-theme {
  box-shadow: var(--shadow-soft);
}

.sidebar.sidebar--compact {
  gap: 12px;
}

.sidebar.sidebar--compact .widget,
.sidebar.sidebar--compact .widget:nth-child(2n),
.sidebar.sidebar--compact .sidebar-section,
.sidebar.sidebar--compact .profile-card,
.sidebar.sidebar--compact > .shadow-theme,
.sidebar.sidebar--compact > .blog-widget,
.sidebar.sidebar--compact > .side-widget {
  padding: 16px;
}

.sidebar.sidebar--compact .widget-title,
.sidebar.sidebar--compact .sidebar-title {
  margin-bottom: 12px;
}

.sidebar.sidebar--compact .widget-title h3,
.sidebar.sidebar--compact .sidebar-title {
  font-size: 1.05rem;
}

.sidebar.sidebar--compact .bloggerinfo {
  padding: 0 16px 16px;
}

.sidebar.sidebar--compact .bloggerinfo-cover {
  height: 58px;
  margin-inline: -16px;
}

.sidebar.sidebar--compact .bloggerinfo-avatar {
  width: 60px;
  height: 60px;
}

.sidebar.sidebar--clean .widget,
.sidebar.sidebar--clean .widget:nth-child(2n),
.sidebar.sidebar--clean .sidebar-section,
.sidebar.sidebar--clean .profile-card,
.sidebar.sidebar--clean > .card,
.sidebar.sidebar--clean > .shadow-theme,
.sidebar.sidebar--clean > .blog-widget,
.sidebar.sidebar--clean > .side-widget {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.sidebar.sidebar--clean .blog-link-card,
.sidebar.sidebar--clean .comment-info,
.sidebar.sidebar--clean .twitter-card,
.sidebar.sidebar--clean .side-article-card,
.sidebar.sidebar--clean .sort-card {
  background: var(--card);
}

.sidebar .widget::before,
.sidebar .widget::after,
.sidebar .widget-title h3::after {
  display: none;
}

.sidebar .widget-title {
  margin-bottom: 18px;
}

.sidebar .widget-title h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.sidebar .widget-title h3 i {
  margin-right: 0;
  color: var(--muted-strong);
}

.sidebar .widget-blogger {
  overflow: hidden;
  padding: 0;
}

.sidebar .bloggerinfo {
  padding: 0 20px 22px;
  color: var(--muted-strong);
}

.sidebar .bloggerinfo-cover {
  height: 72px;
  margin: -1px -20px 0;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 74% 22%, rgb(251 191 36 / 16%) 0 36px, transparent 38px),
    linear-gradient(135deg, var(--panel), var(--card));
  border-bottom: 1px solid var(--line);
}

.sidebar .bloggerinfo-sun,
.sidebar .bloggerinfo-line {
  display: none;
}

.sidebar .bloggerinfo-main {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-top: -28px;
}

.sidebar .bloggerinfo-avatar {
  width: 72px;
  height: 72px;
  flex: none;
  display: block;
  border: 4px solid var(--card);
  border-radius: 50%;
  background: var(--card);
  overflow: hidden;
  box-shadow: 0 18px 36px rgb(31 41 55 / 6%);
}

.sidebar .bloggerinfo-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
}

.sidebar .bloggerinfo-text {
  min-width: 0;
  padding-bottom: 6px;
}

.sidebar .bloggerinfo-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.sidebar .bloginfo-name b {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--text);
  font-size: 1.16rem;
  letter-spacing: -0.03em;
}

.sidebar .bloginfo-descript {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.7;
}

.sidebar .bloggerinfo-actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.sidebar .bloggerinfo-actions-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sidebar .bloggerinfo-actions a,
.sidebar .bloggerinfo-links a {
  text-decoration: none;
}

.sidebar .bloggerinfo-actions a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--text);
  font-size: 0.84rem;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.sidebar .bloggerinfo-actions a:hover {
  transform: translateY(-2px);
  background: var(--chip);
  border-color: transparent;
}

.sidebar .bloggerinfo-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}

.sidebar .bloggerinfo-links a {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--text);
  background: transparent;
  transition: transform 0.2s ease, background 0.2s ease;
}

.sidebar .bloggerinfo-links a span {
  display: none;
}

.sidebar .bloggerinfo-links a:hover {
  transform: translateY(-2px);
  background: var(--chip);
}

.sidebar ul,
.sidebar ol {
  list-style: none;
}

.sidebar .widget-list,
.sidebar .blog-link-list,
.sidebar .blog-comment-list,
.sidebar .blog-twitter-list,
.sidebar .side-article-list,
.sidebar .log-classify-f,
.sidebar .log-classify-c {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
}

.sidebar .widget-list li,
.sidebar .blog-link-list li,
.sidebar .blog-comment-list li,
.sidebar .blog-twitter-list li,
.sidebar .side-article-list li,
.sidebar .blog-lates,
.sidebar .sort-parent-item,
.sidebar .sort-child-item {
  margin: 0 !important;
}

.sidebar .blog-link-card,
.sidebar .comment-info,
.sidebar .twitter-card,
.sidebar .side-article-card,
.sidebar .sort-card {
  padding: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: none;
}

.sidebar .blog-link-card,
.sidebar .side-article-card {
  position: relative;
  display: grid;
  align-items: center;
  color: var(--text);
  text-decoration: none;
}

.sidebar .blog-link-card {
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  min-height: 58px;
}

.sidebar .blog-link-card,
.sidebar .side-article-card,
.sidebar .sort-card {
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.sidebar .blog-link-card:hover,
.sidebar .side-article-card:hover,
.sidebar .sort-card:hover {
  transform: translateY(-2px);
  color: var(--text);
  background: var(--chip);
}

.sidebar .blog-link-icon,
.sidebar .twitter-card-icon,
.sidebar .side-article-cover {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--card);
  box-shadow: none;
  color: var(--muted-strong);
}

.sidebar .blog-link-icon {
  width: 38px;
  height: 38px;
  font-size: 18px;
}

.sidebar .blog-link-icon img,
.sidebar .side-article-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.sidebar .blog-link-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

.sidebar .blog-link-text strong,
.sidebar .comm-lates-name,
.sidebar .twitter-card-meta span,
.sidebar .side-article-body strong,
.sidebar .sort-card-name strong {
  color: var(--text);
  font-weight: 700;
}

.sidebar .blog-link-text strong,
.sidebar .blog-link-text em,
.sidebar .comm-lates-name,
.sidebar .sort-card-name strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sidebar .blog-link-text strong {
  font-size: 0.86rem;
}

.sidebar .blog-link-text em,
.sidebar .comment-info-content,
.sidebar .twitter-card-content,
.sidebar .twitter-card-meta,
.sidebar .side-article-body em,
.sidebar .logcom-latest-time,
.sidebar .blog-link-arrow {
  color: var(--muted);
}

.sidebar .logcom-latest-time {
  font-size: 11px;
}

.sidebar .blog-link-text em {
  margin-top: 2px;
  font-size: 0.78rem;
  font-style: normal;
}

.sidebar .blog-link-arrow {
  font-size: 16px;
}

.sidebar .comment-info {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
}

.sidebar .comment-info-body,
.sidebar .twitter-card-body,
.sidebar .side-article-body {
  min-width: 0;
}

.sidebar .comment-info-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.sidebar .comm-lates-name {
  min-width: 0;
  font-size: 0.82rem;
}

.sidebar .comment-info-avatar,
.sidebar .comment-info_img {
  width: 44px;
  height: 44px;
}

.sidebar .comment-info-avatar {
  display: block;
  flex: none;
}

.sidebar .comment-info_img {
  display: block;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: none;
}

.sidebar .comment-info-content {
  display: -webkit-box;
  overflow: hidden;
  text-decoration: none;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 0.82rem;
  line-height: 1.58;
}

.sidebar .comment-info-content:hover {
  color: var(--text);
}

.sidebar .twitter-card {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
}

.sidebar .twitter-card-icon {
  width: 36px;
  height: 36px;
  font-size: 18px;
}

.sidebar .twitter-card-content {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  font-size: 0.9rem;
  line-height: 1.7;
}

.sidebar .twitter-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  font-size: 0.8rem;
}

.sidebar .side-article-card {
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
}

.sidebar .side-article-cover {
  width: 58px;
  height: 58px;
  font-size: 22px;
}

.sidebar .side-article-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sidebar .side-article-body strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 0.88rem;
  line-height: 1.42;
}

.sidebar .side-article-body em {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-style: normal;
}

.sidebar .side-hot-list .side-article-card {
  grid-template-columns: 30px 54px minmax(0, 1fr);
}

.sidebar .side-hot-rank {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  box-shadow: none;
  background: #171717;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.86rem;
}

html[data-theme="dark"] .sidebar .side-hot-rank {
  background: #ffffff;
  color: #171717;
}

.sidebar .blog-side-search p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.sidebar .blog-side-search-form {
  display: grid;
  gap: 12px;
}

.sidebar .blog-side-search-input i,
.sidebar .archive-select-wrap > i {
  color: var(--muted);
}

.sidebar .blog-side-search-input,
.sidebar .archive-select-wrap {
  position: relative;
  display: block;
}

.sidebar .blog-side-search-input i,
.sidebar .archive-select-wrap > i {
  position: absolute;
  top: 50%;
  z-index: 1;
  transform: translateY(-50%);
  pointer-events: none;
}

.sidebar .blog-side-search-input i {
  left: 14px;
}

.sidebar .blog-side-search-input input,
.sidebar .archive-select-wrap select {
  width: 100%;
  min-height: 44px;
  padding: 0 14px 0 42px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: none;
  color: var(--text);
}

.sidebar .blog-side-search-input input::placeholder {
  color: var(--muted);
}

.sidebar .blog-side-search-form button {
  width: 100%;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: var(--radius-md);
  background: #171717;
  color: #ffffff;
  box-shadow: none;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.sidebar .blog-side-search-form button:hover {
  transform: translateY(-2px);
}

html[data-theme="dark"] .sidebar .blog-side-search-form button {
  background: #ffffff;
  color: #171717;
}

.sidebar .blog-calendar-wrap {
  overflow: hidden;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.sidebar .blog-calendar-wrap table {
  color: var(--muted-strong);
  font-size: 0.85rem;
}

.sidebar .blog-calendar-wrap caption,
.sidebar .blog-calendar-wrap .calendartop {
  color: var(--text);
  font-weight: 700;
}

.sidebar .blog-calendar-wrap td,
.sidebar .blog-calendar-wrap th {
  padding: 5px 2px;
}

.sidebar .blog-calendar-wrap a {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--text);
  box-shadow: none;
}

.sidebar .archive-select-wrap select {
  appearance: none;
  cursor: pointer;
  padding-right: 40px;
}

.sidebar .archive-select-wrap > i {
  left: 14px;
}

.sidebar .tags-side {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: var(--radius-md);
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 0.82rem;
}

.sidebar .tag-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sidebar .tag-container span {
  line-height: 1 !important;
  font-size: inherit !important;
}

.sidebar .tags-side em,
.sidebar .sort-card-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted-strong);
}

.sidebar .tags-side em {
  min-width: 18px;
  height: 18px;
  margin-left: 3px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-style: normal;
}

.sidebar .sort-card-count {
  min-width: 30px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
}

.sidebar .sort-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.sidebar .sort-card-child {
  padding: 8px 10px;
}

.sidebar .sort-card-name {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sidebar .sort-card-name strong {
  font-size: 0.9rem;
}

.sidebar .blog-side-sort-icon {
  color: var(--muted-strong);
}

.sidebar .widget > .unstyle-li,
.sidebar .widget > .unstyle-li p {
  color: var(--muted-strong);
}

.sidebar .log-classify-c {
  margin: 8px 0 0 0;
  padding: 0 0 0 12px;
  border-left: 1px solid var(--line);
}

.sidebar .blog-calendar-wrap table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 3px;
}

.sidebar .blog-calendar-wrap td,
.sidebar .blog-calendar-wrap th {
  text-align: center;
  border-radius: 9px;
}

.sidebar .blog-calendar-wrap a {
  min-width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.count-pill {
  min-width: 32px;
  height: 20px;
  padding: 0 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted-strong);
  font-weight: 700;
  font-size: 0.7rem;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  background: var(--panel);
  border: 0;
  font-weight: 700;
  transition: transform 0.25s ease, background 0.25s ease;
}

.tag-chip:hover {
  transform: translateY(-2px);
  background: var(--chip);
}

/* 面包屑（子页面顶部） */
.blog-breadcrumb {
  margin: 0 0 18px;
  font-size: 0.85rem;
  color: var(--muted);
}

.blog-breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 4px;
}

.blog-breadcrumb li {
  display: inline-flex;
  align-items: center;
}

.blog-breadcrumb li + li::before {
  content: "›";
  margin: 0 8px 0 4px;
  color: var(--muted);
  opacity: 0.7;
  font-size: 1rem;
  line-height: 1;
}

.blog-breadcrumb a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.blog-breadcrumb a:hover {
  color: var(--text);
}

.blog-breadcrumb [aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}

.post-list {
  display: grid;
  gap: 22px;
}

.post-card {
  display: grid;
  align-items: center;
  gap: 18px;
  padding: 14px;
}

/* ===== Layout variants ===== */
/* 紧凑图文卡：左封面 / 中正文 / 右阅读全文 */
.post-card--compact {
  grid-template-columns: 208px minmax(0, 1fr) auto;
}

.post-card--compact .post-card__cover {
  width: 208px;
  height: var(--cover-height, 128px);
}

/* 横幅大图卡：封面置顶，下方堆叠正文 + 阅读链接 */
.post-card--default {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 14px;
}

.post-card--default .post-card__cover {
  width: 100%;
  height: var(--cover-height, 205px);
}

.post-card--default .post-card__link {
  justify-self: start;
  margin-top: 4px;
}

/* 纯文字清单：无封面 + 右侧阅读链接 */
.post-card--simple {
  grid-template-columns: minmax(0, 1fr) auto;
}

/* 修饰符：没有封面（layout=simple 或封面开关关闭） */
.post-card.post-card--no-cover {
  grid-template-columns: minmax(0, 1fr) auto;
}

.post-card.post-card--no-cover .post-card__cover,
.post-card.post-card--no-cover .post-card__cover-link {
  display: none;
}

/* 修饰符：没有阅读全文链接 */
.post-card.post-card--no-link.post-card--compact {
  grid-template-columns: 208px minmax(0, 1fr);
}

.post-card.post-card--no-link.post-card--simple,
.post-card.post-card--no-link.post-card--no-cover {
  grid-template-columns: minmax(0, 1fr);
}

.post-card__cover-link {
  display: block;
  line-height: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.post-card__cover {
  width: 100%;
  border-radius: var(--radius-md);
  object-fit: cover;
}

.post-card__body {
  min-width: 0;
}

/* 分类 + 标签同一行容器（位于标题上方） */
.post-card__taxonomy {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 6px;
}

.post-card__taxonomy .badge {
  flex: 0 0 auto;
}

.post-card__tags {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  line-height: 1;
}

.post-card__tags a {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--muted-strong);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
  font-weight: 500;
}

.post-card__tags a:hover {
  background: var(--text);
  color: var(--card);
}

.post-meta__author a {
  color: inherit;
  text-decoration: none;
}

.post-meta__author a:hover {
  color: var(--text);
}

@media (max-width: 768px) {
  /* 移动端紧凑卡降级为竖排，避免封面把正文挤瘪 */
  .post-card--compact {
    grid-template-columns: minmax(0, 1fr);
  }

  .post-card--compact .post-card__cover {
    width: 100%;
    height: var(--cover-height, 180px);
  }

  .post-card--compact .post-card__link,
  .post-card--simple .post-card__link {
    justify-self: start;
  }

  .post-card.post-card--no-link.post-card--compact {
    grid-template-columns: minmax(0, 1fr);
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 0.98rem;
}

.badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.badge--tech {
  color: var(--tech);
}

.badge--tech::before {
  background: var(--tech);
}

.badge--life {
  color: var(--life);
}

.badge--life::before {
  background: var(--life);
}

.badge--note {
  color: var(--note);
}

.badge--note::before {
  background: var(--note);
}

.badge--share {
  color: var(--share);
}

.badge--share::before {
  background: var(--share);
}

.post-card h2,
.category-card h2,
.tag-card h2,
.panel-title,
.about-copy h2 {
  letter-spacing: -0.03em;
}

.post-card h2 {
  margin: 0 0 8px;
  font-size: 1.42rem;
  line-height: 1.28;
}

.post-card p {
  margin-bottom: 5px;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--muted);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted);
  font-size: 0.8rem;
}

.post-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.post-card__link {
  align-self: end;
  white-space: nowrap;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border-radius: 0;
  color: var(--text);
  transition: background 0.25s ease, transform 0.25s ease;
}

.post-card__link:hover {
  background: transparent;
  transform: translateX(2px);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
}

.pagination .page-chip,
.pagination .page-chip:visited {
  min-width: 50px;
  height: 46px;
  padding: 0 16px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: #ffffff;
  color: #171717;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  text-indent: 0;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.pagination .page-chip:hover,
.pagination .page-chip:focus-visible {
  transform: translateY(-2px);
  color: #171717;
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}

.pagination .page-chip.is-active,
.pagination .page-chip[aria-current="page"] {
  color: #ffffff;
  background: #171717;
  border-color: #171717;
  box-shadow: 0 12px 28px rgba(23, 23, 23, 0.18);
}

.pagination .page-chip--ellipsis {
  min-width: 50px;
  letter-spacing: 0.08em;
}

.pagination .page-chip--ellipsis:hover,
.pagination .page-chip--ellipsis:focus-visible {
  transform: none;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.pagination .page-chip--next {
  min-width: 126px;
  padding: 0 22px;
  gap: 8px;
}

.pagination .page-chip--next svg {
  flex: none;
  width: 16px;
  height: 16px;
  transition: transform 0.25s ease;
}

.pagination .page-chip--next:hover svg,
.pagination .page-chip--next:focus-visible svg {
  transform: translateX(2px);
}

html[data-theme="dark"] .pagination .page-chip,
html[data-theme="dark"] .pagination .page-chip:visited {
  background: rgba(255, 255, 255, 0.08);
  color: #f6f8fc;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

html[data-theme="dark"] .pagination .page-chip:hover,
html[data-theme="dark"] .pagination .page-chip:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  color: #f6f8fc;
  border-color: rgba(255, 255, 255, 0.12);
}

html[data-theme="dark"] .pagination .page-chip.is-active,
html[data-theme="dark"] .pagination .page-chip[aria-current="page"] {
  color: #171717;
  background: #ffffff;
  border-color: #ffffff;
  box-shadow: 0 14px 32px rgba(255, 255, 255, 0.12);
}

.section-heading {
  padding: 14px 2px 6px;
}

.section-heading h1 {
  margin: 0 0 10px;
  font-family: "Songti SC", "STSongti-SC-Regular", "STSong", "Noto Serif SC", "SimSun", "Source Han Serif SC", serif;
  font-size: clamp(3rem, 4.8vw, 4.4rem);
  letter-spacing: -0.05em;
}

.section-heading p {
  color: var(--muted);
  font-size: 1.05rem;
}

.archive-groups {
  display: grid;
  gap: 18px;
}

.archive-group {
  padding: 24px 20px 10px;
}

.archive-group__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 8px 8px;
}

.archive-group__header h2 {
  margin: 0;
  font-size: 1.46rem;
  letter-spacing: -0.03em;
}

.archive-group__header span {
  color: var(--muted);
  font-weight: 700;
}

.archive-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 18px 8px;
  border-top: 1px solid var(--line);
}

.archive-list a,
.category-card__posts a,
.mini-posts a {
  font-weight: 700;
}

.archive-list time,
.category-card__posts time,
.mini-posts time {
  color: var(--muted);
  font-weight: 600;
}

.category-stack {
  display: grid;
  gap: 22px;
}

.category-card {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1.2fr);
  gap: 28px;
  padding: 24px;
}

.category-card__intro {
  display: grid;
  align-content: start;
  gap: 18px;
  padding-right: 28px;
  border-right: 1px solid var(--line);
}

.category-head {
  display: flex;
  align-items: center;
  gap: 18px;
}

.category-icon {
  width: 52px;
  height: 52px;
  border-radius: 5px;
  display: grid;
  place-items: center;
}

.category-icon--tech {
  color: var(--tech);
  background: var(--tech-soft);
}

.category-icon--life {
  color: var(--life);
  background: var(--life-soft);
}

.category-icon--note {
  color: var(--note);
  background: var(--note-soft);
}

.category-icon--share {
  color: var(--share);
  background: var(--share-soft);
}

.category-card h2 {
  margin: 0;
  font-size: 2rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.category-card p {
  color: var(--muted);
}

.category-card__all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.category-card__all.tech {
  color: var(--tech);
}

.category-card__all.life {
  color: var(--life);
}

.category-card__all.note {
  color: var(--note);
}

.category-card__all.share {
  color: var(--share);
}

.category-card__posts ul {
  display: grid;
  gap: 18px;
  padding-top: 4px;
}

.category-card__posts li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.tags-grid,
.split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.tag-card,
.panel-card,
.timeline-card,
.about-card {
  padding: 24px;
}

.tag-card h2 {
  margin: 0 0 10px;
  font-size: 1.65rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.tag-card > p,
.panel-card > p,
.about-copy > p {
  color: var(--muted);
}

.tag-card .tag-cloud {
  margin-top: 18px;
}

.mini-posts {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.mini-posts li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.panel-title {
  margin: 0 0 14px;
  font-size: 1.45rem;
}

.about-hero {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding: 28px;
}

.about-hero .profile-avatar {
  width: 140px;
  height: 140px;
  margin: 0;
}

.about-copy h2 {
  margin: 0 0 10px;
  font-size: 2.25rem;
}

.about-copy p + p {
  margin-top: 10px;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.stat-card {
  padding: 20px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.stat-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.9rem;
  letter-spacing: -0.04em;
}

.stat-card span {
  color: var(--muted);
  font-weight: 600;
}

.timeline {
  display: grid;
  gap: 20px;
}

.timeline-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.timeline-item .dot {
  margin-top: 7px;
}

.timeline-item h3 {
  margin: 0 0 6px;
  font-size: 1.1rem;
}

.timeline-item p {
  color: var(--muted);
}

.toolkit-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.tool-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  background: var(--panel);
  border: 1px solid var(--line);
  font-weight: 700;
}

.blog-detail-container {
  padding: 34px 0 72px;
}

.blog-detail-layout {
  display: grid;
  gap: 22px;
}

.blog-detail-layout.blog-detail-has-side {
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
}

.blog-detail-main,
.page-card,
.blog-comments-section,
.blog-related-posts,
.blog-author-card,
.neighbor-log {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.blog-detail-main,
.page-card {
  position: relative;
  min-width: 0;
  padding: clamp(24px, 4vw, 42px);
}

.page-title,
.log-title {
  margin: 0 0 16px;
  color: var(--text);
  font-size: clamp(2rem, 5vw, 3.3rem);
  line-height: 1.08;
  letter-spacing: -0.07em;
}

.back-top {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel);
  color: var(--muted-strong);
  cursor: pointer;
}

.blog-post-meta,
.blog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.blog-meta-item,
.blog-meta-item a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: inherit;
}

.blog-detail-main > hr {
  height: 1px;
  margin: 20px 0 26px;
  border: 0;
  background: var(--line);
}

.page-card .markdown,
.blog-detail-main .markdown {
  color: var(--text);
}

.blog-post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}

.blog-post-tags a {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 11px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  font-size: 0.8rem;
}

.blog-post-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding: 14px;
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid var(--line);
}

.blog-share-label {
  margin-right: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-strong);
  font-weight: 700;
}

.blog-share-btn,
.commentform .btn,
.blog-verify-modal-footer .btn {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.blog-share-btn:hover,
.commentform .btn:hover,
.blog-verify-modal-footer .btn:hover {
  transform: translateY(-2px);
  background: var(--chip);
  border-color: transparent;
}

.blog-author-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-top: 28px;
  padding: 18px;
}

.blog-author-card-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--panel), transparent 62%);
  pointer-events: none;
}

.blog-author-card > *:not(.blog-author-card-bg) {
  position: relative;
}

.blog-author-avatar {
  width: 76px;
  height: 76px;
  overflow: hidden;
  border-radius: 50%;
  border: 4px solid var(--card);
  background: var(--panel);
}

.blog-author-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.blog-author-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.blog-author-kicker {
  color: var(--muted);
  font-size: 0.76rem;
}

.blog-author-info h3 {
  margin: 3px 0 8px;
  font-size: 1.32rem;
  letter-spacing: -0.04em;
}

.blog-author-info p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.blog-author-role,
.blog-author-meta span,
.blog-author-more {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.blog-author-role {
  flex: none;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 700;
}

.blog-author-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.82rem;
}

.blog-author-more {
  justify-self: end;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  font-weight: 800;
}

.neighbor-log {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-top: 24px;
  padding: 0;
  background: var(--line);
}

.neighbor-item {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background: var(--card);
  color: var(--text);
  text-decoration: none;
}

.neighbor-item.next-log {
  text-align: right;
  align-items: flex-end;
}

.neighbor-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 0.8rem;
}

.neighbor-item strong {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.45;
}

.blog-detail-side {
  display: grid;
  gap: 18px;
  position: sticky;
  top: 98px;
}

.blog-comments-section,
.blog-related-posts {
  min-width: 0;
  padding: 20px;
}

.blog-comments-head,
.blog-related-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.blog-comments-kicker,
.blog-related-head span {
  color: var(--muted);
  font-size: 0.78rem;
}

.blog-comments-head h2,
.blog-related-head h3 {
  margin: 4px 0 0;
  font-size: 1.35rem;
  letter-spacing: -0.04em;
}

.blog-comments-count {
  flex: none;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 700;
}

.comment-post {
  margin: 16px 0 22px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.commentform {
  width: 100%;
  min-width: 0;
}

.commentform textarea,
.commentform input[type="text"],
.commentform input[type="email"],
.blog-share-qrcode-url {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
  color: var(--text);
  outline: none;
  font: inherit;
}

.commentform textarea {
  min-height: 130px;
  padding: 14px;
  resize: vertical;
}

.comment-post .comment-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.commentform input[type="text"],
.commentform input[type="email"] {
  min-height: 42px;
  padding: 0 12px;
}

.com_submit_p {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.comment-empty,
.comment-closed {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  color: var(--muted);
  background: var(--panel);
}

.comment-header {
  margin: 18px 0 12px;
  color: var(--text);
}

.comment {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.comment.comment-children {
  grid-column: 2;
  margin-left: 0;
}

.comment .avatar img {
  width: 42px;
  height: 42px;
  display: block;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--line);
}

.comment-infos {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
}

.comment-time {
  margin-left: 8px;
  color: var(--muted);
  font-size: 0.7rem;
}

.comment-content {
  margin-top: 8px;
  color: var(--muted-strong);
  line-height: 1.65;
}

.comment-reply {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

#pagenavi {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 18px 0 4px;
}

#pagenavi:empty {
  display: none;
}

#pagenavi .btn,
#pagenavi a,
#pagenavi span,
#pagenavi em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted-strong);
  box-shadow: none;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  text-indent: 0;
  white-space: nowrap;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

#pagenavi a:hover {
  transform: translateY(-1px);
  background: var(--chip);
  color: var(--text);
}

#pagenavi .active,
#pagenavi .current,
#pagenavi span {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.blog-detail-side #pagenavi {
  justify-content: flex-start;
  gap: 6px;
}

.blog-detail-side #pagenavi .btn,
.blog-detail-side #pagenavi a,
.blog-detail-side #pagenavi span,
.blog-detail-side #pagenavi em {
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0 9px;
  font-size: 0.74rem;
}

.comment > .comment-post {
  grid-column: 2 / -1;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin: 10px 0 4px;
  padding: 12px;
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
}

.blog-detail-side .comment > .comment-post {
  grid-column: 1 / -1;
}

.comment > .comment-post .commentform textarea {
  min-height: 96px;
}

.comment > .comment-post .comment-info {
  grid-template-columns: 1fr;
}

.blog-related-grid {
  display: grid;
  gap: 12px;
}

.blog-related-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
}

.blog-related-cover {
  width: 74px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--card);
  border: 1px solid var(--line);
}

.blog-related-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-related-body {
  min-width: 0;
}

.blog-related-body strong {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.45;
}

.blog-related-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.78rem;
}

.blog-share-qrcode-modal {
  position: fixed;
  inset: 0;
  z-index: 430;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.blog-share-qrcode-modal.is-open,
.blog-share-qrcode-modal.show {
  display: flex;
}

.blog-share-qrcode-mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(8px);
}

.blog-share-qrcode-dialog {
  position: relative;
  width: min(360px, 100%);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card-strong);
  box-shadow: var(--shadow);
  text-align: center;
}

.blog-share-qrcode-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel);
  color: var(--muted-strong);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.blog-share-qrcode-close:hover {
  transform: rotate(90deg);
  background: var(--chip);
}

.blog-share-qrcode-icon {
  font-size: 28px;
}

.blog-share-qrcode-title {
  margin-top: 8px;
  font-weight: 800;
}

.blog-share-qrcode-desc {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.88rem;
}

.blog-share-qrcode-box {
  display: grid;
  place-items: center;
  width: 224px;
  height: 224px;
  padding: 12px;
  margin: 16px auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.blog-share-qrcode-box img,
.blog-share-qrcode-box canvas {
  display: block;
  width: 200px !important;
  height: 200px !important;
}

.blog-share-qrcode-url {
  min-height: 38px;
  padding: 0 10px;
  text-align: center;
}

.blog-share-qrcode-error {
  display: grid;
  place-items: center;
  min-height: 160px;
  padding: 16px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
}

html.scroll-fix,
body.scroll-fix,
body.modal-open {
  overflow: hidden;
}

/* 文章阅读增强：进度、目录、返回顶部、移动工具条 */
.blog-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 240;
  height: 3px;
  pointer-events: none;
  opacity: 0;
  background: transparent;
  transition: opacity 0.2s ease;
}

.blog-reading-progress.is-started {
  opacity: 1;
}

.blog-reading-progress-bar {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--tech), var(--note), var(--share));
  box-shadow: 0 0 16px rgba(94, 168, 255, 0.28);
}

.toc-con {
  position: fixed;
  top: 108px;
  right: max(18px, calc((100vw - 1180px) / 2 - 292px));
  z-index: 180;
  width: 272px;
  max-height: calc(100vh - 132px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card-strong);
  box-shadow: var(--shadow-soft);
}

.toc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
}

.toc-head > span {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.close-toc {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel);
  color: var(--muted-strong);
  cursor: pointer;
}

.toc-body {
  min-height: 0;
  overflow: auto;
  padding: 10px;
}

.toc-body ul {
  display: grid;
  gap: 4px;
}

.toc-body li {
  min-width: 0;
}

.toc-level-3 {
  padding-left: 12px;
}

.toc-item {
  display: block;
  overflow: hidden;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  color: var(--muted-strong);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.84rem;
  line-height: 1.45;
  transition: color 0.2s ease, background 0.2s ease;
}

.toc-item:hover,
.toc-item.active {
  background: var(--panel);
  color: var(--text);
}

.toc-mobile-btn {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card-strong);
  color: var(--text);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}

.toc-mask {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 299;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(6px);
}

.toc-mask.show {
  display: block;
}

.blog-back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 210;
  width: 46px;
  height: 46px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card-strong);
  color: var(--text);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.blog-back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.blog-back-to-top:hover {
  background: var(--text);
  color: var(--bg);
}

.blog-mobile-toolbar {
  display: none;
}

.blog-share-toast {
  position: fixed;
  left: 50%;
  bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  z-index: 420;
  max-width: min(420px, calc(100vw - 32px));
  transform: translate(-50%, 16px);
  opacity: 0;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  box-shadow: var(--shadow);
  text-align: center;
  font-size: 0.88rem;
  font-weight: 700;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.blog-share-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.blog-code-pre {
  position: relative;
}

.blog-code-lang,
.blog-code-copy {
  position: absolute;
  top: 10px;
  z-index: 1;
}

.blog-code-lang {
  left: 12px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: var(--muted-strong);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

html[data-theme="dark"] .blog-code-lang {
  background: rgba(255, 255, 255, 0.08);
}

.blog-code-copy {
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card-strong);
  color: var(--muted-strong);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: var(--shadow-soft);
}

.blog-code-copy:hover,
.blog-code-copy.copied {
  background: var(--text);
  color: var(--bg);
}

.search-modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 90px 16px 24px;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(8px);
}

.search-modal.is-open {
  display: flex;
}

.search-panel {
  width: min(680px, 100%);
  overflow: hidden;
  background: var(--card-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.search-panel__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.search-panel__header svg {
  color: var(--muted);
}

.search-panel input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
}

.search-panel input::placeholder {
  color: var(--muted);
}

.search-panel__body {
  padding: 18px 24px 24px;
}

.search-panel__label {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.quick-links {
  display: grid;
  gap: 10px;
}

.quick-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid transparent;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.quick-link:hover {
  transform: translateY(-2px);
  background: var(--chip);
  border-color: var(--line);
}

.quick-link span {
  font-weight: 700;
}

.quick-link small {
  color: var(--muted);
}

kbd {
  min-width: 34px;
  height: 28px;
  padding: 0 8px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.04);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
}

.blog-special-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 16% 10%, rgb(15 23 42 / 5%), transparent 34%),
    radial-gradient(circle at 88% 82%, rgb(15 23 42 / 4%), transparent 28%),
    var(--bg);
}

.blog-special-wrap {
  min-height: 100vh;
  width: min(100%, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding: 54px 0;
}

.blog-special-card {
  width: min(560px, 100%);
  padding: clamp(28px, 5vw, 46px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card-strong);
  box-shadow: var(--shadow);
  text-align: center;
}

.blog-special-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.blog-special-brand img,
.blog-special-brand i {
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

.blog-special-brand img {
  object-fit: cover;
}

.blog-special-brand i {
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-size: 20px;
}

.blog-special-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  font-size: 28px;
  box-shadow: var(--shadow-soft);
}

.blog-special-code {
  margin: -4px 0 8px;
  font-size: clamp(3.2rem, 12vw, 6.4rem);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.08em;
  color: var(--text);
}

.blog-special-title {
  margin: 0;
  font-size: clamp(1.7rem, 5vw, 2.45rem);
  line-height: 1.12;
  letter-spacing: -0.06em;
}

.blog-special-desc {
  width: min(420px, 100%);
  margin: 14px auto 0;
  color: var(--muted);
  line-height: 1.7;
}

.blog-special-error {
  margin-top: 18px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  background: rgb(239 68 68 / 10%);
  border: 1px solid rgb(239 68 68 / 20%);
  color: #dc2626;
  font-weight: 700;
}

.blog-special-form {
  margin-top: 24px;
}

.blog-special-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.blog-special-input-row input,
.blog-special-input-row button {
  min-height: 48px;
  border-radius: 999px;
  font: inherit;
}

.blog-special-input-row input {
  min-width: 0;
  padding: 0 18px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  outline: none;
}

.blog-special-input-row input:focus {
  border-color: var(--muted-strong);
  background: var(--card);
}

.blog-special-input-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 20px;
  border: 0;
  background: var(--text);
  color: var(--bg);
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.blog-special-input-row button:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.blog-special-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

.blog-special-btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--panel);
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.blog-special-btn.primary {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.blog-special-btn:hover {
  transform: translateY(-2px);
  background: var(--chip);
  border-color: transparent;
  color: var(--text);
}

.blog-special-btn.primary:hover {
  background: var(--muted-strong);
  color: var(--bg);
}

.site-footer {
  margin-top: 32px;
  padding: 28px 0 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.footer-tagline {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
  max-width: 480px;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.footer-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted-strong);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.footer-link:hover {
  transform: translateY(-2px);
  background: var(--chip);
  border-color: transparent;
  color: var(--text);
}

.footer-link i {
  font-size: 1rem;
  line-height: 1;
}

.footer-meta {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 12px;
  font-size: 0.78rem;
  color: var(--muted);
}

.footer-meta a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-meta a:hover {
  color: var(--text);
}

.footer-meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.4;
  display: inline-block;
}

@media (max-width: 1274px) {
  .toc-con {
    top: auto;
    right: auto;
    left: 50%;
    bottom: calc(86px + env(safe-area-inset-bottom, 0px));
    width: min(420px, calc(100% - 34px));
    max-height: min(62vh, 520px);
    z-index: 320;
    transform: translate(-50%, 24px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  }

  .toc-con.toc-open {
    transform: translate(-50%, 0);
    opacity: 1;
    visibility: visible;
  }

  .toc-body {
    max-height: calc(62vh - 58px);
  }

  .toc-mobile-btn {
    position: fixed;
    left: 18px;
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    z-index: 310;
    display: inline-flex;
  }
}

@media (max-width: 1120px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .blog-detail-layout.blog-detail-has-side {
    grid-template-columns: 1fr;
  }

  .blog-detail-side {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .post-card {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .post-card__cover {
    width: 190px;
  }

  .post-card__link {
    grid-column: 2;
    justify-self: start;
    padding: 0;
  }

  .category-card {
    grid-template-columns: 1fr;
  }

  .category-card__intro {
    padding-right: 0;
    padding-bottom: 22px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 900px) {
  .header-actions {
    order: 2;
    gap: 8px;
    margin-left: auto;
  }

  .nav-toggle {
    display: grid;
    order: 3;
    flex: none;
  }

  .site-nav {
    order: 4;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-inline: 0;
    padding: 12px;
    background: var(--card-strong);
    border: 1px solid var(--line);
    border-radius: 5px;
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 14px 16px;
    border-radius: var(--radius-md);
  }

  .site-nav a::after {
    left: 16px;
    bottom: 8px;
    transform: scaleX(0);
    transform-origin: left;
    translate: none;
  }

  .site-nav a:hover,
  .site-nav a.is-active {
    background: var(--panel);
  }

  .hero-inner {
    min-height: 340px;
    padding: 40px 0 30px;
  }

  .hero-visual {
    background-position: 60% bottom;
  }

  .sidebar,
  .blog-detail-side,
  .tags-grid,
  .split-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100%, calc(100% - 28px));
  }

  .layout--sidebar-mobile-hidden .sidebar {
    display: none;
  }

  .hero-shell {
    width: 100%;
    max-width: 100%;
  }

  .nav-row {
    min-height: 72px;
    gap: 12px;
  }

  .site-logo {
    font-size: 1.95rem;
  }

  .header-actions {
    gap: 8px;
  }

  .site-main {
    padding: 26px 0 64px;
  }

  .home-main {
    padding: 0 0 64px;
  }

  .hero-inner {
    min-height: 280px;
    padding: 30px 0 24px;
  }

  .hero-visual {
    background-position: 68% bottom;
  }

  .hero-copy h1 {
    font-size: 2.75rem;
  }

  .post-card {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .pagination {
    gap: 8px;
  }

  .pagination .page-chip,
  .pagination .page-chip:visited {
    min-width: 44px;
    height: 40px;
    padding: 0 14px;
    border-radius: 14px;
    font-size: 0.95rem;
  }

  .pagination .page-chip--next {
    min-width: 110px;
    padding: 0 18px;
    gap: 6px;
  }

  .post-card__cover {
    width: 100%;
    height: 220px;
  }

  .post-card h2 {
    font-size: 1.32rem;
  }

  .post-card__link {
    grid-column: auto;
  }

  .blog-detail-container {
    padding: 26px 0 64px;
  }

  .blog-detail-main,
  .page-card,
  .blog-comments-section,
  .blog-related-posts {
    padding: 20px;
  }

  .blog-post-share,
  .blog-comments-head,
  .blog-related-head {
    align-items: stretch;
    flex-direction: column;
  }

  .blog-share-label {
    margin-right: 0;
  }

  .blog-share-btn {
    width: 100%;
  }

  .blog-author-card,
  .neighbor-log,
  .comment-post .comment-info {
    grid-template-columns: 1fr;
  }

  .blog-author-card {
    text-align: center;
  }

  .blog-author-avatar,
  .blog-author-more {
    justify-self: center;
  }

  .blog-author-head,
  .blog-author-meta {
    justify-content: center;
  }

  .neighbor-item.next-log {
    text-align: left;
    align-items: flex-start;
  }

  .comment,
  .comment.comment-children {
    grid-template-columns: 1fr;
    grid-column: auto;
  }

  .comment > .comment-post {
    grid-column: 1 / -1;
  }

  .comment .avatar {
    display: none;
  }

  .blog-related-card {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .blog-related-cover {
    width: 64px;
    height: 52px;
  }

  .blog-special-input-row {
    grid-template-columns: 1fr;
  }

  .blog-special-input-row button {
    width: 100%;
  }

  .toc-mobile-btn {
    display: none;
  }

  .blog-back-to-top {
    display: none;
  }

  body.blog-mobile-toolbar-ready {
    padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  }

  .blog-mobile-toolbar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 330;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--card-strong);
    background: color-mix(in srgb, var(--card-strong) 92%, transparent);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    transform: translateY(calc(120% + env(safe-area-inset-bottom, 0px)));
    transition: transform 0.22s ease;
  }

  .blog-mobile-toolbar.show {
    transform: translateY(0);
  }

  .blog-mobile-toolbar-progress {
    position: absolute;
    left: 18px;
    right: 18px;
    top: -7px;
    height: 5px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--panel);
  }

  .blog-mobile-toolbar-progress i {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--tech), var(--note), var(--share));
  }

  .blog-mobile-toolbar-btn {
    min-width: 0;
    min-height: 48px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 4px 2px;
    border: 0;
    border-radius: 18px;
    background: transparent;
    color: var(--muted-strong);
    cursor: pointer;
    font: inherit;
    font-size: 0.74rem;
    line-height: 1.1;
    transition: background 0.2s ease, color 0.2s ease;
  }

  .blog-mobile-toolbar-btn i {
    color: var(--text);
    font-size: 1.18rem;
    line-height: 1;
  }

  .blog-mobile-toolbar-btn:hover,
  .blog-mobile-toolbar-btn.active {
    background: var(--panel);
    color: var(--text);
  }

  .blog-mobile-toolbar-btn.is-disabled {
    opacity: 0.45;
  }

  .blog-share-toast {
    bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  }

  .archive-list li,
  .category-card__posts li,
  .mini-posts li {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .archive-list time,
  .category-card__posts time,
  .mini-posts time {
    grid-column: 2;
  }

  .about-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about-hero .profile-avatar {
    margin: 0 auto;
  }

  .about-stats {
    grid-template-columns: 1fr;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
