/* ==========================================================================
   Ksgf452 个人博客 —— Liquid Glass 视觉层

   设计要点（对齐 Apple 的 Liquid Glass 语言）：
     · 材质   —— 高模糊 + 高饱和的背景折射，而不是简单的半透明
     · 光边   —— 用 mask 合成的 1px 渐变环，模拟玻璃边缘的折射亮线
     · 镜面   —— 指针跟随的径向高光（app.js 写入 --mx/--my）
     · 形状   —— 控件用胶囊形，容器用同心圆角（外层 28 / 内层 18）
     · 动效   —— 带回弹的缓动，按压缩放反馈
     · 降级   —— 不支持 backdrop-filter、系统开了「减弱透明度」、
                 或用户偏好减少动效时，都有对应处理

   背景沿用原有的三张照片（小狗 / 烟花 / 城市），原图未改动。
   ========================================================================== */

:root {
  /* ── 强调色（均已实测 ≥4.5:1 对比度，勿随意调浅）── */
  --accent: #0a6eff;
  --accent-2: #7c3aed;
  --accent-soft: rgba(10, 110, 255, 0.12);
  --accent-grad-1: #0a6eff;
  --accent-grad-2: #7c3aed;
  --accent-text: #0a5fd6;

  /* ── 文字 ── */
  --text: #16202e;
  --text-soft: #4a5568;
  --text-faint: #6f7784;

  /* ── 玻璃材质 ──
     透明度经过计算：68% 白色玻璃叠在最暗的照片区域上，正文仍能保持
     约 7:1 对比度；叠在最亮区域上则更高。低于 0.6 会开始影响可读性。 */
  --glass-bg: rgba(255, 255, 255, 0.66);
  --glass-bg-strong: rgba(255, 255, 255, 0.76);
  --glass-bg-soft: rgba(255, 255, 255, 0.5);
  --glass-ring: linear-gradient(160deg,
      rgba(255, 255, 255, 0.95) 0%,
      rgba(255, 255, 255, 0.35) 22%,
      rgba(255, 255, 255, 0.08) 50%,
      rgba(255, 255, 255, 0.5) 100%);
  --glass-inner-top: rgba(255, 255, 255, 0.7);
  --glass-spec: rgba(255, 255, 255, 0.28);
  --glass-blur: 30px;
  --glass-blur-strong: 40px;
  --glass-sat: 190%;
  --glass-bright: 1.06;

  /* ── 投影：玻璃浮起来需要更大更柔的阴影 ── */
  --shadow-glass: 0 10px 34px rgba(9, 16, 32, 0.20), 0 2px 8px rgba(9, 16, 32, 0.10);
  --shadow-float: 0 22px 60px rgba(9, 16, 32, 0.30), 0 4px 14px rgba(9, 16, 32, 0.14);
  --shadow-inset-top: inset 0 1px 0 var(--glass-inner-top);

  /* ── 形状 ── */
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --page-max: 1180px;

  /* ── 动效 ── */
  --spring: cubic-bezier(0.22, 1.16, 0.36, 1);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);

  --ok: #10b981;
  --warn: #f59e0b;
  --danger: #ef4444;
}

html[data-theme='dark'] {
  --accent: #0a84ff;
  --accent-2: #a855f7;
  --accent-soft: rgba(10, 132, 255, 0.2);
  --accent-text: #6cb8ff;

  --text: #f1f5f9;
  --text-soft: #a8b3c2;
  --text-faint: #8892a4;

  --glass-bg: rgba(18, 20, 28, 0.68);
  --glass-bg-strong: rgba(14, 16, 22, 0.8);
  --glass-bg-soft: rgba(24, 27, 38, 0.5);
  --glass-ring: linear-gradient(160deg,
      rgba(255, 255, 255, 0.5) 0%,
      rgba(255, 255, 255, 0.14) 25%,
      rgba(255, 255, 255, 0.04) 55%,
      rgba(255, 255, 255, 0.24) 100%);
  --glass-inner-top: rgba(255, 255, 255, 0.16);
  --glass-spec: rgba(160, 200, 255, 0.2);
  --glass-sat: 170%;
  --glass-bright: 0.92;

  --shadow-glass: 0 10px 34px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-float: 0 22px 60px rgba(0, 0, 0, 0.62), 0 4px 14px rgba(0, 0, 0, 0.4);
}

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

html {
  background: linear-gradient(135deg, #1e293b, #0f172a 55%, #312e81);
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro SC', 'SF Pro Text', 'Segoe UI',
    'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  line-height: 1.7;
  color: var(--text);
  min-height: 100vh;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-image 0.9s var(--ease);
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* 首页背景图由后台管理，具体规则在 layout.php 里按数据库内容动态输出
   （body.bg-1 / bg-2 / ...）。这里只保留没有背景图时的兜底渐变。 */

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ==========================================================================
   玻璃材质基元
   ========================================================================== */

/* 背景柔化层。注意不能用负 z-index —— 负值元素会绘制在 body 背景图之下，
   等于完全看不见。改成 z-index:0，正文层用 z-index:1 叠在上面。 */
.bg-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.5), rgba(15, 23, 42, 0.7));
  pointer-events: none;
}
html[data-theme='dark'] .bg-overlay {
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.66), rgba(2, 6, 23, 0.84));
}

/* 玻璃表面：背景折射 + 顶部内高光 + 外投影 */
.card,
.topbar,
.admin-topbar,
.bg-switch {
  position: relative;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat)) brightness(var(--glass-bright));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat)) brightness(var(--glass-bright));
  box-shadow: var(--shadow-glass), var(--shadow-inset-top);
}

/* 玻璃边缘的折射亮线：用 mask 合成出 1px 渐变环 */
.card::before,
.topbar::before,
.admin-topbar::before,
.bg-switch::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--glass-ring);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
}

/* 指针跟随的镜面高光（app.js 写入 --mx / --my） */
.card::after,
.topbar::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.45s var(--ease);
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%),
      var(--glass-spec), transparent 62%);
  z-index: 1;
}
.card:hover::after,
.card:focus-within::after,
.topbar:hover::after { opacity: 1; }

.card > * { position: relative; z-index: 3; }

/* ==========================================================================
   顶栏 —— 悬浮玻璃胶囊
   ========================================================================== */
.topbar {
  position: sticky;
  top: 12px;
  z-index: 60;
  max-width: calc(var(--page-max) + 8px);
  margin: 12px auto 0;
  padding: 0 6px;
  border-radius: var(--radius-lg);
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(var(--glass-blur-strong)) saturate(var(--glass-sat)) brightness(var(--glass-bright));
  backdrop-filter: blur(var(--glass-blur-strong)) saturate(var(--glass-sat)) brightness(var(--glass-bright));
  transition: box-shadow 0.4s var(--ease), border-radius 0.4s var(--ease), background 0.4s var(--ease);
}
.topbar.is-compact {
  border-radius: var(--radius-pill);
  background: var(--glass-bg-strong);
  box-shadow: var(--shadow-float), var(--shadow-inset-top);
}
.topbar-inner {
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 18px;
  transition: padding 0.35s var(--spring);
}
.topbar.is-compact .topbar-inner { padding: 6px 14px; }

.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em; }
.brand-dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-grad-1), var(--accent-grad-2));
  box-shadow: 0 0 0 3px var(--accent-soft), inset 0 1px 1px rgba(255, 255, 255, 0.8);
}
.brand-sub { font-weight: 400; color: var(--text-soft); font-size: 0.92rem; }

.nav { display: flex; gap: 2px; margin-left: auto; }
.nav a {
  padding: 8px 15px;
  border-radius: var(--radius-pill);
  font-size: 0.94rem;
  color: var(--text-soft);
  white-space: nowrap;
  transition: color 0.25s var(--ease), background 0.3s var(--ease), transform 0.3s var(--spring);
}
.nav a:hover { background: var(--accent-soft); color: var(--accent-text); }
.nav a:active { transform: scale(0.96); }
.nav a.is-active {
  background: linear-gradient(135deg, var(--accent-grad-1), var(--accent-grad-2));
  color: #fff;
  box-shadow: 0 6px 18px rgba(10, 110, 255, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.topbar-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border: none;
  background: var(--glass-bg-soft);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  box-shadow: inset 0 1px 0 var(--glass-inner-top), 0 2px 8px rgba(9, 16, 32, 0.1);
  transition: transform 0.3s var(--spring), background 0.3s var(--ease);
}
.icon-btn:hover { transform: translateY(-1px) scale(1.05); background: var(--accent-soft); }
.icon-btn:active { transform: scale(0.93); }

/* ==========================================================================
   布局
   ========================================================================== */
.site-main { max-width: var(--page-max); margin: 0 auto; padding: 26px 22px 40px; position: relative; z-index: 1; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.feed-col { min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.page-wrap { max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }

.page-head { padding: 4px 6px 0; color: #fff; text-shadow: 0 2px 16px rgba(0, 0, 0, 0.72), 0 1px 3px rgba(0, 0, 0, 0.6); }
.page-head h1 { font-size: 1.7rem; font-weight: 700; letter-spacing: -0.02em; }
.page-head p { color: rgba(255, 255, 255, 0.92); font-size: 0.95rem; }
.page-head a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.page-head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.accent { color: #fde68a; }

/* ==========================================================================
   卡片
   ========================================================================== */
.card {
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: transform 0.5s var(--spring), box-shadow 0.5s var(--ease);
}

/* ==========================================================================
   动态卡片
   ========================================================================== */
.feed-list { display: flex; flex-direction: column; gap: 16px; }
.post-card { padding: 22px 24px; }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-float), var(--shadow-inset-top); }
.post-card.is-pinned::before {
  background: linear-gradient(160deg, var(--accent-grad-1), rgba(255, 255, 255, 0.1) 45%, var(--accent-grad-2));
}
.post-card.is-draft::before {
  background: linear-gradient(160deg, #f59e0b, rgba(255, 255, 255, 0.1) 45%, #f59e0b);
}

.post-head { display: flex; align-items: center; gap: 12px; }
.avatar { flex: 0 0 auto; }
.avatar img {
  width: 46px; height: 46px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.8), 0 4px 14px rgba(9, 16, 32, 0.18);
}
.post-meta { flex: 1; min-width: 0; }
.post-author { font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; letter-spacing: -0.01em; }
.post-author a:hover { color: var(--accent-text); }
.post-sub { font-size: 0.84rem; color: var(--text-faint); display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.post-head .dot { opacity: 0.55; }
.post-permalink {
  font-size: 0.8rem; color: var(--text-faint); font-weight: 600;
  padding: 3px 10px; border-radius: var(--radius-pill);
  background: var(--glass-bg-soft);
  box-shadow: inset 0 1px 0 var(--glass-inner-top);
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}
.post-permalink:hover { color: var(--accent-text); background: var(--accent-soft); }

.post-body { margin: 15px 0 4px; font-size: 1.02rem; line-height: 1.85; word-break: break-word; }
.post-body-lg { font-size: 1.08rem; }
.post-body a { color: var(--accent-text); }
.post-body a:hover { text-decoration: underline; }
.inline-tag { font-weight: 600; }

/* 配图：内层用同心圆角（外层 28 - 内边距） */
.post-gallery { display: grid; gap: 7px; margin-top: 15px; }
.post-gallery.g-1 { grid-template-columns: minmax(0, 1fr); max-width: 480px; }
.post-gallery.g-2 { grid-template-columns: repeat(2, 1fr); max-width: 480px; }
.post-gallery.g-3 { grid-template-columns: repeat(3, 1fr); }
.post-gallery.g-4 { grid-template-columns: repeat(2, 1fr); max-width: 420px; }
.gallery-item {
  display: block; overflow: hidden; border-radius: var(--radius-md);
  background: var(--glass-bg-soft);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35), 0 2px 10px rgba(9, 16, 32, 0.12);
}
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  aspect-ratio: 1 / 1;
  transition: transform 0.6s var(--spring), opacity 0.4s var(--ease);
}
.post-gallery.g-1 .gallery-item img { aspect-ratio: auto; max-height: 560px; object-fit: contain; }
.gallery-item:hover img { transform: scale(1.05); }

.post-foot { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 15px; }
.tag {
  font-size: 0.82rem; padding: 4px 12px; border-radius: var(--radius-pill);
  background: var(--accent-soft); color: var(--accent-text);
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.3s var(--spring), background 0.25s var(--ease), color 0.25s var(--ease);
}
.tag:hover { background: var(--accent-grad-1); color: #fff; transform: translateY(-1px); }
.tag:active { transform: scale(0.95); }
.tag-count { opacity: 0.8; margin-left: 4px; font-size: 0.75rem; }

.chip {
  font-size: 0.75rem; padding: 3px 9px; border-radius: var(--radius-pill);
  font-weight: 700; letter-spacing: 0.2px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.chip-pin { background: rgba(10, 110, 255, 0.16); color: var(--accent-text); }
.chip-draft { background: rgba(245, 158, 11, 0.18); color: #92400e; }
.chip-ok { background: rgba(16, 185, 129, 0.16); color: #047857; }
html[data-theme='dark'] .chip-draft { color: #fbbf24; }
html[data-theme='dark'] .chip-ok { color: #6ee7b7; }

/* ==========================================================================
   侧栏
   ========================================================================== */
.sidebar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 88px; }
.profile-card { text-align: center; }
.profile-avatar {
  width: 84px; height: 84px; border-radius: 50%; object-fit: cover;
  margin: 0 auto 12px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.75), 0 8px 24px rgba(9, 16, 32, 0.22);
}
.profile-name { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; }
.profile-sub { font-size: 0.88rem; color: var(--text-soft); margin-top: 2px; }
.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 16px 0; }
.profile-stats div {
  display: flex; flex-direction: column;
  padding: 8px 0; border-radius: var(--radius-sm);
  background: var(--glass-bg-soft);
  box-shadow: inset 0 1px 0 var(--glass-inner-top);
}
.profile-stats strong { font-size: 1.15rem; color: var(--accent-text); letter-spacing: -0.02em; }
.profile-stats span { font-size: 0.76rem; color: var(--text-faint); }

.side-card { padding: 18px 20px; }
.side-title { font-size: 0.95rem; font-weight: 700; margin-bottom: 10px; letter-spacing: -0.01em; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.recent-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.recent-list li { border-bottom: 1px solid rgba(148, 163, 184, 0.22); padding-bottom: 8px; }
.recent-list li:last-child { border-bottom: none; padding-bottom: 0; }
.recent-list a { font-size: 0.9rem; display: block; transition: color 0.25s var(--ease); }
.recent-list a:hover { color: var(--accent-text); }
.recent-list time { font-size: 0.76rem; color: var(--text-faint); }
.side-note p { font-size: 0.86rem; color: var(--text-soft); margin-bottom: 8px; }
.side-links { font-size: 0.86rem; }
.side-links a { color: var(--accent-text); }
.side-links a:hover { text-decoration: underline; }

/* ==========================================================================
   按钮 —— 胶囊玻璃
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: var(--radius-pill); border: none;
  font-size: 0.94rem; font-weight: 600; cursor: pointer; font-family: inherit;
  line-height: 1.2; letter-spacing: -0.01em;
  transition: transform 0.35s var(--spring), box-shadow 0.35s var(--ease),
              background 0.3s var(--ease), color 0.25s var(--ease);
}
.btn:active { transform: scale(0.96); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent-grad-1), var(--accent-grad-2));
  color: #fff;
  box-shadow: 0 8px 24px rgba(10, 110, 255, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.42);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(10, 110, 255, 0.46), inset 0 1px 0 rgba(255, 255, 255, 0.5); }
.btn-ghost {
  background: var(--glass-bg-soft);
  color: var(--text);
  box-shadow: inset 0 1px 0 var(--glass-inner-top), 0 2px 8px rgba(9, 16, 32, 0.08);
}
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent-text); transform: translateY(-1px); }
.btn-danger { background: rgba(239, 68, 68, 0.12); color: var(--danger); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { padding: 7px 15px; font-size: 0.85rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ==========================================================================
   提示 / 空状态 / 分页
   ========================================================================== */
.pager { text-align: center; padding: 6px 0 10px; }
.pager-hint { color: rgba(255, 255, 255, 0.88); font-size: 0.86rem; margin-top: 10px; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6); }
.pager-noscript { display: block; margin-top: 10px; color: #fff; }
.pager-noscript a { color: #fff; text-decoration: underline; margin: 0 8px; }

.empty-state { text-align: center; padding: 50px 24px; }
.empty-emoji { font-size: 2.6rem; margin-bottom: 10px; }
.empty-state h1, .empty-state h2 { font-size: 1.3rem; margin-bottom: 6px; letter-spacing: -0.01em; }
.empty-state p { color: var(--text-soft); margin-bottom: 18px; }

.flash {
  max-width: var(--page-max); margin: 0 auto 16px; padding: 14px 20px;
  border-radius: var(--radius-md); font-weight: 600; font-size: 0.92rem;
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  box-shadow: var(--shadow-glass), inset 0 1px 0 var(--glass-inner-top);
}
.flash-ok { background: rgba(16, 185, 129, 0.18); color: #065f46; }
.flash-error { background: rgba(239, 68, 68, 0.18); color: #991b1b; }
html[data-theme='dark'] .flash-ok { color: #6ee7b7; }
html[data-theme='dark'] .flash-error { color: #fca5a5; }

/* ==========================================================================
   单条详情上下游导航
   ========================================================================== */
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.post-nav-item { display: flex; flex-direction: column; gap: 4px; padding: 16px 20px; }
.post-nav-item.is-next { text-align: right; }
.post-nav-label { font-size: 0.78rem; color: var(--accent-text); font-weight: 700; }
.post-nav-text { font-size: 0.9rem; color: var(--text-soft); }

/* ==========================================================================
   归档
   ========================================================================== */
.archive-group { padding: 20px 24px; }
.archive-title { font-size: 1.05rem; font-weight: 700; display: flex; align-items: center; gap: 10px; letter-spacing: -0.01em; }
.archive-count {
  font-size: 0.76rem; font-weight: 600; color: var(--text-faint);
  background: var(--glass-bg-soft); padding: 3px 10px; border-radius: var(--radius-pill);
  box-shadow: inset 0 1px 0 var(--glass-inner-top);
}
.archive-list { list-style: none; margin-top: 12px; }
.archive-item { display: flex; align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: 1px solid rgba(148, 163, 184, 0.2); }
.archive-item:last-child { border-bottom: none; }
.archive-item time { flex: 0 0 auto; font-size: 0.8rem; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.archive-item a { flex: 1; font-size: 0.94rem; }
.archive-item a:hover { color: var(--accent-text); }
.archive-badge { font-size: 0.76rem; color: var(--text-faint); }

/* ==========================================================================
   相册
   ========================================================================== */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); gap: 16px; }
.photo-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat)) brightness(var(--glass-bright));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat)) brightness(var(--glass-bright));
  box-shadow: var(--shadow-glass), var(--shadow-inset-top);
  transition: transform 0.5s var(--spring), box-shadow 0.5s var(--ease);
}
.photo-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-float), var(--shadow-inset-top); }
.photo-card img { width: 100%; height: 200px; object-fit: cover; }
.photo-card figcaption { padding: 13px 16px; display: flex; flex-direction: column; }
.photo-card strong { font-size: 0.96rem; letter-spacing: -0.01em; }
.photo-card span { font-size: 0.82rem; color: var(--text-faint); }

/* ==========================================================================
   项目
   ========================================================================== */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(288px, 1fr)); gap: 16px; }
.project-card { display: flex; flex-direction: column; gap: 9px; }
.project-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-float), var(--shadow-inset-top); }
.project-tag {
  align-self: flex-start; font-size: 0.75rem; font-weight: 700;
  color: var(--accent-text); background: var(--accent-soft);
  padding: 3px 11px; border-radius: var(--radius-pill);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.project-card h2 { font-size: 1.08rem; letter-spacing: -0.01em; }
.project-card p { font-size: 0.92rem; color: var(--text-soft); }
.project-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 10px; }
.page-note h3 { font-size: 1rem; margin-bottom: 6px; }
.page-note p { font-size: 0.9rem; color: var(--text-soft); }

/* ==========================================================================
   关于
   ========================================================================== */
.about-card { display: flex; gap: 24px; align-items: flex-start; }
.about-avatar {
  width: 132px; height: 132px; border-radius: 50%; object-fit: cover; flex: 0 0 auto;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.72), 0 12px 32px rgba(9, 16, 32, 0.24);
}
.about-body h2 { font-size: 1.35rem; margin-bottom: 8px; letter-spacing: -0.02em; }
.about-body p { color: var(--text-soft); margin-bottom: 10px; }
.about-facts { list-style: none; display: flex; flex-direction: column; gap: 6px; margin: 14px 0; }
.about-facts li { font-size: 0.92rem; }
.about-facts span { display: inline-block; min-width: 68px; font-weight: 700; color: var(--accent-text); }
.about-stats { max-width: 340px; }

/* ==========================================================================
   页脚（备案信息必须展示）
   ========================================================================== */
.site-footer {
  margin: 34px auto 22px;
  max-width: calc(var(--page-max) + 8px);
  border-radius: var(--radius-lg);
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(var(--glass-blur-strong)) saturate(var(--glass-sat)) brightness(var(--glass-bright));
  backdrop-filter: blur(var(--glass-blur-strong)) saturate(var(--glass-sat)) brightness(var(--glass-bright));
  box-shadow: var(--shadow-glass), var(--shadow-inset-top);
  color: var(--text);
  padding: 26px 24px;
  text-align: center;
  position: relative;
  z-index: 1;
}
.footer-inner { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.footer-beian { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; align-items: center; }
.beian-link { display: inline-flex; align-items: center; gap: 6px; font-size: 0.88rem; transition: opacity 0.25s var(--ease); }
.beian-link:hover { opacity: 0.75; text-decoration: underline; }
.beian-icon { width: 18px; height: 20px; object-fit: contain; }
.footer-copy { font-size: 0.82rem; color: var(--text-soft); }

/* ==========================================================================
   背景切换 —— 悬浮玻璃胶囊
   ========================================================================== */
.bg-switch {
  position: fixed; right: 20px; bottom: 20px; z-index: 70;
  display: flex; flex-direction: column; gap: 8px;
  padding: 8px; border-radius: var(--radius-pill);
}
.bg-btn {
  width: 40px; height: 40px; border-radius: 50%; border: none; cursor: pointer;
  font-size: 1.05rem; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--glass-bg-soft);
  box-shadow: inset 0 1px 0 var(--glass-inner-top);
  transition: transform 0.35s var(--spring), background 0.3s var(--ease);
}
.bg-btn:hover { transform: scale(1.12); background: var(--accent-soft); }
.bg-btn:active { transform: scale(0.94); }
.bg-btn.is-active {
  background: linear-gradient(135deg, var(--accent-grad-1), var(--accent-grad-2));
  box-shadow: 0 6px 18px rgba(10, 110, 255, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* ==========================================================================
   灯箱
   ========================================================================== */
.lightbox {
  position: fixed; inset: 0; z-index: 200; display: none;
  background: rgba(6, 10, 20, 0.72);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  backdrop-filter: blur(28px) saturate(140%);
  align-items: center; justify-content: center; flex-direction: column;
}
.lightbox.is-open { display: flex; animation: glassIn 0.32s var(--spring); }
@keyframes glassIn { from { opacity: 0; } to { opacity: 1; } }
.lightbox img {
  max-width: 92vw; max-height: 84vh; object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  animation: zoomIn 0.4s var(--spring);
}
@keyframes zoomIn { from { transform: scale(0.94); opacity: 0.4; } to { transform: scale(1); opacity: 1; } }
.lightbox-close {
  position: absolute; top: 22px; right: 26px; width: 44px; height: 44px;
  border-radius: 50%; border: none; cursor: pointer; font-size: 1.25rem;
  background: rgba(255, 255, 255, 0.16); color: #fff;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
  transition: transform 0.3s var(--spring), background 0.25s var(--ease);
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.26); transform: scale(1.08); }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border: none; border-radius: 50%; cursor: pointer;
  font-size: 1.4rem; background: rgba(255, 255, 255, 0.16); color: #fff;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
  transition: transform 0.3s var(--spring), background 0.25s var(--ease);
}
.lightbox-nav:hover { background: rgba(255, 255, 255, 0.26); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-count { position: absolute; bottom: 24px; color: rgba(255, 255, 255, 0.85); font-size: 0.9rem; }

/* ==========================================================================
   后台
   ========================================================================== */
/* 后台用纯色底。
   注意选择器要写成 body.admin-body：body.bg-1 的特异性是 (0,1,1)，
   只写 .admin-body (0,1,0) 会被它压过去 —— 兜底放在这里更保险。 */
body.admin-body {
  background: #eef1f7;
  background-image: none;
  color: var(--text);
}
html[data-theme='dark'] body.admin-body { background: #0b0e15; }
.admin-body .bg-overlay { display: none; }

.admin-topbar {
  position: sticky; top: 12px; z-index: 50;
  max-width: 1180px; margin: 12px auto 0;
  border-radius: var(--radius-lg);
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(var(--glass-blur-strong)) saturate(var(--glass-sat)) brightness(var(--glass-bright));
  backdrop-filter: blur(var(--glass-blur-strong)) saturate(var(--glass-sat)) brightness(var(--glass-bright));
}
.admin-topbar-inner { padding: 12px 18px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.admin-brand { display: flex; align-items: center; gap: 9px; font-size: 1rem; }
.admin-brand-tag {
  font-size: 0.76rem; font-weight: 700; color: var(--accent-text); background: var(--accent-soft);
  padding: 3px 10px; border-radius: var(--radius-pill);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.admin-nav { display: flex; gap: 2px; margin-left: auto; }
.admin-nav a {
  padding: 8px 15px; border-radius: var(--radius-pill); font-size: 0.9rem; color: var(--text-soft);
  transition: color 0.25s var(--ease), background 0.3s var(--ease), transform 0.3s var(--spring);
}
.admin-nav a:hover { background: var(--accent-soft); color: var(--accent-text); }
.admin-nav a.is-active {
  background: linear-gradient(135deg, var(--accent-grad-1), var(--accent-grad-2));
  color: #fff;
  box-shadow: 0 6px 18px rgba(10, 110, 255, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.admin-actions { display: flex; align-items: center; gap: 8px; }
.inline-form { display: inline; }

.admin-main { max-width: 1180px; margin: 0 auto; padding: 24px 22px 40px; position: relative; z-index: 1; }
.admin-wrap { display: flex; flex-direction: column; gap: 18px; }
.admin-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.admin-head h1 { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; }
.admin-head p { font-size: 0.88rem; color: var(--text-soft); }
.admin-section { padding: 20px 22px; }
.admin-section h2 { font-size: 1rem; margin-bottom: 12px; }

.admin-list { display: flex; flex-direction: column; gap: 12px; }
.admin-row { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; padding: 18px 20px; }
.admin-row-main { min-width: 0; flex: 1; }
.admin-row-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.8rem; color: var(--text-faint); }
.admin-row-text { margin: 7px 0; font-size: 0.94rem; word-break: break-word; }
.admin-row-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.admin-row-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; flex: 0 0 auto; }
.admin-pager { display: flex; align-items: center; justify-content: center; gap: 14px; font-size: 0.88rem; color: var(--text-soft); }

/* ── 后台：新增管理模块的样式 ─────────────────────────────────────────── */

.admin-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-hint { font-size: 0.84rem; color: var(--text-faint); margin-top: 10px; }

.admin-nav-icon { margin-right: 5px; font-size: 0.92rem; }
.admin-nav { flex-wrap: wrap; }

.editor-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 6px 0 12px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.24);
}
.editor-section-title:not(:first-child) { margin-top: 22px; }
.editor-inline { padding: 2px; }

.admin-row-title { font-size: 1rem; font-weight: 700; margin: 6px 0 2px; letter-spacing: -0.01em; }

/* 站点信息预览 */
.site-preview {
  border-radius: var(--radius-md);
  padding: 18px;
  background: var(--glass-bg-soft);
  box-shadow: inset 0 1px 0 var(--glass-inner-top), inset 0 0 0 1px rgba(148, 163, 184, 0.2);
  display: flex; flex-direction: column; gap: 14px;
}
.site-preview-topbar { display: flex; align-items: center; gap: 8px; font-size: 1.02rem; }
.site-preview-card { display: flex; align-items: center; gap: 12px; }
.site-preview-card img {
  width: 56px; height: 56px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.7), 0 4px 14px rgba(9, 16, 32, 0.16);
}
.site-preview-card div { display: flex; flex-direction: column; }
.site-preview-card span { font-size: 0.86rem; color: var(--text-soft); }

/* 通用图片字段 */
.img-field-row { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.img-field-preview {
  width: 180px; height: 130px; flex: 0 0 auto;
  border-radius: var(--radius-md);
  background: var(--glass-bg-soft);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.28);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.img-field-sm .img-field-preview { width: 110px; height: 110px; border-radius: 50%; }
.img-field-preview img { width: 100%; height: 100%; object-fit: cover; }
.img-field-sm .img-field-preview img { border-radius: 50%; }
.img-field-empty { font-size: 0.84rem; color: var(--text-faint); }
.img-field-side { display: flex; flex-direction: column; gap: 8px; min-width: 180px; flex: 1; }
.img-field-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.img-field-status { font-size: 0.84rem; color: var(--text-soft); min-height: 20px; }

/* 相册 / 背景图的卡片栅格 */
.admin-media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.admin-media-grid-wide { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.admin-media-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.admin-media-thumb { position: relative; aspect-ratio: 4 / 3; background: var(--glass-bg-soft); }
.admin-media-thumb img { width: 100%; height: 100%; object-fit: cover; }
.admin-media-thumb-bg { aspect-ratio: 16 / 9; }
.admin-media-badge {
  position: absolute; left: 10px; top: 10px;
  font-size: 0.72rem; font-weight: 700; color: #fff;
  background: rgba(15, 23, 42, 0.66); padding: 2px 9px; border-radius: var(--radius-pill);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.admin-media-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.admin-media-body strong { font-size: 0.96rem; }
.admin-media-desc {
  font-size: 0.82rem; color: var(--text-soft);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.admin-media-sort { font-size: 0.76rem; color: var(--text-faint); }
.admin-bg-icon { margin-right: 2px; }
.admin-media-actions {
  display: flex; gap: 8px; padding: 12px 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

/* 归档管理 */
.archive-admin-group { padding: 20px 22px; }
.archive-admin-title { display: flex; align-items: center; gap: 10px; font-size: 1.02rem; font-weight: 700; margin-bottom: 12px; }
.archive-admin-list { display: flex; flex-direction: column; }
.archive-admin-row {
  display: flex; gap: 14px; align-items: flex-start; justify-content: space-between;
  padding: 13px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}
.archive-admin-row:first-child { border-top: none; padding-top: 0; }
.archive-admin-row.is-draft { opacity: 0.72; }
.archive-admin-main { min-width: 0; flex: 1; }
.archive-admin-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.78rem; color: var(--text-faint); }
.archive-admin-meta time { font-variant-numeric: tabular-nums; }
.archive-admin-id { color: var(--text-faint); font-weight: 600; }
.archive-admin-id:hover { color: var(--accent-text); }
.archive-admin-text { margin: 5px 0 0; font-size: 0.92rem; word-break: break-word; }
.archive-admin-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; flex: 0 0 auto; justify-content: flex-end; }
.archive-date-form { display: inline-flex; align-items: center; gap: 6px; }
.archive-date-form input[type='datetime-local'] {
  padding: 6px 10px; font-family: inherit; font-size: 0.82rem;
  border: none; border-radius: var(--radius-pill);
  background: var(--glass-bg-strong); color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.3);
}
html[data-theme='dark'] .archive-date-form input[type='datetime-local'] { background: rgba(10, 12, 18, 0.72); }

.kv { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.kv li { display: flex; gap: 14px; font-size: 0.92rem; }
.kv span { min-width: 92px; color: var(--text-soft); }
.tips { padding-left: 20px; font-size: 0.9rem; color: var(--text-soft); display: flex; flex-direction: column; gap: 6px; }
.tips code {
  background: var(--glass-bg-soft); padding: 2px 7px; border-radius: 6px;
  box-shadow: inset 0 1px 0 var(--glass-inner-top);
}

/* ==========================================================================
   表单 —— 玻璃凹槽
   ========================================================================== */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 15px; }
.field > span { font-size: 0.9rem; font-weight: 600; }
.field em { font-weight: 400; font-style: normal; color: var(--text-faint); font-size: 0.82rem; }
.field input[type='text'], .field input[type='password'], .field input[type='datetime-local'],
.field select, .field textarea {
  width: 100%; padding: 12px 15px; font-family: inherit; font-size: 0.95rem;
  border: none; border-radius: var(--radius-md);
  background: var(--glass-bg-strong); color: var(--text);
  box-shadow: inset 0 1px 3px rgba(9, 16, 32, 0.10), inset 0 0 0 1px rgba(148, 163, 184, 0.28);
  transition: box-shadow 0.28s var(--ease), background 0.28s var(--ease);
}
html[data-theme='dark'] .field input, html[data-theme='dark'] .field select, html[data-theme='dark'] .field textarea {
  background: rgba(10, 12, 18, 0.72);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(148, 163, 184, 0.18);
}
.field textarea { resize: vertical; line-height: 1.8; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  box-shadow: inset 0 1px 3px rgba(9, 16, 32, 0.06), 0 0 0 2px var(--accent-grad-1),
              0 0 0 6px var(--accent-soft);
}
.counter { align-self: flex-end; font-size: 0.78rem; color: var(--text-faint); }
.check { display: flex; align-items: center; gap: 9px; font-size: 0.92rem; margin: 4px 0 18px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent-grad-1); }

.editor { padding: 24px; }
.editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.editor-actions { display: flex; gap: 10px; align-items: center; }
.editor-images { margin-bottom: 18px; }
.editor-images-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.editor-images-head span { font-size: 0.9rem; font-weight: 600; }
.editor-images-head em { font-weight: 400; font-style: normal; color: var(--text-faint); font-size: 0.82rem; }
.image-drop {
  border-radius: var(--radius-md);
  padding: 26px; text-align: center; color: var(--text-faint); font-size: 0.9rem;
  background: var(--glass-bg-soft);
  box-shadow: inset 0 0 0 1.5px rgba(148, 163, 184, 0.32);
  transition: box-shadow 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
}
.image-drop.is-over {
  background: var(--accent-soft); color: var(--accent-text);
  box-shadow: inset 0 0 0 2px var(--accent-grad-1);
}
.image-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); gap: 10px; margin-top: 12px; }
.image-thumb {
  position: relative; aspect-ratio: 1/1; border-radius: var(--radius-md); overflow: hidden;
  background: var(--glass-bg-soft);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4), 0 3px 10px rgba(9, 16, 32, 0.14);
}
.image-thumb img { width: 100%; height: 100%; object-fit: cover; }
.image-thumb button {
  position: absolute; top: 6px; right: 6px; width: 26px; height: 26px;
  border: none; border-radius: 50%; cursor: pointer; font-size: 0.85rem;
  background: rgba(15, 23, 42, 0.68); color: #fff; line-height: 1;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: transform 0.3s var(--spring), background 0.25s var(--ease);
}
.image-thumb button:hover { background: rgba(239, 68, 68, 0.9); transform: scale(1.1); }
.image-thumb .thumb-index {
  position: absolute; left: 6px; bottom: 6px; font-size: 0.7rem;
  background: rgba(15, 23, 42, 0.68); color: #fff; padding: 1px 7px; border-radius: var(--radius-pill);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.upload-status { font-size: 0.84rem; color: var(--text-soft); margin-top: 8px; min-height: 20px; }

/* ==========================================================================
   登录页
   ========================================================================== */
.login-wrap { min-height: 82vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { width: 100%; max-width: 400px; padding: 34px 30px; }
.login-head { text-align: center; margin-bottom: 24px; }
.login-avatar {
  width: 76px; height: 76px; border-radius: 50%; object-fit: cover; margin: 0 auto 14px;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.65), 0 10px 26px rgba(9, 16, 32, 0.22);
}
.login-head h1 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; }
.login-head p { font-size: 0.86rem; color: var(--text-soft); }
.login-foot { text-align: center; margin-top: 18px; font-size: 0.86rem; }
.login-foot a { color: var(--accent-text); }

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 980px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; }
  .nav { order: 3; width: 100%; margin-left: 0; overflow-x: auto; padding-bottom: 2px; }
  .nav::-webkit-scrollbar { display: none; }
  .topbar-inner { flex-wrap: wrap; gap: 12px; }
  .topbar-actions { margin-left: auto; }
}

@media (max-width: 640px) {
  /* 手机上降低模糊半径：backdrop-filter 的代价随面积上升，这样更省电也更顺滑 */
  :root {
    --glass-blur: 16px;
    --glass-blur-strong: 20px;
    --radius-lg: 22px;
    --radius-md: 15px;
  }
  .site-main { padding: 18px 14px 30px; }
  .admin-main { padding: 16px 14px; }
  .topbar { top: 8px; margin-top: 8px; }
  .page-head h1 { font-size: 1.38rem; }
  .about-card { flex-direction: column; align-items: center; text-align: center; }
  .about-facts span { min-width: auto; margin-right: 8px; }
  .editor-grid { grid-template-columns: 1fr; }
  .post-nav { grid-template-columns: 1fr; }
  .post-card { padding: 18px; }
  .admin-row { flex-direction: column; }
  .bg-switch { flex-direction: row; right: 12px; bottom: 12px; }
  .brand-sub { display: none; }
  .site-footer { margin: 26px 14px 16px; padding: 22px 18px; }
  .lightbox-nav { width: 42px; height: 42px; }
}

/* ==========================================================================
   降级与无障碍
   ========================================================================== */

/* 不支持背景模糊：改用更实的底色，保证可读性 */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card, .topbar, .admin-topbar, .bg-switch, .site-footer, .photo-card {
    background: rgba(255, 255, 255, 0.95);
  }
  html[data-theme='dark'] .card,
  html[data-theme='dark'] .topbar,
  html[data-theme='dark'] .admin-topbar,
  html[data-theme='dark'] .bg-switch,
  html[data-theme='dark'] .site-footer,
  html[data-theme='dark'] .photo-card {
    background: rgba(20, 23, 32, 0.97);
  }
}

/* 系统开启「减弱透明度」（Apple 的无障碍选项） */
@media (prefers-reduced-transparency: reduce) {
  .card, .topbar, .admin-topbar, .bg-switch, .site-footer, .photo-card, .flash {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(255, 255, 255, 0.97);
  }
  html[data-theme='dark'] .card,
  html[data-theme='dark'] .topbar,
  html[data-theme='dark'] .admin-topbar,
  html[data-theme='dark'] .bg-switch,
  html[data-theme='dark'] .site-footer,
  html[data-theme='dark'] .photo-card,
  html[data-theme='dark'] .flash {
    background: rgba(20, 23, 32, 0.98);
  }
  .bg-overlay { background: linear-gradient(180deg, rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.9)); }
}

/* 用户偏好减少动效 */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .card:hover, .post-card:hover, .photo-card:hover, .project-card:hover { transform: none; }
  .card::after, .topbar::after { display: none; }
}

/* 滚动条 */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.5);
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, 0.75); background-clip: content-box; }
