/**
 * WP bridge — 强制对齐官方布局的关键修复
 * 官方 md 断点是 1280px，这里补一套桌面可用的导航/三栏
 */

:root {
  --primary: oklch(0.70 0.14 var(--hue, 35));
  --page-bg: oklch(0.95 0.01 var(--hue, 35));
  --card-bg: #fff;
  --card-bg-transparent: rgba(255, 255, 255, 0.82);
  --btn-content: oklch(0.55 0.12 var(--hue, 35));
  --btn-regular-bg: oklch(0.95 0.025 var(--hue, 35));
  --btn-regular-bg-hover: oklch(0.9 0.05 var(--hue, 35));
  --deep-text: oklch(0.25 0.02 var(--hue, 35));
  --float-panel-bg: #fff;
  --line-divider: rgba(0, 0, 0, 0.08);
  --radius-large: 1rem;
  --page-width: 75rem;
}

:root.dark {
  --primary: oklch(0.75 0.14 var(--hue, 35));
  --page-bg: oklch(0.16 0.014 var(--hue, 35));
  --card-bg: oklch(0.23 0.015 var(--hue, 35));
  --card-bg-transparent: rgba(23, 23, 23, 0.82);
  --btn-content: oklch(0.75 0.1 var(--hue, 35));
  --btn-regular-bg: oklch(0.33 0.035 var(--hue, 35));
  --btn-regular-bg-hover: oklch(0.38 0.04 var(--hue, 35));
  --deep-text: oklch(0.92 0.01 var(--hue, 35));
  --float-panel-bg: oklch(0.19 0.015 var(--hue, 35));
  --line-divider: rgba(255, 255, 255, 0.08);
}

html, body {
  background: var(--page-bg) !important;
  color: var(--deep-text);
}

/*
 * 横幅/主栏对齐官方可视效果：
 * - banner 固定 65vh（压掉 bundle 里 <1280 的 70vh 规则，避免脱节）
 * - 主栏顶在 banner 底边（≈0 重叠），波浪区整段留白，和 mizuki.mysqil.com 一致
 *   官方实测：wave ≈15vh，卡片顶 ≈ banner 底，波浪上方空白 ≈133px@900vh
 */
#banner-flow-spacer {
  width: 100%;
  height: var(--banner-height-home, 65vh);
  pointer-events: none;
}

body.enable-banner #banner-wrapper:not(.mobile-hide-banner),
body.enable-banner.is-home #banner-wrapper:not(.mobile-hide-banner) {
  top: 0 !important;
  height: var(--banner-height-home, 65vh) !important;
  min-height: 0 !important;
  max-height: none !important;
  transform: none !important;
}

body.enable-banner:not(.is-home) #banner-wrapper:not(.mobile-hide-banner) {
  height: var(--banner-height, 35vh) !important;
  min-height: 0 !important;
  max-height: none !important;
}

body.enable-banner:not(.is-home) #banner-flow-spacer {
  height: var(--banner-height, 35vh);
}

body.enable-banner:not(.is-home) #main-panel,
body.enable-banner:not(.is-home) .absolute.w-full.z-30:not(.mobile-main-no-banner) {
  top: var(--banner-height, 35vh) !important;
}

/* 覆盖官方 bundle 的 70vh/450/500 断点，banner/主栏同步，仍保留波浪留白 */
@media (max-width: 1279.98px) {
  body.enable-banner #banner-wrapper:not(.mobile-hide-banner),
  body.enable-banner.is-home #banner-wrapper:not(.mobile-hide-banner) {
    top: 0 !important;
    height: var(--banner-height-home, 65vh) !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  body.enable-banner.is-home #banner-flow-spacer,
  body.enable-banner #banner-flow-spacer {
    height: var(--banner-height-home, 65vh) !important;
  }

  body.enable-banner.is-home #main-panel,
  body.enable-banner #main-panel,
  body.enable-banner .absolute.w-full.z-30:not(.mobile-main-no-banner) {
    top: var(--banner-height-home, 65vh) !important;
    min-height: 50vh !important;
  }

  body.enable-banner:not(.is-home) #banner-wrapper:not(.mobile-hide-banner) {
    height: var(--banner-height, 35vh) !important;
    min-height: 0 !important;
  }

  body.enable-banner:not(.is-home) #banner-flow-spacer {
    height: var(--banner-height, 35vh) !important;
  }

  body.enable-banner:not(.is-home) #main-panel,
  body.enable-banner:not(.is-home) .absolute.w-full.z-30:not(.mobile-main-no-banner) {
    top: var(--banner-height, 35vh) !important;
  }
}

/* 官方 lg=1280，这里用 1024 切换横幅槽 */
.banner-image-slot-mobile {
  display: block !important;
  z-index: 1;
}
.banner-image-slot-desktop {
  display: none !important;
  z-index: 1;
}
@media (min-width: 1024px) {
  .banner-image-slot-mobile { display: none !important; }
  .banner-image-slot-desktop { display: block !important; }
}
#banner-carousel,
.banner-stage,
#banner {
  height: 100%;
  width: 100%;
}
.banner-stage > img,
.banner-stage > .banner-layer {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* 主栏顶对齐 banner 底边，波浪整段留白（对齐官方 blankAboveCards ≈ wave 高度） */
#main-panel,
body.enable-banner .absolute.w-full.z-30:not(.mobile-main-no-banner) {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 30;
  top: var(--banner-height-home, 65vh) !important;
  min-height: 50vh !important;
  pointer-events: none;
}

#main-panel > .main-panel-inner {
  pointer-events: auto;
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 0 1rem 2rem;
}

#main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  width: 100%;
  align-items: start;
}

@media (min-width: 900px) {
  #main-grid {
    grid-template-columns: 17.5rem minmax(0, 1fr);
    align-items: start;
  }
  #sidebar {
    grid-column: 1;
  }
  #content {
    grid-column: 2;
  }
  #aside-right {
    display: none;
  }
}

@media (min-width: 1280px) {
  #main-grid {
    grid-template-columns: 17.5rem minmax(0, 1fr) 17.5rem;
  }
  #aside-right {
    display: block;
    grid-column: 3;
  }
}

/* ========== 顶栏 — 对齐官方 #navbar > div 结构 ========== */
#navbar-wrapper {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: 0.75rem;
}

/* 官方 CSS 已对 #navbar > div 设毛玻璃；这里补强，并跳过绝对定位的动画垫片 */
#navbar > div.flex,
#navbar > div.max-w-\[var\(--page-width\)\],
#navbar > div.h-\[4\.5rem\] {
  position: relative;
  overflow: visible !important;
  height: 4.5rem;
  max-width: var(--page-width);
  margin-left: auto;
  margin-right: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 1rem;
  padding-right: 1rem;
  border-radius: var(--radius-large, 1rem);
  background: rgba(255, 255, 255, 0.55) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255, 255, 255, 0.55) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;
  transition: background .3s cubic-bezier(.4,0,.2,1), backdrop-filter .3s, box-shadow .3s;
}

:root.dark #navbar > div.flex,
:root.dark #navbar > div.h-\[4\.5rem\] {
  background: rgba(0, 0, 0, 0.55) !important;
  border-color: rgba(0, 0, 0, 0.55) !important;
}

/* 动画垫片不需要毛玻璃边框 */
#navbar > div.absolute {
  background: var(--card-bg) !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

/* btn-plain — 官方同款 */
#navbar .btn-plain {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  color: rgba(0, 0, 0, 0.75);
  text-decoration: none;
  cursor: pointer;
  transition: color .15s, background .15s, transform .15s;
  font: inherit;
}

:root.dark #navbar .btn-plain {
  color: rgba(255, 255, 255, 0.75);
}

#navbar .btn-plain:hover {
  color: var(--primary);
  background: var(--btn-plain-bg-hover, var(--btn-regular-bg));
}

#navbar .btn-plain.active\:scale-95:active,
#navbar .btn-plain.active\:scale-90:active {
  transform: scale(0.95);
}

#navbar .nav-ico {
  flex-shrink: 0;
  margin-right: 0;
}

#navbar .dropdown-arrow {
  margin-left: 0.15rem;
  transition: transform .2s;
}

.dropdown-container:hover .dropdown-arrow,
.dropdown-container:focus-within .dropdown-arrow,
.dropdown-container.open .dropdown-arrow {
  transform: rotate(180deg);
}

/* 中栏：官方 md(=1280) 才显示；这里 900px 起显示，避免常见宽度空白 */
.navbar-mid {
  display: none;
  align-items: center;
  gap: 0.15rem;
}

@media (min-width: 900px) {
  .navbar-mid {
    display: flex !important;
  }
  #nav-menu-switch {
    display: none !important;
  }
}

/* 下拉 — 对齐官方 DropdownMenu（无 astro-cid 作用域） */
.dropdown-container {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  padding-top: 0.5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity .2s, transform .2s, visibility .2s;
  z-index: 50;
}

.dropdown-container:hover .dropdown-menu,
.dropdown-container:focus-within .dropdown-menu,
.dropdown-container.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.dropdown-content {
  background: var(--float-panel-bg, #fff);
  border-radius: var(--radius-large, 1rem);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 0.5rem 0;
  min-width: 12rem;
}

:root.dark .dropdown-content {
  border-color: rgba(255, 255, 255, 0.1);
}

.dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  color: rgba(0, 0, 0, 0.75);
  text-decoration: none;
  font-weight: 500;
  transition: color .15s, background .15s;
}

:root.dark .dropdown-item {
  color: rgba(255, 255, 255, 0.75);
}

.dropdown-item:hover {
  color: var(--primary);
  background: var(--btn-plain-bg-hover, var(--btn-regular-bg));
}

.dropdown-item .ext-ico {
  opacity: 0.35;
  margin-left: 0.5rem;
}

/* 搜索框 */
.search-bar-official {
  position: relative;
  background: rgba(0, 0, 0, 0.04);
}

:root.dark .search-bar-official {
  background: rgba(255, 255, 255, 0.06);
}

.search-bar-official:hover,
.search-bar-official:focus-within {
  background: rgba(0, 0, 0, 0.06);
}

.search-bar-official input {
  border: 0;
  color: var(--deep-text);
}

.search-bar-official .search-ico {
  color: rgba(0, 0, 0, 0.3);
  display: inline-flex;
}

:root.dark .search-bar-official .search-ico {
  color: rgba(255, 255, 255, 0.35);
}

/* 工具类兜底（bundle 断点 md=1280，这里补常见宽度） */
.hidden { display: none !important; }
@media (min-width: 900px) {
  .md\:flex { display: flex !important; }
  .md\:\!hidden { display: none !important; }
}
@media (min-width: 1024px) {
  .lg\:flex { display: flex !important; }
  .lg\:\!hidden { display: none !important; }
}

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.space-x-1 > :not([hidden]) ~ :not([hidden]) { margin-left: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-2xl { border-radius: 1rem; }
.font-bold { font-weight: 700; }
.h-11 { height: 2.75rem; }
.w-11 { width: 2.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.ml-2 { margin-left: 0.5rem; }
.mr-2 { margin-right: 0.5rem; }
.mb-1 { margin-bottom: 0.25rem; }
.absolute { position: absolute; }
.relative { position: relative; }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0,0,0,.25); }
.transition-all { transition: all .2s; }
.object-contain { object-fit: contain; }
.text-black { color: #000; }
:root.dark .dark\:text-white { color: #fff; }

/* 波浪跟 page-bg 同色（亮色近白，暗色跟背景），避免发黑 */
#header-waves {
  color: var(--page-bg) !important;
  pointer-events: none;
}

/* 对齐官方实测波浪高度 ≈15vh（@900px → 135px），保留 banner→卡片 之间的白色过渡 */
#header-waves .waves,
.waves {
  display: block;
  width: 100%;
  height: 15vh !important;
  min-height: 80px !important;
  max-height: 150px !important;
}

#header-waves .parallax > use {
  fill: currentColor !important;
}

.parallax > use {
  animation: mizuki-wave-move 12s cubic-bezier(0.55, 0.5, 0.45, 0.5) infinite;
}
.parallax > use:nth-child(1) { animation-delay: -2s; animation-duration: 7s; }
.parallax > use:nth-child(2) { animation-delay: -3s; animation-duration: 10s; }
.parallax > use:nth-child(3) { animation-delay: -4s; animation-duration: 13s; }
.parallax > use:nth-child(4) { animation-delay: -5s; animation-duration: 16s; }

@keyframes mizuki-wave-move {
  0% { transform: translate3d(-90px, 0, 0); }
  100% { transform: translate3d(85px, 0, 0); }
}

/* 卡片基础 */
.card-base {
  background: var(--card-bg);
  border-radius: var(--radius-large);
  border: 1px solid var(--line-divider);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

body.enable-card-border .card-base {
  border: 1px solid var(--line-divider);
}

.btn-regular {
  background: var(--btn-regular-bg);
  color: var(--btn-content);
  text-decoration: none;
}

.btn-regular:hover {
  background: var(--btn-regular-bg-hover);
}

.btn-plain {
  background: transparent;
  color: var(--deep-text);
}

#footer {
  margin-top: 1.5rem;
}

.float-panel-closed {
  display: none !important;
}

.float-panel {
  background: var(--float-panel-bg);
  border: 1px solid var(--line-divider);
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  padding: 0.5rem;
}

.tw-cursor {
  display: inline-block;
  animation: blink 1s step-end infinite;
  margin-left: 2px;
}
@keyframes blink { 50% { opacity: 0; } }

.banner-title {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
  font-weight: 700;
}
.banner-subtitle {
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
  min-height: 1.5em;
}

/* 侧栏头像悬停层：官方依赖 Tailwind group-hover，bundle 未覆盖时强制隐藏 */
#sidebar .group > .absolute {
  background: transparent !important;
}
#sidebar .group > .absolute > span {
  opacity: 0 !important;
}
#sidebar .group:hover > .absolute {
  background: rgba(0, 0, 0, 0.3) !important;
}
#sidebar .group:hover > .absolute > span {
  opacity: 1 !important;
}

/* 右栏站点统计卡片 */
#aside-right .card-base {
  position: sticky;
  top: 5.5rem;
}

/* ========== 分类 Tab 条（对照官方 #category-bar） ========== */
#category-bar {
  margin-bottom: 1rem;
}

.category-bar-inner {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}

.category-divider {
  width: 1px;
  align-self: stretch;
  background: var(--line-divider);
  flex-shrink: 0;
}

.scroll-area {
  position: relative;
  flex: 1;
  min-width: 0;
}

.category-scroll {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-behavior: smooth;
}

.category-scroll::-webkit-scrollbar {
  display: none;
}

.category-pill {
  border: 1.5px solid var(--line-divider);
  color: var(--btn-content);
  background: none;
  text-decoration: none;
  font-size: 0.875rem;
  padding: 0.35rem 0.75rem;
  border-radius: 0.5rem;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color .2s, border-color .2s, background .2s, opacity .2s;
}

.category-pill-home {
  padding: 0.35rem 0.55rem;
  min-width: 2.25rem;
}

.category-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.category-pill[data-active] {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.category-pill[data-active]:hover {
  opacity: 0.9;
  color: #fff;
}

.category-pill .cat-count {
  font-size: 0.75rem;
  opacity: 0.6;
  margin-left: 0.25rem;
}

.category-pill[data-active] .cat-count {
  opacity: 0.85;
}

/* ========== 文章卡 ========== */
.post-card {
  background: var(--card-bg);
}

.post-card-body.no-cover {
  width: 100%;
}

@media (min-width: 900px) {
  .post-card-body.no-cover {
    width: calc(100% - 52px - 12px);
  }
  .post-card-body.has-cover {
    width: calc(100% - var(--coverWidth, 28%) - 12px);
  }
}

.post-card-title {
  position: relative;
  display: block;
  font-weight: 700;
  font-size: 1.65rem;
  line-height: 1.35;
  margin-bottom: 0.75rem;
  color: var(--deep-text);
  text-decoration: none;
  transition: color .15s;
}

.post-card-title::before {
  content: "";
  display: none;
  position: absolute;
  top: 0.55rem;
  left: -1.15rem;
  width: 0.25rem;
  height: 1.25rem;
  border-radius: 0.25rem;
  background: var(--primary);
}

@media (min-width: 900px) {
  .post-card-title::before {
    display: block;
  }
}

.post-card-title:hover {
  color: var(--primary);
}

.pin-icon {
  margin-right: 0.35rem;
  font-size: 1.1rem;
}

.title-chevron {
  color: var(--primary);
  font-size: 2rem;
  line-height: 1;
  margin-left: 0.15rem;
  opacity: 0;
  display: inline-block;
  transform: translateX(-4px);
  transition: opacity .2s, transform .2s;
  vertical-align: middle;
}

.post-card-title:hover .title-chevron {
  opacity: 1;
  transform: translateX(0);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  color: #737373;
}

.meta-item {
  display: inline-flex;
  align-items: center;
}

.meta-icon {
  width: 2rem;
  height: 2rem;
  margin-right: 0.5rem;
  border-radius: 0.375rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--btn-regular-bg);
  color: var(--btn-content);
  flex-shrink: 0;
}

.meta-text {
  font-size: 0.875rem;
  font-weight: 500;
  color: inherit;
  text-decoration: none;
}

a.meta-text:hover {
  color: var(--primary);
}

.post-excerpt {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(0, 0, 0, 0.55);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

:root.dark .post-excerpt {
  color: rgba(255, 255, 255, 0.55);
}

@media (min-width: 900px) {
  .post-excerpt {
    -webkit-line-clamp: 1;
  }
}

.tag-chip {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  color: rgba(0, 0, 0, 0.45);
  text-decoration: none;
  transition: color .15s;
}

.tag-chip:hover {
  color: var(--primary);
}

:root.dark .tag-chip {
  color: rgba(255, 255, 255, 0.45);
}

.post-cover {
  position: relative;
  display: block;
  max-height: 20vh;
  margin: 1rem 1rem -0.5rem;
  border-radius: 0.75rem;
  overflow: hidden;
}

@media (min-width: 900px) {
  .post-cover {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    width: var(--coverWidth, 28%);
    max-height: none;
    margin: 0;
  }
}

.cover-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: transparent;
  transition: background .2s;
  pointer-events: none;
}

.post-cover:hover .cover-overlay {
  background: rgba(0, 0, 0, 0.3);
}

.cover-chevron {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 3rem;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity .2s, transform .2s;
  pointer-events: none;
}

.post-cover:hover .cover-chevron {
  opacity: 1;
  transform: scale(1);
}

.post-enter-btn {
  display: none;
  position: absolute;
  right: 0.75rem;
  top: 0.75rem;
  bottom: 0.75rem;
  width: 3.25rem;
  border-radius: 0.75rem;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--primary);
  text-decoration: none;
}

@media (min-width: 900px) {
  .post-enter-btn {
    display: flex;
  }
}

.post-enter-btn:hover {
  background: var(--btn-regular-bg-hover);
}

/* ========== 搜索 ========== */
.search-bar-desktop {
  display: none;
  position: relative;
  align-items: center;
  height: 2.75rem;
  margin-right: 0.25rem;
  border-radius: 0.5rem;
  background: rgba(0, 0, 0, 0.04);
  padding: 0 0.75rem 0 2.25rem;
  transition: background .2s, width .2s;
}

:root.dark .search-bar-desktop {
  background: rgba(255, 255, 255, 0.06);
}

.search-bar-desktop:focus-within {
  background: rgba(0, 0, 0, 0.06);
}

.search-bar-desktop .search-ico,
.search-bar-inside .search-ico {
  position: absolute;
  left: 0.7rem;
  color: rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

:root.dark .search-bar-desktop .search-ico,
:root.dark .search-bar-inside .search-ico {
  color: rgba(255, 255, 255, 0.35);
}

.search-bar-desktop input {
  border: 0;
  outline: 0;
  background: transparent;
  width: 7rem;
  font-size: 0.875rem;
  color: var(--deep-text);
  transition: width .2s;
}

.search-bar-desktop input:focus {
  width: 11rem;
}

@media (min-width: 1024px) {
  .search-bar-desktop {
    display: inline-flex;
  }
  #search-switch {
    display: none !important;
  }
}

.search-panel {
  position: absolute;
  right: 1rem;
  top: 4.2rem;
  z-index: 70;
  width: min(30rem, calc(100vw - 2rem));
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
  padding: 0.5rem;
}

.search-bar-inside {
  display: flex;
  position: relative;
  align-items: center;
  height: 2.75rem;
  border-radius: 0.75rem;
  background: rgba(0, 0, 0, 0.04);
  padding: 0 0.75rem 0 2.25rem;
}

@media (min-width: 1024px) {
  .search-bar-inside {
    display: none;
  }
}

.search-bar-inside input {
  border: 0;
  outline: 0;
  background: transparent;
  width: 100%;
  font-size: 0.875rem;
  color: var(--deep-text);
}

.search-result-item {
  display: block;
  padding: 0.65rem 0.75rem;
  border-radius: 0.75rem;
  text-decoration: none;
  color: var(--deep-text);
  margin-top: 0.35rem;
}

.search-result-item:hover {
  background: var(--btn-regular-bg);
}

.search-result-item .sr-title {
  font-weight: 700;
  color: inherit;
}

.search-result-item:hover .sr-title {
  color: var(--primary);
}

.search-result-item .sr-excerpt {
  font-size: 0.85rem;
  color: #888;
  margin-top: 0.2rem;
}

.search-empty {
  padding: 1rem;
  text-align: center;
  color: #888;
  font-size: 0.9rem;
}

/* ========== 导航下拉 ========== */
.navbar-links .has-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.45rem 0.85rem;
  border-radius: 0.75rem;
  border: 0;
  background: transparent;
  color: var(--deep-text);
  font-size: 0.95rem;
  cursor: pointer;
  font-weight: inherit;
}

.nav-dropdown-trigger:hover,
.has-dropdown:hover > .nav-dropdown-trigger {
  background: var(--btn-regular-bg);
  color: var(--btn-content);
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 11rem;
  margin: 0.35rem 0 0;
  padding: 0.4rem;
  list-style: none;
  background: var(--float-panel-bg);
  border: 1px solid var(--line-divider);
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity .18s, transform .18s, visibility .18s;
  z-index: 80;
}

.has-dropdown:hover > .nav-dropdown,
.has-dropdown:focus-within > .nav-dropdown,
.has-dropdown.open > .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-dropdown a {
  display: block;
  width: 100%;
  padding: 0.55rem 0.85rem;
  border-radius: 0.6rem;
}

.nav-menu-panel {
  position: absolute;
  right: 1rem;
  top: 4.2rem;
  z-index: 60;
  min-width: 12rem;
}

.mobile-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.mobile-menu-list a {
  display: block;
  padding: 0.65rem 0.85rem;
  border-radius: 0.6rem;
  color: var(--deep-text);
  text-decoration: none;
}

.mobile-menu-list a:hover {
  background: var(--btn-regular-bg);
  color: var(--btn-content);
}

.pagination-wrap {
  display: flex;
  justify-content: center;
  margin: 1rem 0;
}

.pagination-wrap .nav-links {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.pagination-wrap a,
.pagination-wrap span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.5rem;
  background: var(--card-bg);
  color: var(--primary);
  text-decoration: none;
  border: 1px solid var(--line-divider);
}

.pagination-wrap .current {
  background: var(--btn-regular-bg);
  font-weight: 700;
}

/* ========== 友链 / 右栏 / 文章页 ========== */
.friends-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem 1.5rem;
  margin: 1rem 0 1.5rem;
}
@media (min-width: 640px) {
  .friends-grid { grid-template-columns: 1fr 1fr; }
}
.friend-card {
  display: flex;
  align-items: stretch;
  gap: 1rem;
  height: 7rem;
  border-radius: var(--radius-large);
}
.friend-avatar {
  width: 7rem;
  height: 7rem;
  flex-shrink: 0;
  border-radius: 0.5rem;
  overflow: hidden;
  background: rgba(0,0,0,.06);
}
.friend-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.friend-body { flex: 1; min-width: 0; }
.friend-title { font-weight: 700; font-size: 1.05rem; margin-bottom: 0.25rem; color: var(--deep-text); }
.friend-desc { font-size: 0.875rem; color: #888; margin-bottom: 0.35rem; }
.friend-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; font-size: 0.8rem; color: #888; }
.friend-tag-sep { margin: 0 0.15rem; opacity: .5; }
.friend-go {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  flex-shrink: 0;
  border-radius: 0.5rem;
  color: var(--primary);
  text-decoration: none;
}

.aside-stats li {
  display: flex;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
  color: var(--deep-text);
}
.aside-stats li:last-child { margin-bottom: 0; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag-chip, .tax-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8rem;
  text-decoration: none;
  background: var(--btn-regular-bg);
  color: var(--btn-content);
  border: 1px solid var(--line-divider);
}
.tag-chip:hover, .tax-chip:hover { background: var(--btn-regular-bg-hover); }
.tax-chip-tag { opacity: .9; }
.post-tax-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.85rem; }
.post-meta-row { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.recent-posts li { margin-bottom: 0.75rem; }
.recent-posts li:last-child { margin-bottom: 0; }
.recent-posts a {
  display: block;
  color: var(--deep-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.35;
}
.recent-posts a:hover { color: var(--primary); }
.recent-posts time { display: block; font-size: 0.75rem; color: #888; margin-top: 0.2rem; }
.post-nav-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 640px) {
  .post-nav-grid { grid-template-columns: 1fr 1fr; }
}
.post-nav-label { display: block; font-size: 0.75rem; color: #888; margin-bottom: 0.25rem; }
.post-nav-next { text-align: left; }
@media (min-width: 640px) {
  .post-nav-next { text-align: right; }
}
.post-nav a { color: var(--deep-text); font-weight: 600; text-decoration: none; }
.post-nav a:hover { color: var(--primary); }
#aside-right .aside-sticky { position: sticky; top: 5.5rem; }
