/* ==========================================================================
   沧岚个人博客 - 澄海蓝色主题样式表（仿 Firefly / Fuwari 三栏布局骨架）
   ========================================================================== */

:root {
  --hue: 212;
  --primary: hsl(var(--hue), 82%, 54%);
  --primary-hover: hsl(var(--hue), 85%, 45%);
  --primary-soft: hsla(var(--hue), 88%, 56%, 0.12);
  --primary-soft-hover: hsla(var(--hue), 88%, 56%, 0.2);

  --page-bg: hsl(var(--hue), 44%, 95.5%);
  --card-bg: #ffffff;
  --card-bg-elevated: #ffffff;
  --home-card-bg: rgba(255, 255, 255, 0.84);
  --home-card-border: rgba(255, 255, 255, 0.74);
  --home-card-shadow: 0 8px 28px hsla(var(--hue), 58%, 26%, 0.08);
  --closing-bg: hsl(var(--hue), 38%, 92%);
  --closing-divider: hsl(var(--hue), 64%, 56%);
  --nav-bg: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.54) 0%,
    hsla(var(--hue), 72%, 97%, 0.38) 100%
  );
  --nav-bg-hero: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.13) 0%,
    rgba(255, 255, 255, 0.04) 100%
  );
  --nav-border: rgba(255, 255, 255, 0.68);
  --nav-border-hero: rgba(255, 255, 255, 0.24);
  --input-bg: rgba(255, 255, 255, 0.48);
  --code-bg: hsl(var(--hue), 38%, 96%);
  --pre-bg: hsl(var(--hue), 32%, 14%);

  --badge-bg: hsl(var(--hue), 88%, 94%);
  --badge-text: hsl(var(--hue), 72%, 40%);
  --badge-hover: hsl(var(--hue), 86%, 89%);

  --text-main: #1e293b;
  --text-body: #334155;
  --text-secondary: #64748b;
  --text-muted: #8b9bb0;

  --border-subtle: hsla(var(--hue), 58%, 48%, 0.1);
  --border-strong: hsla(var(--hue), 58%, 48%, 0.2);
  --shadow-card: 0 2px 14px hsla(var(--hue), 55%, 24%, 0.05);
  --shadow-hover: 0 10px 28px hsla(var(--hue), 62%, 34%, 0.11);
  --shadow-nav: 0 6px 24px hsla(var(--hue), 55%, 24%, 0.08);

  --radius-card: 8px;
  --radius-md: 6px;
  --radius-sm: 4px;
  --nav-height: 62px;
  --sticky-top: calc(var(--nav-height) + 16px);
  --container-max: 1280px;
  --transition: 0.22s cubic-bezier(0.22, 1, 0.36, 1);

  /* 两侧图标色彩令牌：以 #d6ecf0 / #e9f1f6 为基调的雾青蓝同色系，
     保留琥珀与黛粉两枚低饱和暖色作为相映成趣的点缀 */
  --tone-sky: #2f6f80;
  --tone-sky-bg: #d6ecf0;
  --tone-sky-glow: rgba(47, 111, 128, 0.28);
  --tone-azure: #3f668c;
  --tone-azure-bg: #e9f1f6;
  --tone-azure-glow: rgba(63, 102, 140, 0.28);
  --tone-violet: #5a678f;
  --tone-violet-bg: #e4e9f2;
  --tone-violet-glow: rgba(90, 103, 143, 0.28);
  --tone-rose: #83535c;
  --tone-rose-bg: #f4e9ec;
  --tone-rose-glow: rgba(131, 83, 92, 0.26);
  --tone-amber: #806231;
  --tone-amber-bg: #f4efe5;
  --tone-amber-glow: rgba(128, 98, 49, 0.26);
  --tone-emerald: #437066;
  --tone-emerald-bg: #e3efec;
  --tone-emerald-glow: rgba(67, 112, 102, 0.28);
}

[data-theme='dark'] {
  --tone-sky: #8fd0dd;
  --tone-sky-bg: rgba(143, 208, 221, 0.16);
  --tone-sky-glow: rgba(143, 208, 221, 0.34);
  --tone-azure: #9cbfdd;
  --tone-azure-bg: rgba(156, 191, 221, 0.16);
  --tone-azure-glow: rgba(156, 191, 221, 0.34);
  --tone-violet: #b0b9dd;
  --tone-violet-bg: rgba(176, 185, 221, 0.16);
  --tone-violet-glow: rgba(176, 185, 221, 0.34);
  --tone-rose: #d8a8b0;
  --tone-rose-bg: rgba(216, 168, 176, 0.16);
  --tone-rose-glow: rgba(216, 168, 176, 0.32);
  --tone-amber: #d8bd8a;
  --tone-amber-bg: rgba(216, 189, 138, 0.16);
  --tone-amber-glow: rgba(216, 189, 138, 0.32);
  --tone-emerald: #93c7ba;
  --tone-emerald-bg: rgba(147, 199, 186, 0.16);
  --tone-emerald-glow: rgba(147, 199, 186, 0.32);
  --primary: hsl(var(--hue), 90%, 66%);
  --primary-hover: hsl(var(--hue), 95%, 74%);
  --primary-soft: hsla(var(--hue), 88%, 62%, 0.16);
  --primary-soft-hover: hsla(var(--hue), 88%, 62%, 0.26);

  --page-bg: hsl(var(--hue), 32%, 10%);
  --card-bg: hsl(var(--hue), 28%, 14.5%);
  --card-bg-elevated: hsl(var(--hue), 28%, 17%);
  --home-card-bg: hsla(var(--hue), 28%, 14.5%, 0.86);
  --home-card-border: hsla(var(--hue), 64%, 72%, 0.16);
  --home-card-shadow: 0 10px 30px rgba(3, 10, 24, 0.44);
  --closing-bg: hsl(var(--hue), 36%, 7.5%);
  --closing-divider: hsl(var(--hue), 68%, 48%);
  --nav-bg: linear-gradient(
    135deg,
    hsla(var(--hue), 34%, 18%, 0.52) 0%,
    hsla(var(--hue), 36%, 12%, 0.38) 100%
  );
  --nav-bg-hero: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.11) 0%,
    rgba(255, 255, 255, 0.03) 100%
  );
  --nav-border: hsla(var(--hue), 72%, 78%, 0.18);
  --nav-border-hero: rgba(191, 219, 254, 0.2);
  --input-bg: hsla(var(--hue), 28%, 24%, 0.52);
  --code-bg: hsla(var(--hue), 40%, 24%, 0.72);
  --pre-bg: hsl(var(--hue), 34%, 9%);

  --badge-bg: hsla(var(--hue), 82%, 60%, 0.17);
  --badge-text: hsl(var(--hue), 92%, 76%);
  --badge-hover: hsla(var(--hue), 82%, 60%, 0.26);

  --text-main: #eef4fc;
  --text-body: #cbd7e6;
  --text-secondary: #97acc4;
  --text-muted: #6e85a0;

  --border-subtle: hsla(var(--hue), 60%, 72%, 0.11);
  --border-strong: hsla(var(--hue), 60%, 72%, 0.24);
  --shadow-card: 0 4px 18px rgba(3, 10, 24, 0.32);
  --shadow-hover: 0 12px 30px rgba(3, 10, 24, 0.48);
  --shadow-nav: 0 8px 26px rgba(3, 10, 24, 0.4);
}

/* 基础重置 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  padding: 0;
  font-family:
    'PingFang SC',
    'Hiragino Sans GB',
    'Microsoft YaHei',
    'Segoe UI',
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  background-color: var(--page-bg);
  color: var(--text-body);
  line-height: 1.7;
  overflow-x: clip;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
  -webkit-font-smoothing: antialiased;
}

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

button,
input {
  font-family: inherit;
}

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

/* 固定晴空蓝氛围背景层（主页支持渐变融合风景底图，其他页面保持纯净底色） */
.web-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background-color: var(--page-bg);
  background-image:
    radial-gradient(ellipse 52% 38% at 14% 12%, rgba(255, 255, 255, 0.84), transparent 72%),
    radial-gradient(ellipse 46% 36% at 84% 72%, hsla(var(--hue), 72%, 64%, 0.22), transparent 74%),
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 31px,
      hsla(var(--hue), 54%, 48%, 0.03) 31px,
      hsla(var(--hue), 54%, 48%, 0.03) 32px
    ),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 31px,
      hsla(var(--hue), 54%, 48%, 0.03) 31px,
      hsla(var(--hue), 54%, 48%, 0.03) 32px
    ),
    linear-gradient(
      180deg,
      hsl(var(--hue), 56%, 91.5%) 0%,
      hsl(var(--hue), 44%, 95.5%) 560px,
      var(--page-bg) 100%
    );
  transition: background-color 0.3s ease;
}

.web-bg-photo {
  position: absolute;
  inset: -4%;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: 50% 34%;
  opacity: 0;
  transform: scale(1.06);
  filter: blur(11px) saturate(1.22) brightness(1.05);
  -webkit-mask-image: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.96) 0%,
    rgba(0, 0, 0, 0.72) 40%,
    rgba(0, 0, 0, 0.32) 76%,
    rgba(0, 0, 0, 0.08) 100%
  );
  mask-image: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.96) 0%,
    rgba(0, 0, 0, 0.72) 40%,
    rgba(0, 0, 0, 0.32) 76%,
    rgba(0, 0, 0, 0.08) 100%
  );
  transition:
    opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    transform 1.25s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

body[data-route='home'][data-filtered='false'] .web-bg-photo.is-active {
  opacity: 0.46;
  transform: scale(1.02);
}

.web-bg-gradient {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.45s ease;
  background:
    radial-gradient(ellipse 68% 50% at 15% 18%, hsla(calc(var(--hue) - 14), 88%, 82%, 0.48), transparent 70%),
    radial-gradient(ellipse 60% 48% at 86% 26%, hsla(calc(var(--hue) + 26), 78%, 85%, 0.42), transparent 68%),
    radial-gradient(ellipse 74% 52% at 52% 96%, hsla(var(--hue), 58%, 94%, 0.94), transparent 72%),
    linear-gradient(
      180deg,
      hsla(var(--hue), 68%, 92%, 0.42) 0%,
      hsla(calc(var(--hue) + 12), 54%, 94%, 0.64) 46%,
      hsla(var(--hue), 44%, 96%, 0.88) 82%,
      var(--page-bg) 100%
    );
}

body[data-route='home'][data-filtered='false'] .web-bg-gradient {
  opacity: 1;
}

[data-theme='dark'] .web-bg {
  background-image:
    radial-gradient(ellipse 54% 40% at 16% 12%, hsla(var(--hue), 84%, 58%, 0.14), transparent 70%),
    radial-gradient(ellipse 48% 36% at 84% 76%, hsla(var(--hue), 76%, 46%, 0.16), transparent 72%),
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 31px,
      hsla(var(--hue), 64%, 70%, 0.03) 31px,
      hsla(var(--hue), 64%, 70%, 0.03) 32px
    ),
    linear-gradient(
      180deg,
      hsl(var(--hue), 34%, 13%) 0%,
      hsl(var(--hue), 32%, 10%) 560px,
      var(--page-bg) 100%
    );
}

[data-theme='dark'] .web-bg-photo {
  filter: blur(13px) saturate(1.18) brightness(0.54);
}

[data-theme='dark'] body[data-route='home'][data-filtered='false'] .web-bg-photo.is-active {
  opacity: 0.34;
}

[data-theme='dark'] .web-bg-gradient {
  background:
    radial-gradient(ellipse 68% 50% at 16% 18%, hsla(calc(var(--hue) - 12), 78%, 38%, 0.22), transparent 70%),
    radial-gradient(ellipse 60% 48% at 86% 24%, hsla(calc(var(--hue) + 28), 68%, 40%, 0.2), transparent 68%),
    linear-gradient(
      180deg,
      hsla(var(--hue), 42%, 10%, 0.68) 0%,
      hsla(calc(var(--hue) + 10), 36%, 11%, 0.84) 48%,
      hsla(var(--hue), 32%, 10%, 0.95) 84%,
      var(--page-bg) 100%
    );
}

/* 飘落蓝瓣粒子画布 */
#petal-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 35;
}

/* ==========================================================================
   顶部悬浮导航栏（支持滚动方向感知：下滚收起，上滚轻柔滑出）
   ========================================================================== */
.navbar-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 0 18px;
  pointer-events: none;
  transform: translate3d(0, 0, 0);
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.navbar-wrapper.nav-hidden {
  transform: translate3d(0, calc(-100% - 10px), 0);
}

.navbar {
  pointer-events: auto;
  max-width: var(--container-max);
  height: var(--nav-height);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--nav-bg);
  backdrop-filter: blur(22px) saturate(185%);
  -webkit-backdrop-filter: blur(22px) saturate(185%);
  border: 1px solid var(--nav-border);
  border-top: none;
  border-radius: 0 0 var(--radius-card) var(--radius-card);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    inset 0 -1px 0 hsla(var(--hue), 58%, 54%, 0.1),
    0 10px 30px hsla(var(--hue), 58%, 26%, 0.08);
  transition:
    background 0.32s ease,
    box-shadow 0.32s ease,
    border-color 0.32s ease,
    color 0.28s ease;
}

[data-theme='dark'] .navbar {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(147, 197, 253, 0.08),
    0 10px 30px rgba(2, 8, 22, 0.36);
}

/* 开屏顶部：清透液态玻璃态（彻底去除灰蒙底色，文字图标转为澄白高对比） */
.navbar-wrapper.over-hero .navbar {
  background: var(--nav-bg-hero);
  backdrop-filter: blur(20px) saturate(165%);
  -webkit-backdrop-filter: blur(20px) saturate(165%);
  border-color: var(--nav-border-hero);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08),
    0 10px 28px rgba(6, 16, 36, 0.18);
}

.navbar-wrapper.over-hero .brand-link,
.navbar-wrapper.over-hero .nav-link,
.navbar-wrapper.over-hero .icon-btn {
  color: rgba(248, 251, 255, 0.95);
  text-shadow: 0 1px 6px rgba(6, 16, 36, 0.34);
}

.navbar-wrapper.over-hero .brand-logo {
  color: #7dd3fc;
  filter: drop-shadow(0 1px 6px rgba(56, 189, 248, 0.45));
}

.navbar-wrapper.over-hero .brand-link:hover,
.navbar-wrapper.over-hero .nav-link:hover,
.navbar-wrapper.over-hero .icon-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.navbar-wrapper.over-hero .nav-link.active {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.navbar-wrapper.over-hero .search-box {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.24);
}

.navbar-wrapper.over-hero .search-box:focus-within {
  background: rgba(15, 29, 52, 0.56);
  border-color: rgba(125, 211, 252, 0.72);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.22);
}

.navbar-wrapper.over-hero .search-ico,
.navbar-wrapper.over-hero .search-box input,
.navbar-wrapper.over-hero .search-box input::placeholder {
  color: rgba(244, 249, 255, 0.88);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 4px;
  color: var(--text-main);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  transition:
    background var(--transition),
    color var(--transition);
}

.brand-link:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: none;
  background: transparent;
  border-radius: 4px;
  color: var(--text-main);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background var(--transition),
    color var(--transition);
}

.nav-link:hover,
.nav-link.active {
  background: var(--badge-bg);
  color: var(--badge-text);
}

.nav-ico {
  width: 15px;
  height: 15px;
  opacity: 0.85;
}

.chevron {
  width: 13px;
  height: 13px;
  opacity: 0.65;
  transition: transform 0.2s ease;
}

.has-dropdown:hover .chevron,
.has-dropdown.open .chevron {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  min-width: 148px;
  padding: 6px;
  background: var(--card-bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-hover);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0.18s;
  z-index: 60;
}

/* 透明悬停桥接区：消除按钮与下拉面板之间的缝隙，鼠标下移时菜单不会闪退 */
.dropdown-menu::before {
  content: '';
  position: absolute;
  left: -8px;
  right: -8px;
  top: -14px;
  height: 16px;
}

.has-dropdown:hover .dropdown-menu,
.has-dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.dropdown-item {
  display: block;
  padding: 8px 12px;
  border-radius: 5px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-body);
  white-space: nowrap;
  transition:
    background var(--transition),
    color var(--transition),
    padding-left var(--transition);
}

.dropdown-item:hover {
  background: var(--primary-soft);
  color: var(--primary);
  padding-left: 16px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* 顶部搜索框 */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 158px;
  height: 36px;
  padding: 0 12px;
  background: var(--input-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  transition:
    width 0.25s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.search-box:focus-within {
  width: 210px;
  background: var(--card-bg);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.search-ico {
  color: var(--text-muted);
  flex-shrink: 0;
  margin-right: 7px;
}

.search-box input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-main);
  font-size: 0.88rem;
}

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

.search-results {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 310px;
  max-height: 360px;
  overflow-y: auto;
  padding: 8px;
  background: var(--card-bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-hover);
  z-index: 80;
}

.search-result-item {
  display: block;
  padding: 9px 11px;
  border-radius: 5px;
  transition: background var(--transition);
}

.search-result-item:hover {
  background: var(--primary-soft);
}

.search-result-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 2px;
}

.search-result-meta {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.search-empty {
  padding: 16px 12px;
  text-align: center;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.icon-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background var(--transition),
    color var(--transition),
    transform 0.15s ease;
}

.icon-btn:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.icon-btn:active {
  transform: scale(0.94);
}

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

/* 蓝色调色盘弹窗 */
.palette-wrapper {
  position: relative;
}

.palette-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 244px;
  padding: 14px;
  background: var(--card-bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-hover);
  z-index: 80;
}

.palette-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
}

.palette-reset {
  border: none;
  background: var(--badge-bg);
  color: var(--badge-text);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 4px;
  cursor: pointer;
}

.palette-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.hue-chip {
  border: 1.5px solid transparent;
  border-radius: 5px;
  padding: 5px 0;
  font-size: 0.76rem;
  font-weight: 600;
  color: #fff;
  background: hsl(var(--chip-hue), 80%, 54%);
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.hue-chip:hover {
  transform: translateY(-1px);
}

.hue-chip.active {
  box-shadow:
    0 0 0 2px var(--card-bg),
    0 0 0 4px hsl(var(--chip-hue), 82%, 52%);
}

.palette-slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

#hue-slider {
  flex: 1;
  height: 8px;
  appearance: none;
  border-radius: 99px;
  background: linear-gradient(90deg, #06b6d4, #0ea5e9, #2563eb, #4f46e5);
  outline: none;
  cursor: pointer;
}

#hue-slider::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  border: 2.5px solid var(--primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.hue-value {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--badge-text);
  min-width: 34px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.palette-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px dashed var(--border-strong);
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  inset: 0;
  background: var(--border-strong);
  border-radius: 99px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.slider::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}

.switch input:checked + .slider {
  background: var(--primary);
}

.switch input:checked + .slider::before {
  transform: translateX(16px);
}

/* ==========================================================================
   全屏开屏区域（使用 图片/1.jpg，支持“深入浅出”视差滚动）
   ========================================================================== */
.hero-section {
  position: relative;
  z-index: 4;
  width: 100%;
  height: 100vh;
  height: 100svh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #0c192c;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
  transform: translate3d(0, 0, 0) scale(1.02);
  transform-origin: center 44%;
  will-change: transform;
}

/* 轻度蓝调层次遮罩：保留 图片/1.jpg 人物目光与小猫细节，同时增强文字对比与蓝调呼应 */
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 50% 48%, rgba(12, 34, 68, 0.14) 0%, rgba(10, 26, 56, 0.5) 100%),
    linear-gradient(
      180deg,
      rgba(16, 48, 96, 0.24) 0%,
      rgba(15, 36, 70, 0.14) 48%,
      rgba(16, 46, 92, 0.52) 100%
    );
}

/* 滚动“深入浅出”渐隐蓝雾层：随页面下滚缓缓浮现，让开屏插画轻柔淡入晴空雾色 */
.hero-depth-veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(
    180deg,
    hsla(var(--hue), 52%, 22%, 0.18) 0%,
    hsla(var(--hue), 60%, 88%, 0.58) 72%,
    hsla(var(--hue), 64%, 95%, 0.86) 100%
  );
  will-change: opacity;
}

[data-theme='dark'] .hero-depth-veil {
  background: linear-gradient(
    180deg,
    hsla(var(--hue), 38%, 8%, 0.28) 0%,
    hsla(var(--hue), 34%, 12%, 0.72) 72%,
    hsla(var(--hue), 32%, 10%, 0.94) 100%
  );
}

/* 开屏底部平滑渐变过渡，让开屏背景图自然融入下方渐变画布 */
.hero-bottom-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 220px;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    transparent 0%,
    hsla(var(--hue), 60%, 88%, 0.16) 44%,
    hsla(var(--hue), 58%, 93%, 0.62) 78%,
    hsla(var(--hue), 54%, 95%, 0.94) 100%
  );
}

[data-theme='dark'] .hero-bottom-fade {
  background: linear-gradient(
    180deg,
    transparent 0%,
    hsla(var(--hue), 36%, 10%, 0.24) 44%,
    hsla(var(--hue), 34%, 10%, 0.68) 78%,
    hsla(var(--hue), 32%, 10%, 0.96) 100%
  );
}

.hero-center {
  position: relative;
  z-index: 4;
  text-align: center;
  padding: 0 24px;
  max-width: 820px;
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  will-change: transform, opacity;
}

.hero-enter {
  animation: heroEnterIn 0.88s cubic-bezier(0.22, 0.61, 0.36, 1) backwards;
  animation-delay: var(--hero-delay, 0ms);
}

@keyframes heroEnterIn {
  from {
    opacity: 0;
    translate: 0 28px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

.hero-title {
  margin: 0 0 14px;
  font-size: clamp(2.4rem, 5.4vw, 4.1rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #ffffff;
  line-height: 1.15;
  text-shadow:
    0 6px 26px rgba(10, 32, 72, 0.52),
    0 2px 6px rgba(0, 0, 0, 0.35);
}

.hero-subtitle {
  margin: 0 0 26px;
  min-height: 30px;
  font-size: clamp(1rem, 1.8vw, 1.24rem);
  font-weight: 500;
  color: rgba(240, 248, 255, 0.96);
  text-shadow: 0 2px 14px rgba(10, 28, 62, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.typewriter-cursor {
  display: inline-block;
  width: 2.5px;
  height: 1.15em;
  background: #93c5fd;
  border-radius: 2px;
  animation: blinkCursor 0.95s steps(1) infinite;
}

@keyframes blinkCursor {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

.hero-quick-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: 7px;
  border: 1px solid rgba(191, 219, 254, 0.45);
  background: hsla(var(--hue), 85%, 54%, 0.86);
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(14, 52, 118, 0.34);
  transition:
    transform var(--transition),
    background var(--transition),
    box-shadow var(--transition);
}

.hero-pill-btn:hover {
  transform: translateY(-2px);
  background: hsla(var(--hue), 88%, 50%, 0.96);
  box-shadow: 0 12px 28px rgba(14, 52, 118, 0.44);
}

.hero-pill-btn.ghost {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.55);
}

.hero-pill-btn.ghost:hover {
  background: rgba(255, 255, 255, 0.28);
}

.hero-scroll-down {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  animation: floatDown 2s ease-in-out infinite;
  transition: background 0.2s ease;
}

.hero-scroll-down:hover {
  background: hsla(var(--hue), 86%, 56%, 0.55);
}

@keyframes floatDown {
  0%,
  100% {
    transform: translate(-50%, 0);
  }
  50% {
    transform: translate(-50%, 8px);
  }
}

/* ==========================================================================
   视差过渡毛玻璃导览桥接栏（如雾幕般自下向上轻柔覆盖开屏大画面）
   ========================================================================== */
.hero-bridge {
  position: relative;
  z-index: 6;
  width: 100%;
  background: hsla(var(--hue), 72%, 98.5%, 0.88);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-top: 1px solid hsla(var(--hue), 74%, 64%, 0.24);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 -22px 48px hsla(var(--hue), 58%, 22%, 0.15);
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease;
}

[data-theme='dark'] .hero-bridge {
  background: hsla(var(--hue), 32%, 14%, 0.88);
  border-top-color: hsla(var(--hue), 74%, 68%, 0.2);
  box-shadow: 0 -22px 48px rgba(3, 10, 24, 0.45);
}

.hero-bridge-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  min-height: 98px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.hero-bridge-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--primary);
  margin-bottom: 4px;
}

.hero-bridge-text {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.01em;
}

.hero-bridge-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 7px;
  border: 1px solid var(--border-strong);
  background: var(--badge-bg);
  color: var(--badge-text);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition:
    background var(--transition),
    color var(--transition),
    transform var(--transition);
}

.hero-bridge-action:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* 滚动渐显入场动画（IntersectionObserver 驱动，不干扰 hover transform 与 sticky） */
.reveal-item {
  opacity: 0;
  translate: 0 32px;
  transition:
    opacity 0.72s cubic-bezier(0.22, 0.61, 0.36, 1),
    translate 0.72s cubic-bezier(0.22, 0.61, 0.36, 1),
    background-color 0.3s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
  transition-delay: var(--reveal-delay, 0ms), var(--reveal-delay, 0ms), 0ms, 0ms, 0ms;
}

.reveal-item.is-inview {
  opacity: 1;
  translate: none;
}

@media (prefers-reduced-motion: reduce) {
  .hero-enter {
    animation: none;
  }
  .reveal-item {
    opacity: 1;
    translate: none;
    transition: none;
  }
}

/* ==========================================================================
   三栏骨架主体区
   ========================================================================== */
.page-shell {
  position: relative;
  z-index: 5;
  padding: 26px 18px 56px;
  scroll-margin-top: 24px;
}

.layout-grid {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr) 256px;
  gap: 18px;
  align-items: stretch;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.main-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

/* 通用卡片容器 */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  transition:
    background-color 0.3s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.widget-card {
  padding: 16px 18px;
}

/* 侧栏小节标题（带多彩图标徽章） */
.widget-title {
  margin: 0 0 13px;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 9px;
  line-height: 1.3;
}

.widget-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 16px;
  border-radius: 99px;
  background: var(--primary);
  flex-shrink: 0;
}

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

.widget-icon,
.row-icon-badge {
  width: 26px;
  height: 26px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition:
    transform var(--transition),
    background-color var(--transition),
    color var(--transition);
}

.row-icon-badge {
  width: 24px;
  height: 24px;
  border-radius: 4px;
}

.widget-icon.tone-sky,
.row-icon-badge.tone-sky {
  background: var(--tone-sky-bg);
  color: var(--tone-sky);
}

.widget-icon.tone-azure,
.row-icon-badge.tone-azure {
  background: var(--tone-azure-bg);
  color: var(--tone-azure);
}

.widget-icon.tone-violet,
.row-icon-badge.tone-violet {
  background: var(--tone-violet-bg);
  color: var(--tone-violet);
}

.widget-icon.tone-rose,
.row-icon-badge.tone-rose {
  background: var(--tone-rose-bg);
  color: var(--tone-rose);
}

.widget-icon.tone-amber,
.row-icon-badge.tone-amber {
  background: var(--tone-amber-bg);
  color: var(--tone-amber);
}

.widget-icon.tone-emerald,
.row-icon-badge.tone-emerald {
  background: var(--tone-emerald-bg);
  color: var(--tone-emerald);
}

.widget-card:hover .widget-icon {
  transform: scale(1.07);
}

/* ==========================================================================
   左侧栏组件：个人名片 / 留言 / 音乐 / 分类 / 标签
   ========================================================================== */
.profile-card {
  padding: 14px 14px 18px;
  text-align: center;
}

.profile-avatar-wrap {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  overflow: hidden;
  background: var(--badge-bg);
  margin-bottom: 14px;
  position: relative;
}

.profile-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.profile-avatar-wrap:hover .profile-avatar {
  transform: scale(1.06);
}

.profile-name {
  margin: 0;
  font-size: 1.24rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: 0.01em;
}

.profile-divider {
  width: 34px;
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--tone-sky), var(--tone-violet), var(--tone-rose));
  margin: 8px auto 10px;
}

.profile-bio {
  margin: 0 0 14px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.profile-socials {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.social-btn {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  background: var(--badge-bg);
  color: var(--badge-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background var(--transition),
    color var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
}

.social-btn svg {
  pointer-events: none;
}

.social-btn.tone-sky {
  background: var(--tone-sky-bg);
  color: var(--tone-sky);
}

.social-btn.tone-violet {
  background: var(--tone-violet-bg);
  color: var(--tone-violet);
}

.social-btn.tone-rose {
  background: var(--tone-rose-bg);
  color: var(--tone-rose);
}

.social-btn.tone-amber {
  background: var(--tone-amber-bg);
  color: var(--tone-amber);
}

.social-btn:hover {
  background: var(--primary);
  color: #ffffff;
  transform: translateY(-2px);
}

.social-btn.tone-sky:hover {
  background: var(--tone-sky);
  box-shadow: 0 6px 16px var(--tone-sky-glow);
}

.social-btn.tone-violet:hover {
  background: var(--tone-violet);
  box-shadow: 0 6px 16px var(--tone-violet-glow);
}

.social-btn.tone-rose:hover {
  background: var(--tone-rose);
  box-shadow: 0 6px 16px var(--tone-rose-glow);
}

.social-btn.tone-amber:hover {
  background: var(--tone-amber);
  box-shadow: 0 6px 16px var(--tone-amber-glow);
}

/* 留言公告 */
.notice-text {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.72;
}

/* 音乐播放器 */
.widget-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 13px;
}

.widget-head-row .widget-title {
  margin: 0;
}

.music-import-btn {
  border: none;
  padding: 4px 9px;
  border-radius: 4px;
  background: var(--badge-bg);
  color: var(--badge-text);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background var(--transition),
    color var(--transition);
}

.music-import-btn:hover {
  background: var(--primary);
  color: #ffffff;
}

.music-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 13px;
}

.music-cover-wrap {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2.5px solid var(--badge-bg);
  box-shadow: 0 4px 12px hsla(var(--hue), 72%, 38%, 0.18);
  animation: spinDisc 14s linear infinite;
  animation-play-state: paused;
}

.music-cover-wrap.playing {
  animation-play-state: running;
}

@keyframes spinDisc {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.music-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 24%;
}

.music-cover-hole {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 11px;
  height: 11px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--card-bg);
  border: 2px solid var(--primary);
}

.music-meta {
  min-width: 0;
  flex: 1;
}

.music-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.music-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-mini-icon {
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 2px;
  cursor: pointer;
  display: inline-flex;
  border-radius: 4px;
}

.music-mini-icon:hover,
.music-mini-icon.muted {
  color: var(--tone-rose);
}

.music-artist {
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-time {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

.music-progress-wrap {
  padding: 6px 0;
  cursor: pointer;
  margin-bottom: 8px;
}

.music-progress-track {
  width: 100%;
  height: 5px;
  border-radius: 99px;
  background: var(--badge-bg);
  overflow: hidden;
}

.music-progress-fill {
  width: 0%;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--tone-sky), var(--primary), var(--tone-violet));
  transition: width 0.2s linear;
}

.music-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 6px 0;
}

.music-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background var(--transition),
    color var(--transition);
}

.music-btn:hover {
  background: var(--tone-violet-bg);
  color: var(--tone-violet);
}

#music-list-btn:hover {
  background: var(--tone-emerald-bg);
  color: var(--tone-emerald);
}

.music-play-btn {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, hsl(var(--hue), 64%, 62%), hsl(var(--hue), 68%, 46%));
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px hsla(var(--hue), 84%, 52%, 0.36);
  transition:
    transform var(--transition),
    box-shadow var(--transition);
}

.music-play-btn:hover {
  box-shadow: 0 8px 22px hsla(var(--hue), 68%, 46%, 0.34);
  transform: scale(1.06);
}

.music-playlist {
  list-style: none;
  margin: 12px 0 0;
  padding: 10px 0 0;
  border-top: 1px dashed var(--border-strong);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.music-playlist li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 5px;
  font-size: 0.82rem;
  color: var(--text-body);
  cursor: pointer;
  transition:
    background var(--transition),
    color var(--transition);
}

.music-playlist li:hover {
  background: var(--primary-soft);
}

.music-playlist li.active {
  background: var(--badge-bg);
  color: var(--badge-text);
  font-weight: 600;
}

/* 左侧分类列表 */
.category-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.category-item-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--text-body);
  font-size: 0.9rem;
  cursor: pointer;
  transition:
    background var(--transition),
    color var(--transition),
    padding-left var(--transition);
}

.category-item-btn:hover,
.category-item-btn.active {
  background: var(--primary-soft);
  color: var(--primary);
  padding-left: 14px;
}

.cat-name-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--primary);
}

.cat-dot.tone-sky {
  background: var(--tone-sky);
  box-shadow: 0 0 0 3px var(--tone-sky-bg);
}

.cat-dot.tone-emerald {
  background: var(--tone-emerald);
  box-shadow: 0 0 0 3px var(--tone-emerald-bg);
}

.cat-dot.tone-amber {
  background: var(--tone-amber);
  box-shadow: 0 0 0 3px var(--tone-amber-bg);
}

.cat-dot.tone-violet {
  background: var(--tone-violet);
  box-shadow: 0 0 0 3px var(--tone-violet-bg);
}

.cat-dot.tone-rose {
  background: var(--tone-rose);
  box-shadow: 0 0 0 3px var(--tone-rose-bg);
}

.cat-dot.tone-azure {
  background: var(--tone-azure);
  box-shadow: 0 0 0 3px var(--tone-azure-bg);
}

.count-pill {
  min-width: 28px;
  height: 24px;
  padding: 0 8px;
  border-radius: 4px;
  background: var(--badge-bg);
  color: var(--badge-text);
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-variant-numeric: tabular-nums;
}

.count-pill.tone-sky {
  background: var(--tone-sky-bg);
  color: var(--tone-sky);
}

.count-pill.tone-emerald {
  background: var(--tone-emerald-bg);
  color: var(--tone-emerald);
}

.count-pill.tone-amber {
  background: var(--tone-amber-bg);
  color: var(--tone-amber);
}

.count-pill.tone-violet {
  background: var(--tone-violet-bg);
  color: var(--tone-violet);
}

.count-pill.tone-rose {
  background: var(--tone-rose-bg);
  color: var(--tone-rose);
}

.count-pill.tone-azure {
  background: var(--tone-azure-bg);
  color: var(--tone-azure);
}

/* 左侧网站访问人数卡片 */
.visitor-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.visitor-hero-box {
  padding: 13px 14px 12px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--tone-sky-bg), var(--tone-azure-bg));
  border: 1px solid var(--border-subtle);
}

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

.visitor-hero-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.visitor-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--tone-emerald);
  font-size: 0.7rem;
  font-weight: 700;
}

[data-theme='dark'] .visitor-live-pill {
  background: rgba(15, 23, 42, 0.55);
}

.visitor-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tone-emerald);
  box-shadow: 0 0 0 3px var(--tone-emerald-bg);
  animation: visitorPulse 2.2s ease-in-out infinite;
}

@keyframes visitorPulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.55;
    transform: scale(0.86);
  }
}

.visitor-hero-num {
  display: flex;
  align-items: baseline;
  gap: 5px;
  line-height: 1.15;
}

.visitor-hero-num strong {
  font-size: 1.72rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--tone-sky);
  font-variant-numeric: tabular-nums;
}

.visitor-hero-num span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.visitor-sub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.visitor-sub-tile {
  padding: 9px 11px;
  border-radius: var(--radius-md);
  background: var(--tone-azure-bg);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.visitor-sub-tile.tone-emerald {
  background: var(--tone-emerald-bg);
}

.visitor-sub-label {
  font-size: 0.74rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.visitor-sub-value {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--tone-azure);
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}

.visitor-sub-tile.tone-emerald .visitor-sub-value {
  color: var(--tone-emerald);
}

.visitor-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px dashed var(--border-strong);
  font-size: 0.76rem;
  color: var(--text-muted);
}

.visitor-foot strong {
  color: var(--text-main);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   中间顶部快捷分类栏（对应参考图2）
   ========================================================================== */
.filter-strip {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.strip-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: none;
  border-radius: 5px;
  background: var(--badge-bg);
  color: var(--badge-text);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background var(--transition),
    color var(--transition),
    transform 0.15s ease;
}

.strip-chip:hover {
  background: var(--badge-hover);
}

.strip-chip.active {
  background: var(--primary);
  color: #ffffff;
}

.strip-chip.icon-only {
  padding: 7px 10px;
}

.strip-chip .chip-num {
  opacity: 0.82;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.strip-more {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--primary);
  transition: background var(--transition);
}

.strip-more:hover {
  background: var(--primary-soft);
}

/* ==========================================================================
   中间主内容视图：主页文章卡片列表
   ========================================================================== */
.view-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.active-filter-banner {
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.active-filter-banner strong {
  color: var(--primary);
}

.clear-filter-btn {
  border: none;
  padding: 5px 12px;
  border-radius: 5px;
  background: var(--badge-bg);
  color: var(--badge-text);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.clear-filter-btn:hover {
  background: var(--primary);
  color: #fff;
}

.post-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 232px;
  gap: 0;
  min-height: 204px;
  overflow: hidden;
  cursor: pointer;
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    border-color var(--transition);
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-strong);
}

.post-card-body {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.post-card-title {
  margin: 0;
  font-size: 1.32rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.35;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: color var(--transition);
}

.post-card-title::before {
  content: '';
  width: 4px;
  height: 20px;
  border-radius: 99px;
  background: var(--primary);
  flex-shrink: 0;
  opacity: 0.72;
  transition:
    height 0.2s ease,
    opacity 0.2s ease;
}

.post-card:hover .post-card-title {
  color: var(--primary);
}

.post-card:hover .post-card-title::before {
  height: 24px;
  opacity: 1;
}

.pin-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--badge-bg);
  color: var(--badge-text);
  font-size: 0.74rem;
  font-weight: 700;
  flex-shrink: 0;
}

.post-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 5px;
  background: var(--badge-bg);
  color: var(--badge-text);
  font-size: 0.8rem;
  font-weight: 600;
}

.meta-pill.subtle {
  background: transparent;
  padding: 2px 4px;
  color: var(--text-muted);
  font-weight: 500;
}

.post-excerpt {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.72;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.post-read-more {
  color: var(--primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.post-card-cover {
  position: relative;
  overflow: hidden;
  background: var(--badge-bg);
  min-height: 204px;
}

.post-card-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.post-card:hover .post-card-cover img {
  transform: scale(1.07);
}

.cover-enter-badge {
  position: absolute;
  inset: 0;
  background: hsla(var(--hue), 72%, 22%, 0.24);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.post-card:hover .cover-enter-badge {
  opacity: 1;
}

/* ==========================================================================
   文章详情页（高度还原参考图1的阅读骨架与蓝色排版）
   ========================================================================== */
.article-card {
  padding: 28px 32px 32px;
}

.article-stats-top {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.article-stats-top span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.article-h1 {
  margin: 0 0 14px;
  font-size: clamp(1.65rem, 2.5vw, 2.15rem);
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 12px;
}

.article-h1::before {
  content: '';
  width: 5px;
  height: 28px;
  border-radius: 99px;
  background: var(--primary);
  flex-shrink: 0;
}

.article-cover-hero {
  margin: 20px 0 24px;
  border-radius: 7px;
  overflow: hidden;
  max-height: 310px;
  border: 1px solid var(--border-subtle);
}

.article-cover-hero img {
  width: 100%;
  height: 310px;
  object-fit: cover;
}

/* 文章正文排版 */
.prose {
  color: var(--text-body);
  font-size: 0.98rem;
  line-height: 1.88;
}

.prose h2 {
  margin: 30px 0 14px;
  font-size: 1.48rem;
  font-weight: 800;
  color: var(--text-main);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
  scroll-margin-top: calc(var(--nav-height) + 22px);
}

.prose h3 {
  margin: 22px 0 10px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  scroll-margin-top: calc(var(--nav-height) + 22px);
}

.prose p {
  margin: 0 0 15px;
}

.prose ul {
  margin: 0 0 16px;
  padding-left: 22px;
}

.prose li {
  margin-bottom: 7px;
}

.prose li::marker {
  color: var(--primary);
}

.prose a {
  color: var(--primary);
  font-weight: 600;
  border-bottom: 1px dashed hsla(var(--hue), 80%, 52%, 0.45);
}

.prose a:hover {
  border-bottom-style: solid;
}

.prose code {
  font-family: 'JetBrains Mono', 'Cascadia Code', Consolas, monospace;
  font-size: 0.87em;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--code-bg);
  color: var(--badge-text);
}

.prose pre {
  position: relative;
  margin: 16px 0 20px;
  padding: 18px 20px;
  border-radius: 4px;
  background: var(--pre-bg);
  color: #e2ecf9;
  overflow-x: auto;
  line-height: 1.65;
}

.prose pre code {
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: 0.88rem;
}

.copy-code-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 1px solid rgba(147, 197, 253, 0.25);
  background: rgba(59, 130, 246, 0.22);
  color: #dbeafe;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.copy-code-btn:hover {
  background: rgba(59, 130, 246, 0.45);
}

.prose blockquote {
  margin: 16px 0 18px;
  padding: 12px 16px;
  border-left: 4px solid var(--primary);
  border-radius: 0 6px 6px 0;
  background: var(--primary-soft);
  color: var(--text-body);
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 22px;
  font-size: 0.92rem;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

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

.prose th {
  background: var(--badge-bg);
  color: var(--badge-text);
  font-weight: 700;
}

/* 文章底部版权与上下篇导航 */
.license-box {
  margin-top: 28px;
  padding: 15px 18px;
  border-radius: 4px;
  background: var(--primary-soft);
  border: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}

.license-box strong {
  color: var(--badge-text);
}

.post-nav-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.post-nav-card {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition:
    transform var(--transition),
    border-color var(--transition),
    box-shadow var(--transition);
}

.post-nav-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow-hover);
}

.post-nav-card.next {
  text-align: right;
}

.post-nav-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.post-nav-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

/* ==========================================================================
   关于我页（对应参考图2）、归档、动态、图集、友链
   ========================================================================== */
.page-card {
  padding: 28px 32px;
}

.page-title {
  margin: 0 0 16px;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
}

.page-lead {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.moment-full-text {
  margin: 0;
  color: var(--text-body);
  font-size: 0.95rem;
}

.about-link-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.about-link-list li {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.96rem;
}

.about-link-list .about-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 4px;
  background: var(--badge-bg);
  color: var(--badge-text);
  font-size: 0.9rem;
}

.about-link-list a {
  color: var(--primary);
  font-weight: 600;
}

.about-link-list a:hover {
  text-decoration: underline;
}

/* 时间归档 */
.archive-year {
  margin: 12px 0 14px;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

.archive-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.archive-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 14px;
  border-radius: 4px;
  transition:
    background var(--transition),
    transform var(--transition);
  cursor: pointer;
}

.archive-item:hover {
  background: var(--primary-soft);
  transform: translateX(4px);
}

.archive-date {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  width: 56px;
  flex-shrink: 0;
}

.archive-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px var(--badge-bg);
  flex-shrink: 0;
}

.archive-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-main);
  flex: 1;
}

.archive-cat {
  font-size: 0.78rem;
  padding: 3px 9px;
  border-radius: 4px;
  background: var(--badge-bg);
  color: var(--badge-text);
  font-weight: 600;
}

/* 蓝调图集 */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.gallery-item {
  border-radius: 7px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--page-bg);
  cursor: zoom-in;
  transition:
    transform var(--transition),
    box-shadow var(--transition);
}

.gallery-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.gallery-thumb {
  height: 210px;
  overflow: hidden;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.gallery-item:hover .gallery-thumb img {
  transform: scale(1.06);
}

.gallery-caption {
  padding: 12px 14px;
  background: var(--card-bg);
}

.gallery-caption-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.gallery-caption strong {
  font-size: 0.94rem;
  color: var(--text-main);
}

.gallery-caption p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* 子页面顶部横幅插画（归档 / 关于我 / 友链） */
.page-hero-banner {
  position: relative;
  margin: 0 0 22px;
  height: 220px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  cursor: zoom-in;
}

.page-hero-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.page-hero-banner:hover img {
  transform: scale(1.04);
}

.page-hero-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 36, 66, 0.06) 25%,
    rgba(12, 30, 58, 0.68) 100%
  );
  pointer-events: none;
}

.page-hero-caption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  color: #f4f9ff;
  font-size: 0.86rem;
  font-weight: 600;
  text-shadow: 0 2px 10px rgba(8, 22, 46, 0.55);
}

.page-hero-tag {
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.36);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

/* 动态全列表 */
.moments-full-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}

.moment-full-card {
  padding: 16px 18px;
  border-radius: 4px;
  background: var(--page-bg);
  border: 1px solid var(--border-subtle);
}

.moment-photo {
  margin: 12px 0 0;
  height: 220px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  cursor: zoom-in;
}

.moment-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.moment-photo:hover img {
  transform: scale(1.04);
}

/* 友情链接网格 */
.friends-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.friend-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 4px;
  background: var(--page-bg);
  border: 1px solid var(--border-subtle);
  transition:
    transform var(--transition),
    border-color var(--transition),
    background var(--transition);
}

.friend-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  background: var(--primary-soft);
}

.friend-avatar {
  width: 54px;
  height: 54px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}

.friend-info h4 {
  margin: 0 0 3px;
  font-size: 0.96rem;
  color: var(--text-main);
}

.friend-info p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ==========================================================================
   右侧栏组件：最新动态 / 站点统计 / 站点信息 / 文章目录
   ========================================================================== */
.moments-mini-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.moment-mini-item {
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border-strong);
}

.moment-mini-item:last-child {
  padding-bottom: 4px;
  border-bottom: none;
}

.moment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
}

.moment-date {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

.moment-date svg {
  color: var(--tone-amber);
}

.moment-pin {
  padding: 1px 7px;
  border-radius: 4px;
  background: var(--tone-rose-bg);
  color: var(--tone-rose);
  font-size: 0.7rem;
  font-weight: 700;
}

.moment-text {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.62;
}

.widget-more-link {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 5px;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--primary);
  transition: background var(--transition);
}

.widget-more-link svg {
  color: var(--tone-rose);
}

.widget-more-link:hover {
  background: var(--primary-soft);
}

/* 站点统计（对应参考图2） */
.stats-list,
.info-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stats-list li,
.info-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.85rem;
}

.stat-label,
.info-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}

.stat-label svg,
.info-label svg {
  color: currentColor;
  flex-shrink: 0;
}

.stats-list strong,
.info-list strong {
  color: var(--text-main);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
  white-space: nowrap;
}

.build-toggle-btn {
  margin-top: 12px;
  width: 100%;
  border: none;
  background: transparent;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 7px 8px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: background var(--transition);
}

.build-toggle-btn:hover {
  background: var(--primary-soft);
}

.build-toggle-btn[aria-expanded='true'] .chevron {
  transform: rotate(180deg);
}

.build-extra {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-strong);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.build-extra[hidden] {
  display: none;
}

.build-extra-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* 文章目录（对应参考图1：数字方标 + 子节缩进 + 滚动高亮 + 吸顶） */
.toc-card {
  position: sticky;
  top: var(--sticky-top);
  transition:
    top 0.36s cubic-bezier(0.22, 1, 0.36, 1),
    background-color 0.3s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.toc-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 4px;
  font-size: 0.86rem;
  color: var(--text-secondary);
  transition:
    background var(--transition),
    color var(--transition);
}

.toc-link:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.toc-link.active {
  background: var(--badge-bg);
  color: var(--badge-text);
  font-weight: 700;
}

.toc-num {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: var(--badge-bg);
  color: var(--badge-text);
  font-size: 0.76rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toc-list .toc-link:nth-child(6n + 1) .toc-num {
  background: var(--tone-sky-bg);
  color: var(--tone-sky);
}

.toc-list .toc-link:nth-child(6n + 2) .toc-num {
  background: var(--tone-azure-bg);
  color: var(--tone-azure);
}

.toc-list .toc-link:nth-child(6n + 3) .toc-num {
  background: var(--tone-amber-bg);
  color: var(--tone-amber);
}

.toc-list .toc-link:nth-child(6n + 4) .toc-num {
  background: var(--tone-violet-bg);
  color: var(--tone-violet);
}

.toc-list .toc-link:nth-child(6n + 5) .toc-num {
  background: var(--tone-emerald-bg);
  color: var(--tone-emerald);
}

.toc-list .toc-link:nth-child(6n + 6) .toc-num {
  background: var(--tone-rose-bg);
  color: var(--tone-rose);
}

.toc-list .toc-link.active .toc-num {
  background: linear-gradient(135deg, var(--tone-sky), var(--tone-violet));
  color: #ffffff;
}

.toc-link.level-3 {
  padding-left: 22px;
  font-size: 0.83rem;
}

.toc-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.65;
  flex-shrink: 0;
}

/* 页脚 */
.site-footer {
  padding: 20px 24px;
  text-align: center;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.site-footer p {
  margin: 0;
}

.site-footer .footer-sub {
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.site-footer a {
  color: var(--primary);
  font-weight: 600;
}

/* ==========================================================================
   右下角悬浮按钮（对应参考图1、2）
   ========================================================================== */
.floating-dock {
  position: fixed;
  right: 14px;
  bottom: 22px;
  z-index: 45;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.dock-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background: var(--card-bg);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition:
    transform var(--transition),
    background var(--transition),
    color var(--transition),
    box-shadow var(--transition);
}

.dock-btn:hover {
  background: var(--primary);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* 灯箱 & 轻提示 & 移动端抽屉 */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(8, 20, 42, 0.86);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-figure {
  margin: 0;
  max-width: min(92vw, 980px);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.lightbox-figure img {
  max-height: 78vh;
  width: auto;
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.lightbox-figure figcaption {
  color: #e2ecf9;
  font-size: 0.94rem;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  padding: 9px 18px;
  border-radius: 7px;
  background: hsl(var(--hue), 44%, 18%);
  color: #f0f7ff;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 10px 28px rgba(8, 24, 54, 0.28);
  opacity: 0;
  pointer-events: none;
  z-index: 130;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(10, 24, 48, 0.46);
  backdrop-filter: blur(4px);
}

.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 270px;
  z-index: 100;
  background: var(--card-bg);
  padding: 18px;
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: var(--shadow-hover);
}

.mobile-drawer.open {
  transform: translateX(0);
}

.mobile-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 12px;
  color: var(--text-main);
  font-weight: 700;
}

.mobile-drawer-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mobile-drawer-links a {
  padding: 10px 12px;
  border-radius: 4px;
  font-weight: 600;
  color: var(--text-main);
}

.mobile-drawer-links a:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

/* ==========================================================================
   主页专属布局：两侧信息栏贴近外侧留白 + 大图片跳转模式 + 背景图渐变融合
   （仅作用于未筛选的默认主页，不影响文章页、归档页、关于页等其他页面）
   ========================================================================== */
body[data-route='home'][data-filtered='false'] .navbar {
  max-width: min(1820px, 100%);
}

body[data-route='home'][data-filtered='false'] .hero-bridge {
  background: linear-gradient(
    180deg,
    hsla(var(--hue), 54%, 95%, 0.92) 0%,
    hsla(var(--hue), 54%, 95%, 0.52) 60%,
    transparent 100%
  );
  border-top: none;
  border-bottom: none;
  box-shadow: none;
  backdrop-filter: blur(10px) saturate(135%);
  -webkit-backdrop-filter: blur(10px) saturate(135%);
}

[data-theme='dark'] body[data-route='home'][data-filtered='false'] .hero-bridge {
  background: linear-gradient(
    180deg,
    hsla(var(--hue), 32%, 10%, 0.94) 0%,
    hsla(var(--hue), 32%, 10%, 0.56) 60%,
    transparent 100%
  );
}

body[data-route='home'][data-filtered='false'] .hero-bridge-inner {
  max-width: min(1820px, 100%);
  padding: 18px clamp(14px, 1.5vw, 24px);
}

body[data-route='home'][data-filtered='false'] .page-shell {
  padding: 20px clamp(14px, 1.5vw, 26px) 76px;
  scroll-margin-top: calc(var(--nav-height) + 10px);
}

body[data-route='home'][data-filtered='false'] .layout-grid {
  max-width: min(1840px, 100%);
  grid-template-columns: 252px minmax(0, 1fr) 252px;
  gap: clamp(32px, 4.6vw, 94px);
  align-items: stretch;
}

body[data-route='home'][data-filtered='false'] .floating-dock {
  right: 10px;
  bottom: 18px;
  opacity: 0.84;
  transition: opacity 0.22s ease;
}

body[data-route='home'][data-filtered='false'] .floating-dock:hover {
  opacity: 1;
}

body[data-route='home'][data-filtered='false'] .filter-strip,
body[data-route='home'][data-filtered='false'] .site-footer {
  display: none;
}

body[data-route='home'][data-filtered='false'] .main-column {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  gap: 22px;
}

body[data-route='home'][data-filtered='false'] .sidebar .card,
body[data-route='home'][data-filtered='false'] .site-footer {
  background-color: var(--home-card-bg);
  backdrop-filter: blur(16px) saturate(148%);
  -webkit-backdrop-filter: blur(16px) saturate(148%);
  border-color: var(--home-card-border);
  box-shadow: var(--home-card-shadow);
}

/* 主页中间大图片视觉入口画廊 */
.home-portal-stage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  width: 100%;
}

.portal-card {
  position: relative;
  display: block;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  background: #0d1f3a;
  border: 1px solid rgba(255, 255, 255, 0.56);
  box-shadow: 0 14px 36px hsla(var(--hue), 58%, 20%, 0.14);
  isolation: isolate;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.32s ease;
}

[data-theme='dark'] .portal-card {
  border-color: hsla(var(--hue), 68%, 74%, 0.22);
  box-shadow: 0 16px 40px rgba(2, 8, 22, 0.54);
}

.portal-card.portal-featured {
  grid-column: 1 / -1;
  height: clamp(410px, 34vw, 540px);
}

.portal-card.portal-portrait {
  height: clamp(380px, 32vw, 520px);
}

.portal-card.portal-wide {
  grid-column: 1 / -1;
  height: clamp(270px, 23vw, 370px);
}

.portal-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition:
    transform 0.72s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.45s ease;
}

.portal-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(8, 22, 48, 0.18) 0%,
    rgba(8, 22, 48, 0.02) 32%,
    rgba(8, 22, 48, 0.1) 58%,
    rgba(7, 19, 42, 0.74) 100%
  );
  transition: background 0.38s ease;
}

.portal-top {
  position: absolute;
  top: 18px;
  left: 18px;
  right: 18px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.portal-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: 6px;
  background: rgba(10, 24, 50, 0.44);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: rgba(244, 249, 255, 0.96);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.portal-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.9);
}

.portal-card.tone-sky .portal-badge-dot {
  background: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.95);
}

.portal-card.tone-azure .portal-badge-dot {
  background: #60a5fa;
  box-shadow: 0 0 10px rgba(96, 165, 250, 0.95);
}

.portal-card.tone-amber .portal-badge-dot {
  background: #fbbf24;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.95);
}

.portal-card.tone-violet .portal-badge-dot {
  background: #c084fc;
  box-shadow: 0 0 10px rgba(192, 132, 252, 0.95);
}

.portal-card.tone-emerald .portal-badge-dot {
  background: #34d399;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.95);
}

.portal-card.tone-rose .portal-badge-dot {
  background: #fb7185;
  box-shadow: 0 0 10px rgba(251, 113, 133, 0.95);
}

.portal-bottom {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 20px;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.portal-title {
  margin: 0;
  font-size: clamp(1.16rem, 1.6vw, 1.48rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.3;
  letter-spacing: 0.01em;
  text-shadow: 0 4px 18px rgba(4, 14, 34, 0.62);
}

.portal-card.portal-featured .portal-title {
  font-size: clamp(1.42rem, 2.2vw, 1.92rem);
}

.portal-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 15px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px) saturate(145%);
  -webkit-backdrop-filter: blur(12px) saturate(145%);
  border: 1px solid rgba(255, 255, 255, 0.36);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  transition:
    background 0.28s ease,
    border-color 0.28s ease,
    transform 0.28s ease,
    box-shadow 0.28s ease;
}

.portal-cta svg {
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.portal-card:hover,
.portal-card:focus-visible {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.86);
  box-shadow: 0 22px 48px hsla(var(--hue), 68%, 22%, 0.24);
  outline: none;
}

.portal-card:hover .portal-img,
.portal-card:focus-visible .portal-img {
  transform: scale(1.055);
  filter: saturate(1.06);
}

.portal-card:hover .portal-cta,
.portal-card:focus-visible .portal-cta {
  background: linear-gradient(135deg, hsla(var(--hue), 88%, 54%, 0.94), rgba(124, 58, 237, 0.92));
  border-color: rgba(255, 255, 255, 0.65);
  box-shadow: 0 8px 20px hsla(var(--hue), 82%, 44%, 0.42);
}

.portal-card:hover .portal-cta svg,
.portal-card:focus-visible .portal-cta svg {
  transform: translateX(4px);
}

.portal-card.portal-portrait .portal-bottom {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

/* 主页专属底层封栏（极简纯色实线隔离，与上方内容明确分区） */
.home-closing-bar {
  display: none;
  position: relative;
  z-index: 6;
  width: 100%;
  margin-top: 12px;
  background-color: var(--closing-bg);
  border-top: 2px solid var(--closing-divider);
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease;
}

body[data-route='home'][data-filtered='false'] .home-closing-bar {
  display: block;
}

.closing-bar-inner {
  max-width: min(1820px, 100%);
  margin: 0 auto;
  padding: 22px max(68px, 4.2vw) 22px clamp(16px, 2vw, 32px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 24px;
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.closing-brand,
.closing-meta {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.closing-brand strong {
  color: var(--text-main);
  font-weight: 800;
  font-size: 0.92rem;
}

.closing-sep {
  opacity: 0.5;
}

.closing-meta a {
  color: var(--primary);
  font-weight: 600;
  transition: opacity var(--transition);
}

.closing-meta a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

@media (max-width: 720px) {
  .closing-bar-inner {
    padding: 18px 16px;
    justify-content: center;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .web-bg-photo,
  .portal-img,
  .portal-card {
    transition: none;
  }
}

/* ==========================================================================
   响应式适配（平板 / 窄屏 / 手机）
   ========================================================================== */
@media (max-width: 1220px) {
  .nav-link {
    padding: 7px 9px;
    font-size: 0.88rem;
  }
  .search-box {
    width: 132px;
  }
  .search-box:focus-within {
    width: 170px;
  }
}

@media (max-width: 1180px) {
  .layout-grid,
  body[data-route='home'][data-filtered='false'] .layout-grid {
    grid-template-columns: 248px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
  }
  body[data-route='home'][data-filtered='false'] .main-column {
    max-width: none;
  }
  .sidebar-right {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .toc-card {
    position: static;
  }
}

@media (max-width: 1040px) {
  .nav-menu {
    display: none;
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
}

@media (max-width: 820px) {
  .layout-grid,
  body[data-route='home'][data-filtered='false'] .layout-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  .sidebar-left {
    order: 2;
  }
  .main-column {
    order: 1;
  }
  .sidebar-right {
    order: 3;
    grid-template-columns: minmax(0, 1fr);
  }
  .post-card {
    grid-template-columns: minmax(0, 1fr);
  }
  .post-card-cover {
    order: -1;
    height: 190px;
  }
  .article-card,
  .page-card {
    padding: 20px;
  }
  .post-nav-grid,
  .gallery-grid,
  .friends-grid,
  .home-portal-stage {
    grid-template-columns: minmax(0, 1fr);
  }
  .portal-card.portal-featured {
    height: auto;
    aspect-ratio: 4 / 3;
    min-height: 280px;
  }
  .portal-card.portal-portrait {
    height: auto;
    aspect-ratio: 4 / 5;
    min-height: 360px;
  }
  .portal-card.portal-wide {
    height: auto;
    aspect-ratio: 16 / 10;
    min-height: 220px;
  }
  .portal-card.portal-portrait .portal-bottom {
    flex-direction: row;
    align-items: flex-end;
  }
}

@media (max-width: 520px) {
  .navbar-wrapper {
    padding: 0 8px;
  }
  .navbar {
    padding: 0 12px;
  }
  .search-box {
    display: none;
  }
  .hero-bridge-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 16px;
    gap: 12px;
  }
  .page-shell,
  body[data-route='home'][data-filtered='false'] .page-shell {
    padding: 16px 10px 44px;
  }
  .portal-bottom,
  .portal-card.portal-portrait .portal-bottom {
    left: 16px;
    right: 16px;
    bottom: 16px;
    flex-direction: column;
    align-items: flex-start;
  }
  .floating-dock {
    right: 12px;
    bottom: 16px;
  }
}

/* ==========================================================================
   其他页面专属布局（去两侧栏 + 居中放大主内容 + 同色系渐变底层）
   仅作用于非默认主页的其他页面，不影响默认主页布局与配色
   ========================================================================== */
body[data-subpage='true'] .web-bg {
  background-color: hsl(var(--hue), 54%, 91%);
  background-image: linear-gradient(
    155deg,
    hsl(calc(var(--hue) - 16), 74%, 87.5%) 0%,
    hsl(calc(var(--hue) - 4), 64%, 92%) 34%,
    hsl(calc(var(--hue) + 12), 58%, 91.5%) 68%,
    hsl(calc(var(--hue) + 24), 56%, 87.5%) 100%
  );
}

body[data-subpage='true'] .web-bg-gradient {
  opacity: 1;
  background:
    radial-gradient(
      ellipse 66% 52% at 12% 14%,
      hsla(calc(var(--hue) - 20), 90%, 78%, 0.48),
      transparent 68%
    ),
    radial-gradient(
      ellipse 60% 48% at 88% 20%,
      hsla(calc(var(--hue) + 26), 82%, 82%, 0.44),
      transparent 68%
    ),
    radial-gradient(
      ellipse 72% 50% at 50% 94%,
      hsla(calc(var(--hue) - 8), 78%, 82%, 0.36),
      transparent 72%
    );
}

[data-theme='dark'] body[data-subpage='true'] .web-bg {
  background-color: hsl(var(--hue), 34%, 10%);
  background-image: linear-gradient(
    155deg,
    hsl(calc(var(--hue) - 14), 44%, 14.5%) 0%,
    hsl(var(--hue), 36%, 10.5%) 38%,
    hsl(calc(var(--hue) + 14), 38%, 12%) 72%,
    hsl(calc(var(--hue) + 26), 40%, 15%) 100%
  );
}

[data-theme='dark'] body[data-subpage='true'] .web-bg-gradient {
  opacity: 1;
  background:
    radial-gradient(
      ellipse 66% 52% at 14% 16%,
      hsla(calc(var(--hue) - 16), 82%, 40%, 0.24),
      transparent 68%
    ),
    radial-gradient(
      ellipse 60% 48% at 86% 22%,
      hsla(calc(var(--hue) + 28), 72%, 42%, 0.22),
      transparent 68%
    ),
    radial-gradient(
      ellipse 70% 50% at 50% 94%,
      hsla(var(--hue), 70%, 34%, 0.22),
      transparent 72%
    );
}

/* 非主页隐藏全屏开屏与桥接栏，同时隐藏两侧栏目、居中放大主内容区 */
body[data-subpage='true'] {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

body[data-subpage='true'] .hero-section,
body[data-subpage='true'] .hero-bridge,
body[data-subpage='true'] .sidebar-left,
body[data-subpage='true'] .sidebar-right,
body[data-subpage='true'] .site-footer {
  display: none;
}

body[data-subpage='true'] .page-shell {
  flex: 1 0 auto;
  width: 100%;
  padding: calc(var(--nav-height) + 26px) clamp(18px, 3vw, 36px) 64px;
  scroll-margin-top: calc(var(--nav-height) + 12px);
}

body[data-subpage='true'] .layout-grid {
  max-width: min(1080px, 100%);
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

body[data-subpage='true'] .main-column {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  gap: 20px;
}

body[data-subpage='true'] .view-container {
  gap: 20px;
}

body[data-subpage='true'] .main-column .card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px) saturate(145%);
  -webkit-backdrop-filter: blur(16px) saturate(145%);
  border-color: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 32px hsla(var(--hue), 58%, 26%, 0.09);
}

[data-theme='dark'] body[data-subpage='true'] .main-column .card {
  background: hsla(var(--hue), 28%, 14.5%, 0.9);
  border-color: hsla(var(--hue), 64%, 72%, 0.18);
  box-shadow: 0 12px 34px rgba(3, 10, 24, 0.46);
}

/* 放大顶部快捷分类条与内页排版细节 */
body[data-subpage='true'] .filter-strip {
  padding: 13px 18px;
  gap: 10px;
}

body[data-subpage='true'] .strip-chip {
  padding: 7px 14px;
  font-size: 0.9rem;
}

body[data-subpage='true'] .strip-more {
  font-size: 0.88rem;
}

body[data-subpage='true'] .article-card,
body[data-subpage='true'] .page-card {
  padding: 36px 46px 40px;
}

body[data-subpage='true'] .article-stats-top {
  font-size: 0.9rem;
  gap: 18px;
  margin-bottom: 12px;
}

body[data-subpage='true'] .article-h1 {
  font-size: clamp(1.9rem, 2.8vw, 2.45rem);
  margin-bottom: 16px;
}

body[data-subpage='true'] .article-h1::before {
  height: 32px;
}

body[data-subpage='true'] .article-cover-hero {
  margin: 24px 0 28px;
  max-height: 410px;
}

body[data-subpage='true'] .article-cover-hero img {
  height: 410px;
}

body[data-subpage='true'] .page-title {
  font-size: clamp(1.85rem, 2.6vw, 2.25rem);
  margin-bottom: 18px;
}

body[data-subpage='true'] .page-lead {
  font-size: 1rem;
  line-height: 1.75;
}

body[data-subpage='true'] .page-hero-banner {
  height: 310px;
  margin-bottom: 26px;
}

body[data-subpage='true'] .page-hero-caption {
  left: 22px;
  right: 22px;
  bottom: 18px;
  font-size: 0.94rem;
}

body[data-subpage='true'] .prose {
  font-size: 1.06rem;
  line-height: 1.92;
}

body[data-subpage='true'] .prose h2 {
  font-size: 1.62rem;
  margin: 34px 0 16px;
}

body[data-subpage='true'] .prose h3 {
  font-size: 1.26rem;
  margin: 26px 0 12px;
}

body[data-subpage='true'] .prose pre {
  padding: 20px 24px;
}

body[data-subpage='true'] .prose pre code {
  font-size: 0.94rem;
}

body[data-subpage='true'] .prose table {
  font-size: 0.98rem;
}

body[data-subpage='true'] .prose th,
body[data-subpage='true'] .prose td {
  padding: 12px 16px;
}

body[data-subpage='true'] .post-meta-row {
  gap: 10px;
}

body[data-subpage='true'] .meta-pill {
  padding: 5px 12px;
  font-size: 0.86rem;
}

body[data-subpage='true'] .license-box {
  padding: 18px 22px;
  font-size: 0.92rem;
}

body[data-subpage='true'] .post-nav-grid {
  gap: 18px;
}

body[data-subpage='true'] .post-nav-card {
  padding: 20px 24px;
  gap: 6px;
}

body[data-subpage='true'] .post-nav-label {
  font-size: 0.84rem;
}

body[data-subpage='true'] .post-nav-title {
  font-size: 1.05rem;
}

/* 筛选文章列表卡片放大 */
body[data-subpage='true'] .active-filter-banner {
  padding: 15px 22px;
  font-size: 0.96rem;
}

body[data-subpage='true'] .post-card {
  grid-template-columns: minmax(0, 1fr) 310px;
  min-height: 236px;
}

body[data-subpage='true'] .post-card-body {
  padding: 26px 30px;
}

body[data-subpage='true'] .post-card-title {
  font-size: 1.46rem;
}

body[data-subpage='true'] .post-excerpt {
  font-size: 0.98rem;
}

body[data-subpage='true'] .post-card-footer {
  font-size: 0.86rem;
}

body[data-subpage='true'] .post-card-cover {
  min-height: 236px;
}

/* 关于 / 归档 / 动态 / 图集 / 友链内页细节放大 */
body[data-subpage='true'] .about-link-list {
  gap: 14px;
}

body[data-subpage='true'] .about-link-list li {
  font-size: 1.03rem;
}

body[data-subpage='true'] .about-link-list .about-badge {
  width: 30px;
  height: 30px;
  font-size: 1rem;
}

body[data-subpage='true'] .archive-year {
  font-size: 1.6rem;
  margin: 16px 0;
}

body[data-subpage='true'] .archive-item {
  padding: 14px 18px;
  gap: 16px;
}

body[data-subpage='true'] .archive-date {
  font-size: 0.92rem;
  width: 62px;
}

body[data-subpage='true'] .archive-title {
  font-size: 1.06rem;
}

body[data-subpage='true'] .archive-cat {
  font-size: 0.84rem;
  padding: 4px 11px;
}

body[data-subpage='true'] .moments-full-list {
  gap: 18px;
  margin-top: 20px;
}

body[data-subpage='true'] .moment-full-card {
  padding: 22px 24px;
}

body[data-subpage='true'] .moment-full-text {
  font-size: 1.03rem;
  line-height: 1.8;
}

body[data-subpage='true'] .moment-photo {
  height: 330px;
  margin-top: 16px;
}

body[data-subpage='true'] .gallery-grid {
  gap: 22px;
  margin-top: 22px;
}

body[data-subpage='true'] .gallery-thumb {
  height: 295px;
}

body[data-subpage='true'] .gallery-caption {
  padding: 15px 18px;
}

body[data-subpage='true'] .gallery-caption strong {
  font-size: 1.04rem;
}

body[data-subpage='true'] .gallery-caption p {
  font-size: 0.88rem;
}

body[data-subpage='true'] .friends-grid {
  gap: 18px;
  margin-top: 22px;
}

body[data-subpage='true'] .friend-card {
  padding: 18px 20px;
  gap: 16px;
}

body[data-subpage='true'] .friend-avatar {
  width: 66px;
  height: 66px;
}

body[data-subpage='true'] .friend-info h4 {
  font-size: 1.06rem;
}

body[data-subpage='true'] .friend-info p {
  font-size: 0.88rem;
}

/* 其他页面底部全宽渐变封栏（与主页同色系呼应） */
body[data-subpage='true'] .home-closing-bar {
  display: block;
  margin-top: 8px;
  background: linear-gradient(
    135deg,
    hsla(calc(var(--hue) - 16), 68%, 85%, 0.86) 0%,
    hsla(var(--hue), 60%, 89%, 0.9) 52%,
    hsla(calc(var(--hue) + 24), 56%, 86%, 0.88) 100%
  );
  backdrop-filter: blur(16px) saturate(145%);
  -webkit-backdrop-filter: blur(16px) saturate(145%);
  border-top: 1.5px solid hsla(var(--hue), 66%, 56%, 0.42);
}

[data-theme='dark'] body[data-subpage='true'] .home-closing-bar {
  background: linear-gradient(
    135deg,
    hsla(calc(var(--hue) - 14), 44%, 13%, 0.92) 0%,
    hsla(var(--hue), 38%, 10%, 0.94) 52%,
    hsla(calc(var(--hue) + 24), 40%, 14%, 0.92) 100%
  );
  border-top-color: hsla(var(--hue), 68%, 54%, 0.36);
}

body[data-subpage='true'] .closing-bar-inner {
  max-width: min(1080px, calc(100% - 36px));
  padding: 24px 0;
}

@media (max-width: 1240px) {
  body[data-subpage='true'] .closing-bar-inner {
    max-width: min(1080px, 100%);
    padding: 22px 68px 22px clamp(18px, 3vw, 36px);
  }
}

@media (max-width: 820px) {
  body[data-subpage='true'] .article-card,
  body[data-subpage='true'] .page-card {
    padding: 24px 20px;
  }
  body[data-subpage='true'] .article-cover-hero,
  body[data-subpage='true'] .article-cover-hero img {
    max-height: 260px;
    height: 260px;
  }
  body[data-subpage='true'] .page-hero-banner,
  body[data-subpage='true'] .moment-photo {
    height: 220px;
  }
  body[data-subpage='true'] .gallery-thumb {
    height: 230px;
  }
  body[data-subpage='true'] .post-card {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }
  body[data-subpage='true'] .post-card-cover {
    min-height: 200px;
    height: 200px;
  }
  body[data-subpage='true'] .closing-bar-inner {
    padding: 20px 16px;
  }
}

@media (max-width: 520px) {
  body[data-subpage='true'] .page-shell {
    padding: calc(var(--nav-height) + 16px) 10px 44px;
  }
  body[data-subpage='true'] .article-card,
  body[data-subpage='true'] .page-card {
    padding: 20px 16px;
  }
}
