/* ============================================================
   卓大人 · 前台样式（仿小小博客布局 · 浅粉红主题 · 与后台统一）
   原生 CSS，无任何框架；不含任何装饰性特效（无飘落/点击粒子）
   断点：<=768 手机 / 769-1024 平板 / >1024 桌面
   ============================================================ */

:root {
  --bg: #FFF5F7;                        /* 页面背景（与后台一致） */
  --bg-deep: #FFE9EF;                   /* 深一档背景 */
  --card: #FFFFFF;                      /* 卡片背景 */
  --accent: #E85D75;                    /* 主强调色（与后台一致） */
  --accent-deep: #D24359;               /* 强调色深 */
  --accent-soft: #FFE3EA;               /* 强调色浅 */
  --accent-ghost: rgba(232, 93, 117, 0.09);
  --grad-accent: linear-gradient(135deg, #EC6E85 0%, #D24359 100%);
  --grad-profile: linear-gradient(135deg, #F2A6B6 0%, #E0708A 100%);
  --text: #4A3A3E;                      /* 主文字 */
  --text-sub: #9A8288;                  /* 次要文字 */
  --border: #FFD9E1;                    /* 边框 */
  --shadow-sm: 0 2px 10px rgba(232, 93, 117, 0.06);
  --shadow: 0 8px 25px rgba(232, 93, 117, 0.10);
  --shadow-lg: 0 15px 40px rgba(232, 93, 117, 0.16);
  --radius: 12px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ring: 0 0 0 3px var(--accent-ghost);
  --nav-h: 60px;                        /* 桌面导航高度 */
  --nav-h-m: 54px;                      /* 移动端导航高度 */
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  background:
    radial-gradient(1100px 440px at 50% -160px, #FFE9EF 0%, rgba(255, 233, 239, 0) 70%),
    var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

body.nav-open { overflow: hidden; }

/* 为固定导航让位 */
body { padding-top: var(--nav-h); }

main { flex: 1; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-deep); }

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

button { font-family: inherit; }

::selection { background: var(--accent-soft); color: var(--accent-deep); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

::-webkit-scrollbar { width: 10px; height: 8px; }
::-webkit-scrollbar-thumb { background: #F2C4CE; border-radius: 999px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
::-webkit-scrollbar-track { background: transparent; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ============================================================
   按钮体系
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: none;
  cursor: pointer;
  background: var(--grad-accent);
  color: #fff;
  padding: 11px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.5px;
  box-shadow: 0 6px 16px rgba(232, 93, 117, 0.30);
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(232, 93, 117, 0.38); }
.btn:active { transform: translateY(0) scale(0.96); }

.btn.ghost {
  background: #fff;
  color: var(--accent);
  border: 1px solid var(--border);
  box-shadow: none;
}

.btn.ghost:hover { border-color: var(--accent); background: var(--accent-soft); }

/* ============================================================
   顶部导航（固定毛玻璃）
   ============================================================ */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 26px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 20px;
  font-weight: 700;
  color: currentColor;
  letter-spacing: 1px;
  flex-shrink: 0;
}

.logo:hover { color: currentColor; opacity: 0.85; }

.logo .logo-img { width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0; }

/* 桌面横向导航 */
.nav-links { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; flex-wrap: wrap; }

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: rgba(74, 58, 62, 0.85);
  padding: 8px 14px;
  border-radius: 9px;
  font-size: 15.5px;
  font-weight: 600;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
  white-space: nowrap;
}

.nav-link:hover { background: var(--accent-ghost); color: var(--accent); }
.nav-link.active { background: var(--accent-soft); color: var(--accent); font-weight: 700; }

.caret { font-style: normal; font-size: 11px; opacity: 0.7; display: inline-block; transition: transform 0.2s var(--ease); }

/* 分类下拉菜单（桌面 hover 展开：标题层 → 列层级） */
.nav-item.has-drop { position: relative; }
.nav-item.has-drop:hover .caret { transform: rotate(180deg); }

.drop-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 218px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
  z-index: 10;
}

.nav-item.has-drop:hover .drop-menu,
.nav-item.has-drop:focus-within .drop-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* 标题层：分区标题 + 分类数徽章 */
.drop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 10px 9px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}

/* 中文字体仅有 400/700 两档字重，800 会被钳制；用描边补偿视觉粗度 */
.drop-head-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text);
  -webkit-text-stroke: 0.35px var(--text);
}

.drop-head-count {
  flex-shrink: 0;
  font-size: 12.5px;
  color: var(--text-sub);
  background: var(--bg-deep);
  border-radius: 999px;
  padding: 2px 9px;
}

/* 列层级：分类行（首字徽章 + 名称 + 数量徽章） */
.drop-list { display: flex; flex-direction: column; gap: 2px; }

.drop-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 9px;
  color: var(--text);
  transition: background 0.15s;
}

.drop-list a:hover { background: var(--accent-ghost); }
.drop-list a.active { background: var(--accent-soft); }

.cat-badge {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

/* 分类徽章色板（依次轮换） */
.drop-list a:nth-child(4n+1) .cat-badge { background: linear-gradient(135deg, #F2A0B3, #E85D75); }
.drop-list a:nth-child(4n+2) .cat-badge { background: linear-gradient(135deg, #8FD3C7, #5F9EA0); }
.drop-list a:nth-child(4n+3) .cat-badge { background: linear-gradient(135deg, #F7B267, #E76F51); }
.drop-list a:nth-child(4n+4) .cat-badge { background: linear-gradient(135deg, #C3A6E8, #9B72CF); }

.cat-name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drop-list a:hover .cat-name,
.drop-list a.active .cat-name { color: var(--accent); }
.drop-list a.active .cat-name { font-weight: 600; }

.cat-count {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--text-sub);
  background: var(--bg-deep);
  border-radius: 999px;
  padding: 2px 9px;
}

.drop-loading, .drop-empty { padding: 10px 12px; font-size: 13px; color: var(--text-sub); }

/* 导航右侧操作 */
.nav-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; margin-left: auto; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-sub);
  cursor: pointer;
  transition: all 0.18s var(--ease);
}

.icon-btn:hover { border-color: var(--accent); color: var(--accent); background: #fff; }

/* ============================================================
   移动端侧边抽屉（渐变底 + 白字菜单，仅 <=768px）
   ============================================================ */

.nav-mask {
  position: fixed;
  inset: 0;
  background: rgba(74, 58, 62, 0.42);
  z-index: 120;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

body.nav-open .nav-mask { opacity: 1; pointer-events: auto; }

.sidebar {
  display: none;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(282px, 84vw);
  z-index: 130;
  background: linear-gradient(160deg, #F6B8C8 0%, #E8899D 100%);
  transform: translateX(-105%);
  transition: transform 0.32s var(--ease);
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

body.nav-open .sidebar { transform: none; }

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 24px 20px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.sidebar-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.85);
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sidebar-user h3 { color: #fff; font-size: 17px; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.18); }
.sidebar-user p { color: rgba(255, 255, 255, 0.9); font-size: 12.5px; margin: 2px 0 0; }

.sidebar-menu { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  padding: 11px 14px;
  border-radius: 10px;
  transition: background 0.18s;
}

.sidebar-link:hover, .sidebar-link.active { background: rgba(255, 255, 255, 0.24); color: #fff; }

/* 快捷入口面板：与下方分类面板同款玻璃卡片（抽屉首屏两个入口） */
.sidebar .sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 14px;
  padding: 6px;
}

.sidebar .sidebar-links .sidebar-link { font-weight: 400; font-size: 13.5px; padding: 8px 10px; }

/* 标题层：分区标题 + 数量徽章（与下方分类面板明显区分） */
.sidebar-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 4px;
}

.sidebar-group-title {
  color: rgba(255, 255, 255, 0.95);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 1px;
  -webkit-text-stroke: 0.35px rgba(255, 255, 255, 0.95);
}

.sidebar-group-count {
  flex-shrink: 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 2px 9px;
}

/* 分组面板：半透明白底圆角卡片，与标题层拉开层级 */
.sidebar #drawerCats {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 14px;
  padding: 6px;
}

/* 抽屉分类行：首字徽章 + 名称 + 数量徽章（白字玻璃风；常规字重衬托标题层） */
.sidebar #drawerCats .sidebar-link {
  font-weight: 400;
  font-size: 13.5px;
  padding: 8px 10px;
}

.sidebar #drawerCats .cat-badge {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 12px;
}

.sidebar #drawerCats .cat-name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar #drawerCats .cat-count {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 2px 8px;
}

/* 面板内加载/空态：居中白字，保证深色底上的对比度 */
.sidebar #drawerCats .drop-loading {
  padding: 14px 10px;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
}

/* ============================================================
   首页幻灯（后台「首页幻灯」条目轮播；未启用时整节隐藏）
   结构：.hero（页面对齐内边距）> .hero-frame（圆角卡片）> .hero-viewport（比例盒）
   ============================================================ */

/* 外框只负责与 .container 对齐，本身不画背景 */
.hero {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px 20px 0;
}

/* 圆角卡片：与全站卡片一致的语言（圆角 + 柔和投影） */
.hero-frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-deep);
  box-shadow: var(--shadow);
  animation: heroIn 0.5s var(--ease) both;
}

@keyframes heroIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.hero-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 21 / 9;
  max-height: 460px;
  min-height: 240px;
  /* 横向手势交给 JS 处理，纵向滚动仍由浏览器接管 */
  touch-action: pan-y;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: block;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s var(--ease), visibility 0.7s;
}

.hero-slide.active { opacity: 1; visibility: visible; z-index: 1; }

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  /* 缓慢定镜：切换时轻微回落，避免画面“死板” */
  transform: scale(1.04);
  transition: transform 6s var(--ease);
}

.hero-slide.active img { transform: scale(1); }

/* 底部渐变蒙层：标题与控件的可读性保障 */
.hero-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  /* 底部留白需容下圆点胶囊（贴底 10px + 高 17px），两行标题才不会压到圆点 */
  padding: 60px 26px 38px;
  background: linear-gradient(
    180deg,
    rgba(62, 40, 45, 0) 0%,
    rgba(62, 40, 45, 0.36) 46%,
    rgba(62, 40, 45, 0.82) 100%
  );
  pointer-events: none;
}

/* 标题：最多两行（原先 nowrap + 省略号会在窄屏截断中文标题） */
.hero-title {
  flex: 1 1 auto;
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #fff;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
  text-wrap: balance;
}

/* 可跳转幻灯的“阅读详情”提示胶囊（纯展示幻灯不显示） */
.hero-cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent-deep);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(62, 40, 45, 0.22);
  transition: transform 0.25s var(--ease), background 0.25s;
}

.hero-cta svg { width: 15px; height: 15px; }
.hero-slide:hover .hero-cta { transform: translateX(3px); background: #fff; }

/* 前后箭头（内联 SVG，避免字体符号在不同平台基线不一） */
.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(62, 40, 45, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  cursor: pointer;
  z-index: 3;
  transition: background 0.2s, border-color 0.2s;
}

.hero-nav svg { width: 20px; height: 20px; }
.hero-nav:hover { background: rgba(62, 40, 45, 0.6); border-color: rgba(255, 255, 255, 0.5); }
.hero-nav:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.hero-prev { left: 14px; }
.hero-next { right: 14px; }

/* 指示圆点：底部居中胶囊容器，当前项拉长为“进度条” */
.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(62, 40, 45, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 3;
}

.hero-dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.3s var(--ease), background 0.3s var(--ease);
}

.hero-dots button.active { width: 20px; background: #fff; }

/* 自动轮播进度线（贴卡片底边，随暂停冻结） */
.hero-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.16);
  z-index: 4;
}

.hero-progress span {
  display: block;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--accent) 0%, #F2A6B6 100%);
}

/* ============================================================
   主体布局：文章网格
   ============================================================ */

.main-layout {
  display: flex;
  gap: 26px;
  margin: 28px 0 44px;
  align-items: flex-start;
}

.main-content { flex: 1; min-width: 0; }

/* ---------- 浏览器窗口风卡片（三点红黄绿 + 标题） ---------- */

.dots { display: inline-flex; gap: 6px; flex-shrink: 0; }

.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-red { background: #FF5F57; }
.dot-yellow { background: #FEBC2E; }
.dot-green { background: #28C840; }

/* ============================================================
   主内容：分区标题
   ============================================================ */

.section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.section-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  color: var(--text);
  line-height: 1.4;
}

.st-bar {
  width: 5px;
  height: 20px;
  border-radius: 3px;
  background: var(--grad-accent);
  flex-shrink: 0;
}

.section-sub { font-size: 13px; color: var(--text-sub); }

/* ============================================================
   文章网格（3 / 2 / 1 列自适应）
   ============================================================ */

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.article-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.article-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.article-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--accent-soft);
  display: block;
}

.article-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}

.article-card:hover .article-cover img { transform: scale(1.05); }

/* 无封面渐变占位 */
.article-cover.cover-none {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #FFDEE9 0%, #FFE9EF 60%, #FFF5F7 100%);
}

.cover-flower { font-size: 38px; opacity: 0.85; }

.pin-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  background: var(--grad-accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 11px;
  border-radius: 999px;
  z-index: 1;
  box-shadow: 0 3px 10px rgba(232, 93, 117, 0.4);
  white-space: nowrap;
}

.article-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 15px 17px 16px;
  min-width: 0;
}

.article-cat {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  background: var(--accent-ghost);
  color: var(--accent);
  font-size: 12px;
  font-weight: 500;
  padding: 1px 11px;
  border-radius: 4px;
  white-space: nowrap;
  transition: all 0.15s var(--ease);
}

.article-cat:hover { background: var(--accent-soft); color: var(--accent-deep); }

.article-title {
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
}

.article-card:hover .article-title { color: var(--accent); }

.article-summary {
  flex: 1;
  color: var(--text-sub);
  font-size: 13.5px;
  line-height: 1.65;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 卡片 meta 行（左=作者+时间，右=浏览+评论） */
.article-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-sub);
  flex-wrap: wrap;
  border-top: 1px dashed var(--border);
  padding-top: 10px;
}

.meta-left, .meta-right { display: inline-flex; align-items: center; gap: 12px; min-width: 0; flex-wrap: wrap; }
.meta-item { display: inline-flex; align-items: center; gap: 4px; }
.meta-item svg { width: 14px; height: 14px; opacity: 0.55; flex-shrink: 0; }

.meta-author { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-weight: 500; }

.meta-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #fff;
  box-shadow: 0 1px 4px rgba(74, 58, 62, 0.2);
  flex-shrink: 0;
}

/* ============================================================
   分页
   ============================================================ */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 28px 0 8px;
  flex-wrap: wrap;
}

.pagination button {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  min-width: 40px;
  height: 40px;
  padding: 0 15px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.16s var(--ease);
}

.pagination button:hover:not(:disabled):not(.current) {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.pagination button.current {
  background: var(--grad-accent);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(232, 93, 117, 0.3);
}

.pagination button:disabled { opacity: 0.35; cursor: not-allowed; }

/* ============================================================
   空状态 / 加载 / 骨架屏
   ============================================================ */

.empty, .loading { text-align: center; color: var(--text-sub); padding: 56px 20px; }

.empty::before {
  content: "🥀";
  display: block;
  font-size: 36px;
  margin-bottom: 10px;
  opacity: 0.6;
}

.loading::before {
  content: "🌸";
  display: block;
  font-size: 36px;
  margin-bottom: 10px;
  opacity: 0.7;
}

.sk {
  background: linear-gradient(90deg, #FFE3EA 25%, #FFF5F7 45%, #FFE3EA 65%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
  border-radius: 8px;
  display: block;
}

.sk-line { height: 14px; width: 78%; margin: 10px 14px; }

@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* 网格骨架卡（与正式卡片同构） */
.sk-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow-sm);
  pointer-events: none;
}

.sk-cover { width: 100%; aspect-ratio: 16 / 10; border-radius: 0; }

.sk-body { padding: 15px 17px; }

/* ============================================================
   灯箱（图片查看 / 搜索弹窗）
   ============================================================ */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(62, 40, 45, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.lightbox[hidden] { display: none; }

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 17px;
  cursor: pointer;
  transition: background 0.18s var(--ease), transform 0.18s var(--ease);
}

.lightbox-close:hover { background: rgba(255, 255, 255, 0.32); transform: rotate(90deg); }

.lb-image img {
  max-width: 92vw;
  max-height: 86vh;
  border-radius: var(--radius);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
}

.article-content img { cursor: zoom-in; }

/* 正文视频：通栏黑底圆角播放器，不超出文章容器 */
.article-content video {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 14px 0;
  background: #000;
}

/* 搜索灯箱 */
.search-modal {
  display: flex;
  gap: 10px;
  width: min(560px, 92vw);
  padding: 28px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.search-modal input {
  flex: 1;
  min-width: 0;
  padding: 12px 20px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-modal input:focus { border-color: var(--accent); box-shadow: var(--ring); }

/* ============================================================
   灯箱弹窗（后台「灯箱设置」配置，居中卡片）
   ============================================================ */

.ann-card {
  position: relative;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(74, 58, 62, 0.38);
  overflow: hidden;
  --ann-accent: var(--accent);
  --ann-accent-deep: var(--accent-deep);
  --ann-accent-soft: #FFE3EA;
}

.ann-card[data-theme="pink"] {
  --ann-accent: #E85D75;
  --ann-accent-deep: #D24359;
  --ann-accent-soft: #FFE9EF;
}

.ann-card[data-theme="green"] {
  --ann-accent: #3AA276;
  --ann-accent-deep: #2E8B63;
  --ann-accent-soft: #EAF6F0;
}

.ann-card[data-theme="dark"] {
  background: #2B3A48;
  --ann-accent: #5DADE2;
  --ann-accent-deep: #AED6F1;
  --ann-accent-soft: rgba(255, 255, 255, 0.07);
}

.ann-card[data-theme="dark"] .ann-desc { color: #B9C6D0; }

.ann-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(150deg, var(--ann-accent-soft) 0%, #fff 90%);
}

.ann-card[data-theme="dark"] .ann-media {
  background: linear-gradient(150deg, rgba(93, 173, 226, 0.16) 0%, #2B3A48 80%);
}

.ann-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ann-media.is-clickable { cursor: zoom-in; }

.ann-doc-icon {
  font-size: 58px;
  line-height: 1;
  filter: drop-shadow(0 6px 16px rgba(74, 58, 62, 0.18));
}

.ann-body { padding: 24px 30px; text-align: center; }

.ann-title {
  margin: 0 0 10px;
  font-size: 19px;
  font-weight: 700;
  color: var(--ann-accent-deep);
  line-height: 1.45;
}

.ann-desc {
  margin: 0;
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ann-actions { margin-top: 18px; }

.ann-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 34px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--ann-accent) 0%, var(--ann-accent-deep) 100%);
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(74, 58, 62, 0.22);
  transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease);
}

.ann-btn:hover { transform: translateY(-2px); color: #fff; }

.ann-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ann-accent-deep);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.22);
  z-index: 2;
}

.ann-nav:hover { background: #fff; }
.ann-prev { left: 12px; }
.ann-next { right: 12px; }

.ann-dots { display: flex; justify-content: center; gap: 7px; margin-top: 18px; }

.ann-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: var(--ann-accent);
  opacity: 0.3;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.ann-dots button.active { width: 20px; opacity: 1; }

.lb-announce-img img {
  max-width: 92vw;
  max-height: 86vh;
  border-radius: var(--radius);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
}

/* 文章条目阅读浮层 */
.article-reader {
  width: min(760px, 94vw);
  max-height: 88vh;
  overflow-y: auto;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px 34px 26px;
  -webkit-overflow-scrolling: touch;
}

.ar-loading { padding: 40px 0; text-align: center; color: var(--text-sub); }

.ar-head { border-bottom: 1px dashed var(--border); padding-bottom: 14px; margin-bottom: 18px; }
.ar-head h2 { margin: 0 0 8px; font-size: 22px; color: var(--accent-deep); line-height: 1.4; }
.ar-meta { margin: 0; font-size: 12.5px; color: var(--text-sub); }

.ar-content { font-size: 15px; line-height: 1.85; color: var(--text); word-wrap: break-word; }
.ar-content p { margin: 0 0 1em; }
.ar-content h2, .ar-content h3, .ar-content h4 { margin: 1.5em 0 0.6em; color: var(--accent-deep); line-height: 1.4; }
.ar-content h2 { font-size: 1.25em; }
.ar-content h3 { font-size: 1.12em; }
.ar-content img { max-width: 100%; height: auto; border-radius: 10px; margin: 6px 0; }
.ar-content video { display: block; width: 100%; max-width: 100%; height: auto; border-radius: 10px; margin: 6px 0; background: #000; }

.ar-content blockquote {
  margin: 1em 0;
  padding: 10px 16px;
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--text-sub);
}

.ar-content pre {
  margin: 1em 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: #4A3A3E;
  color: #FFE3EA;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.6;
}

.ar-content code { padding: 2px 6px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-deep); font-size: 0.9em; }
.ar-content pre code { padding: 0; background: none; color: inherit; }
.ar-content table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ar-content th, .ar-content td { padding: 8px 12px; border: 1px solid var(--border); text-align: left; }

.ar-foot { margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--border); text-align: center; }

/* ============================================================
   文章详情页
   ============================================================ */

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

.article-layout[hidden] { display: none; }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.breadcrumb a { color: var(--text-sub); transition: color 0.15s; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb i { font-style: normal; opacity: 0.5; }

.article-header {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 28px 32px 22px;
  margin-bottom: 20px;
}

.article-header h1 { font-size: 25px; line-height: 1.45; color: var(--text); margin: 0 0 14px; }

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-sub);
  border-top: 1px dashed var(--border);
  padding-top: 14px;
}

.article-content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 34px 40px;
  font-size: 15.5px;
  line-height: 1.9;
  word-break: break-word;
}

.article-content h2 {
  font-size: 21px;
  color: var(--accent-deep);
  margin: 30px 0 14px;
  padding-left: 13px;
  border-left: 4px solid var(--accent);
  line-height: 1.45;
}

.article-content h3 { font-size: 17.5px; color: var(--accent-deep); margin: 24px 0 10px; line-height: 1.5; }
.article-content p { margin-bottom: 14px; }
.article-content a { border-bottom: 1px dashed rgba(232, 93, 117, 0.4); transition: border-color 0.15s; }
.article-content a:hover { border-bottom-color: var(--accent); }

.article-content blockquote {
  border-left: 4px solid var(--accent);
  background: linear-gradient(90deg, var(--accent-soft), rgba(255, 227, 234, 0.35));
  padding: 14px 20px;
  border-radius: 0 10px 10px 0;
  color: var(--accent-deep);
  margin: 18px 0;
}

.article-content pre {
  background: #4A3A3E;
  color: #FFE3EA;
  padding: 16px 18px;
  border-radius: 10px;
  overflow-x: auto;
  font-size: 14px;
  margin: 14px 0;
}

.article-content code { font-family: "JetBrains Mono", Consolas, monospace; font-size: 0.92em; }
.article-content p code { background: var(--accent-soft); color: var(--accent-deep); padding: 1px 7px; border-radius: 6px; }

/* ---------- 代码块（语法高亮 + 语言标签 + 复制按钮） ---------- */

.code-wrap {
  margin: 18px 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #564047;
  box-shadow: 0 6px 18px rgba(24, 36, 48, 0.16);
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #564047;
  padding: 8px 14px;
}

.code-lang {
  color: #F2C4CE;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-family: "JetBrains Mono", Consolas, monospace;
}

.code-copy {
  background: transparent;
  border: 1px solid rgba(255, 227, 234, 0.35);
  color: #F2C4CE;
  border-radius: 7px;
  padding: 3px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s var(--ease);
  font-family: inherit;
}

.code-copy:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.code-copy:active { transform: scale(0.94); }

.code-wrap pre {
  margin: 0;
  border-radius: 0;
  border: none;
  font-size: 13.5px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
}

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

/* 语法 token 配色（暖玫暗色代码主题，底色与后台编辑器一致） */
.tok-c { color: #B99AA3; font-style: italic; }   /* 注释 */
.tok-s { color: #FFD98E; }                        /* 字符串 */
.tok-n { color: #F5A97F; }                        /* 数字 */
.tok-k { color: #E8A0B0; font-weight: 600; }      /* 关键字 */
.tok-f { color: #9FE6C0; }                        /* 函数 */
.tok-t { color: #E8A0B0; }                        /* HTML 标签 */
.tok-a { color: #D9C4F2; }                        /* HTML 属性 */

/* ---------- 阅读进度条 ---------- */

.read-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 210;
  background: transparent;
  pointer-events: none;
}

.read-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--grad-accent);
  border-radius: 0 999px 999px 0;
}

/* ---------- 文末操作：点赞 / RSS ---------- */

.article-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}

.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--text-sub);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}

.like-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.like-btn:disabled { opacity: 0.6; cursor: wait; }

.like-btn.liked {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-deep);
}

.like-count { font-weight: 700; font-size: 15px; }

.rss-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-sub);
  transition: color 0.2s;
}

.rss-link:hover { color: var(--accent); }

/* ---------- 版权声明 / 上下篇 / 相关推荐 ---------- */

.article-copyright {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding: 13px 16px;
  background: var(--bg-deep);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: var(--text-sub);
  line-height: 1.9;
}

.article-copyright svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 5px; color: var(--accent); }
.article-copyright b { color: var(--accent-deep); font-weight: 600; }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 20px; }
.post-nav[hidden] { display: none; }

.post-nav a {
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 18px;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), border-color 0.18s;
}

.post-nav a:hover { transform: translateY(-2px); border-color: #F2C4CE; box-shadow: var(--shadow); }
.post-nav a.next { align-items: flex-end; text-align: right; }
.post-nav a:only-child { grid-column: 1 / -1; }

.nav-label { font-size: 12px; color: var(--text-sub); }

.nav-title {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text);
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-nav a:hover .nav-title { color: var(--accent); }

.related-wrap {
  margin-top: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px 22px;
}

.related-wrap[hidden] { display: none; }

.related-wrap h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  color: var(--text);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.rel-card { display: flex; flex-direction: column; gap: 8px; }

.rel-cover {
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  overflow: hidden;
  background: var(--accent-soft);
  position: relative;
}

.rel-cover.cover-none {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #FFDEE9 0%, #FFE9EF 60%, #FFF5F7 100%);
}

.rel-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease); }
.rel-card:hover .rel-cover img { transform: scale(1.06); }
.rel-card .cover-flower { font-size: 26px; }

.rel-title {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.15s;
}

.rel-card:hover .rel-title { color: var(--accent); }

.rel-meta { display: flex; gap: 10px; font-size: 11.5px; color: var(--text-sub); flex-wrap: wrap; }
.rel-meta .meta-item { gap: 3px; }
.rel-meta svg { width: 12px; height: 12px; }

/* ============================================================
   评论区
   ============================================================ */

.comment-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 30px 36px;
  margin-top: 24px;
}

.comment-section h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-deep);
  margin-bottom: 8px;
  font-size: 18px;
}

.comment-list { display: flex; flex-direction: column; }

.comment-item {
  display: flex;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px dashed var(--border);
}

.comment-item:last-child { border-bottom: none; }

.c-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex: 0 0 40px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  user-select: none;
}

.c-main { flex: 1; min-width: 0; }
.c-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.c-name { font-weight: 600; color: var(--accent); font-size: 14.5px; }
.c-time { color: var(--text-sub); font-size: 12.5px; flex-shrink: 0; }
.c-body { color: var(--text); font-size: 14.5px; white-space: pre-wrap; word-break: break-word; }

.comment-form {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px dashed var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment-form .row { display: flex; gap: 12px; }

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-family: inherit;
  outline: none;
  background: #FFFAFB;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.comment-form textarea { min-height: 100px; resize: vertical; }

.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--accent); box-shadow: var(--ring); background: #fff; }

.comment-form .form-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.comment-form .form-note { color: var(--text-sub); font-size: 12.5px; }

/* ============================================================
   内页侧栏小工具（白卡，与首页浏览器卡同风格）
   ============================================================ */

.site-aside { position: sticky; top: calc(var(--nav-h) + 20px); }

.widget {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.widget + .widget { margin-top: 18px; }

.widget h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  color: #8A6E75;
  letter-spacing: 1px;
  margin: 0;
  padding: 11px 15px;
  background: #FFF7F9;
  border-bottom: 1px solid #FFE9EF;
}

.widget .widget-body { padding: 10px 14px; }

.widget ul, .widget ol { list-style: none; margin: 0; padding: 8px 6px; }

.widget li {
  display: flex;
  align-items: center;
  font-size: 14px;
  padding: 2px 0;
}

.widget li a {
  color: var(--text);
  display: inline-flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  padding: 6px 8px;
  margin-left: -8px;
  border-radius: 8px;
  transition: all 0.15s var(--ease);
}

.widget li a:hover { background: var(--accent-ghost); color: var(--accent); }

.widget .count {
  margin-left: auto;
  background: var(--bg-deep);
  color: var(--text-sub);
  font-size: 12px;
  padding: 1px 10px;
  border-radius: 999px;
  flex-shrink: 0;
}

/* 站点资料卡（内页侧栏顶部） */
.widget-site {
  text-align: center;
  background: var(--grad-profile);
  border: none;
  color: #fff;
  padding: 24px 18px 16px;
  box-shadow: 0 8px 25px rgba(232, 93, 117, 0.28);
}

.widget-site h3 {
  background: none;
  border: none;
  color: #fff;
  justify-content: center;
  font-size: 17px;
  letter-spacing: 0;
  padding: 0;
  margin-bottom: 2px;
}

.site-avatar {
  width: 62px;
  height: 62px;
  margin: 0 auto 10px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.9);
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.site-desc { font-size: 12.5px; color: rgba(255, 255, 255, 0.92); margin: 0 0 14px; }

.site-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  padding-top: 12px;
}

.site-stats .stat b { display: block; font-size: 17px; font-weight: 700; color: #fff; line-height: 1.4; }
.site-stats .stat span { font-size: 12px; color: rgba(255, 255, 255, 0.9); }
.site-stats .stat + .stat { border-left: 1px solid rgba(255, 255, 255, 0.35); }

/* ============================================================
   文章目录（桌面侧栏部件 / 移动端悬浮面板）
   ============================================================ */

.toc-widget { position: sticky; top: calc(var(--nav-h) + 20px); }
.toc-widget[hidden] { display: none; }

.toc-list { list-style: none; max-height: 56vh; overflow-y: auto; margin: 0; }

.toc-list li { display: block; }

.toc-list a {
  display: block;
  padding: 5px 10px 5px 12px;
  margin: 1px 0;
  border-left: 2px solid var(--border);
  color: var(--text-sub);
  font-size: 13.5px;
  line-height: 1.55;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-radius: 0 8px 8px 0;
  transition: all 0.15s var(--ease);
}

.toc-list a:hover { color: var(--accent); }

.toc-list a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--accent-ghost);
  font-weight: 600;
}

.toc-list li.lv3 a { padding-left: 26px; font-size: 13px; }

.toc-fab {
  display: none;
  position: fixed;
  right: 14px;
  bottom: calc(54px + env(safe-area-inset-bottom) + 14px);
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: var(--grad-accent);
  color: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(232, 93, 117, 0.4);
  z-index: 96;
}

.toc-fab:active { transform: scale(0.92); }
.toc-fab[hidden] { display: none; }

.toc-panel {
  position: fixed;
  left: 50%;
  bottom: calc(50px + env(safe-area-inset-bottom) + 66px);
  transform: translateX(-50%);
  width: min(430px, 92vw);
  max-height: 58vh;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 12px 10px;
  z-index: 950;
  -webkit-overflow-scrolling: touch;
}

.toc-panel[hidden] { display: none; }

.toc-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 10px 10px;
  margin-bottom: 4px;
  border-bottom: 1px dashed var(--border);
  font-weight: 700;
  color: var(--accent-deep);
  font-size: 15px;
}

.toc-panel-close {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text-sub);
  font-size: 13px;
  cursor: pointer;
}

.toc-panel-close:hover { border-color: var(--accent); color: var(--accent); }

/* ============================================================
   回到顶部 / Toast / 移动端底部导航
   ============================================================ */

.fab-top {
  position: fixed;
  right: 22px;
  bottom: 28px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.95);
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all 0.25s var(--ease);
  z-index: 90;
}

.fab-top.show { opacity: 1; visibility: visible; transform: none; }
.fab-top:hover { border-color: var(--accent); transform: translateY(-3px); }

.toast {
  position: fixed;
  top: 84px;
  left: 50%;
  transform: translateX(-50%) translateY(-16px);
  background: var(--grad-accent);
  color: #fff;
  padding: 11px 26px;
  border-radius: 999px;
  font-size: 14px;
  box-shadow: 0 10px 28px rgba(232, 93, 117, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s var(--ease);
  z-index: 999;
  max-width: 86vw;
  text-align: center;
}

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

.tabbar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 95;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 50px;
  border: none;
  background: none;
  color: var(--text-sub);
  font-size: 10.5px;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s;
  position: relative;
}

.tab-item svg { flex-shrink: 0; }
.tab-item.active, .tab-item:hover { color: var(--accent); }

.tab-item.active::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

/* ============================================================
   响应式：平板（<=1024px）
   ============================================================ */

@media (max-width: 1024px) {
  /* 幻灯：平板收敛高度，避免首屏被整块幻灯占满 */
  .hero { padding: 18px 20px 0; }
  .hero-viewport { aspect-ratio: 16 / 9; max-height: 360px; }
  .hero-caption { padding: 50px 22px 36px; }
  .hero-title { font-size: clamp(1rem, 2.6vw, 1.3rem); }

  .main-layout { margin: 20px 0 32px; }

  .articles-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }

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

  .site-aside {
    position: static;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 18px;
    align-items: start;
  }

  .widget + .widget { margin-top: 0; }
  .widget-site { grid-column: 1 / -1; }
  .toc-widget { grid-column: 1 / -1; position: static; }
}

/* ============================================================
   响应式：手机（<=768px）
   ============================================================ */

@media (max-width: 768px) {
  :root { --nav-h: var(--nav-h-m); }

  /* 51px = tabbar 内容 50px + 顶部边框 1px，避免最后一行内容被压住 */
  body { padding-bottom: calc(51px + env(safe-area-inset-bottom)); padding-top: var(--nav-h-m); }

  .navbar { padding: 0 14px; gap: 10px; height: var(--nav-h-m); }
  .logo { font-size: 18px; }
  .logo .logo-img { width: 26px; height: 26px; }

  .nav-links { display: none; }          /* 桌面导航隐藏，抽屉接管（菜单入口在底部导航） */
  .sidebar { display: flex; }

  .icon-btn { width: 36px; height: 36px; border-radius: 10px; }

  /* 幻灯：改用偏竖比例，竖图不再被横向裁掉主体；箭头隐藏，靠手势 + 圆点 */
  .hero { padding: 14px 14px 0; }
  .hero-frame { border-radius: var(--radius-sm); }
  .hero-viewport { aspect-ratio: 4 / 3; min-height: 210px; max-height: 320px; }
  .hero-caption { padding: 44px 16px 36px; gap: 10px; }
  .hero-title { font-size: clamp(1rem, 3.2vw, 1.25rem); line-height: 1.45; }
  .hero-cta { padding: 6px 12px; font-size: 12px; }
  .hero-nav { display: none; }
  .hero-dots { bottom: 10px; padding: 5px 9px; }

  .articles-grid { grid-template-columns: 1fr; gap: 14px; }

  /* 卡片：窄屏隐藏作者与摘要行，保持单卡轻量 */
  .article-meta .meta-author { display: none; }
  .article-summary { -webkit-line-clamp: 1; }

  /* 分区标题紧凑 */
  .section-head { margin-bottom: 12px; }
  .section-title { font-size: 16px; }

  /* 底部导航接管回顶，隐藏悬浮球 */
  .fab-top { display: none; }
  .tabbar { display: flex; }

  /* 内页侧栏收纳（目录改悬浮面板） */
  .site-aside { display: none; }
  .toc-widget { display: none; }
  .toc-fab { display: flex; }
  .related-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  /* 文章页紧凑 */
  .article-layout { margin: 12px 0 24px; }
  .breadcrumb { font-size: 12px; margin-bottom: 10px; }
  .article-header { padding: 18px 16px 14px; margin-bottom: 14px; }
  .article-header h1 { font-size: 19px; margin-bottom: 10px; }
  .article-meta { gap: 10px; font-size: 12px; padding-top: 10px; }
  .article-content { padding: 20px 16px; }
  .article-content h2 { font-size: 18px; margin: 20px 0 10px; }
  .comment-section { padding: 20px 16px; margin-top: 16px; }
  .comment-section h3 { font-size: 16px; }
  .comment-item { padding: 14px 0; gap: 10px; }
  .c-avatar { width: 34px; height: 34px; flex: 0 0 34px; font-size: 14px; }
  .comment-form { margin-top: 16px; padding-top: 16px; gap: 10px; }
  .comment-form input, .comment-form textarea { padding: 10px 14px; font-size: 14px; }

  .related-wrap { padding: 14px 16px; margin-top: 16px; }
  .rel-cover { border-radius: 8px; }
  .rel-title { font-size: 12.5px; -webkit-line-clamp: 1; }
  .rel-meta { display: none; }
  .article-copyright { font-size: 11.5px; padding: 10px 12px; gap: 8px; line-height: 1.8; border-radius: 10px; }

  .empty, .loading { padding: 40px 16px; }
  .pagination { margin: 18px 0 4px; gap: 6px; }
  .pagination button { min-width: 36px; height: 36px; font-size: 13px; padding: 0 12px; }

  /* 弹窗紧凑 */
  .ann-body { padding: 18px 18px 16px; }
  .ann-title { font-size: 17px; }
  .ann-desc { font-size: 13.5px; }
  .ann-btn { padding: 9px 26px; font-size: 13.5px; }
  .ann-nav { display: none; }
  .ann-media { aspect-ratio: 16 / 10; }
  .ann-doc-icon { font-size: 46px; }
  .article-reader { padding: 22px 18px 18px; }
  .ar-head h2 { font-size: 19px; }
}

/* ============================================================
   响应式：小屏手机（<=480px / <=360px）
   ============================================================ */

@media (max-width: 480px) {
  .container { padding: 0 14px; }
  .search-modal { flex-direction: column; padding: 20px; }
  .search-modal .btn { width: 100%; }
  .comment-form .row { flex-direction: column; gap: 12px; }
  .section-sub { display: none; }
  .site-stats .stat b { font-size: 15px; }

  /* 幻灯：窄屏只留圆形箭头图标，把宽度让给标题 */
  .hero { padding: 12px 14px 0; }
  .hero-caption { padding: 38px 14px 34px; }
  .hero-cta { padding: 8px; border-radius: 50%; }
  .hero-cta .cta-text { display: none; }
}

@media (max-width: 640px) {
  .post-nav { grid-template-columns: 1fr; gap: 8px; }
  .post-nav a, .post-nav a.next { flex-direction: row; align-items: center; text-align: left; gap: 8px; padding: 10px 14px; }
  .nav-title { flex: 1; min-width: 0; }
}

@media (max-width: 360px) {
  .container { padding: 0 12px; }
  .article-title { font-size: 15px; }
  .article-header h1 { font-size: 17.5px; }
  .comment-form .row { gap: 10px; }
  .hero { padding: 10px 12px 0; }
  .hero-title { font-size: 0.94rem; }
}

/* 大屏（>=1600px）：容器微调 */
@media (min-width: 1600px) {
  .container { max-width: 1280px; }
  .hero { max-width: 1280px; }
}

/* 触屏设备：禁用 hover 位移/缩放（触屏 :hover 会粘住） */
@media (hover: none) {
  .article-card:hover { transform: none; }
  .btn:hover { transform: none; }
  .rel-card:hover .rel-cover img { transform: none; }
  .article-card:hover .article-cover img { transform: none; }
  /* 触屏用滑动切换，箭头既占位又易误触 */
  .hero-nav { display: none; }
  .hero-slide:hover .hero-cta { transform: none; }
}

/* 减弱动效偏好：骨架屏停止闪烁 */
@media (prefers-reduced-motion: reduce) {
  .sk { animation: none; }
  html { scroll-behavior: auto; }
  /* 幻灯：取消淡入/定镜/入场动画（JS 同时关闭自动轮播） */
  .hero-frame { animation: none; }
  .hero-slide,
  .hero-slide img,
  .hero-slide.active img,
  .hero-cta { transition: none; }
  .hero-slide img,
  .hero-slide.active img { transform: none; }
  .hero-progress { display: none; }
}

/* ============================================================
   正文内容块（.gb-*，块编辑器产物）
   ------------------------------------------------------------
   · 这些类由后台块编辑器写入，服务端 PostContent::sanitize 只做安全过滤、
     不改类名，所以前台按类名还原块样式即可（编辑态所见 ≈ 前台所得）。
   · 同时作用于文章页（.article-content）与阅读浮层（.ar-content）。
   · 任务清单的勾选框由 CSS 画：编辑器里的 <span data-gb-ui> 落库时被剥离，
     前台靠 li.is-done 决定是否打勾，两边视觉一致。
   ============================================================ */

/* ---- 图片块（带图注） ---- */
.article-content figure.gb-img, .ar-content figure.gb-img { margin: 20px 0; }

.article-content figure.gb-img img, .ar-content figure.gb-img img {
  display: block;
  width: 100%;
  border-radius: 12px;
}

.article-content figure.gb-img figcaption, .ar-content figure.gb-img figcaption {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--text-sub);
  text-align: center;
}

/* ---- 提示框 ---- */
.article-content .gb-note, .ar-content .gb-note {
  display: flex;
  gap: 11px;
  margin: 20px 0;
  padding: 14px 16px;
  border-left: 4px solid var(--accent);
  border-radius: 0 12px 12px 0;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.article-content .gb-note::before, .ar-content .gb-note::before {
  content: attr(data-icon);
  flex: 0 0 auto;
  font-size: 17px;
  line-height: 1.7;
}

.article-content .gb-note > *, .ar-content .gb-note > * { flex: 1 1 auto; min-width: 0; margin: 0; }

.article-content .gb-note p, .ar-content .gb-note p { margin: 0; }

.article-content .gb-note p + p, .ar-content .gb-note p + p { margin-top: 8px; }

.article-content .gb-note-info, .ar-content .gb-note-info { border-left-color: #6C8AE4; background: #EEF3FF; color: #3C5AA6; }

.article-content .gb-note-warn, .ar-content .gb-note-warn { border-left-color: var(--warn); background: #FFF6E8; color: #95661A; }

.article-content .gb-note-danger, .ar-content .gb-note-danger { border-left-color: var(--danger); background: #FDECEC; color: var(--danger); }

.article-content .gb-note-success, .ar-content .gb-note-success { border-left-color: var(--ok); background: #EAF7F0; color: #1F7A50; }

/* ---- 行动按钮 ---- */
.article-content .gb-btn-wrap, .ar-content .gb-btn-wrap { margin: 22px 0; text-align: center; }

.article-content a.gb-btn, .ar-content a.gb-btn {
  display: inline-block;
  padding: 11px 26px;
  border-radius: 999px;
  background: var(--grad-accent);
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  border: 1px solid transparent;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(232, 93, 117, 0.22);
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.article-content a.gb-btn:hover, .ar-content a.gb-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(232, 93, 117, 0.3); }

.article-content a.gb-btn[data-style="outline"], .ar-content a.gb-btn[data-style="outline"] {
  background: #fff;
  color: var(--accent-deep);
  border-color: var(--accent);
  box-shadow: none;
}

.article-content a.gb-btn[data-style="ghost"], .ar-content a.gb-btn[data-style="ghost"] {
  background: transparent;
  color: var(--accent-deep);
  text-decoration: underline;
  box-shadow: none;
  padding: 4px 6px;
}

/* ---- 折叠面板 ---- */
.article-content details.gb-acc, .ar-content details.gb-acc {
  margin: 20px 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #FFFDFE;
  overflow: hidden;
}

.article-content details.gb-acc > summary, .ar-content details.gb-acc > summary {
  position: relative;
  padding: 12px 16px 12px 36px;
  font-weight: 600;
  color: var(--accent-deep);
  background: linear-gradient(90deg, var(--accent-soft), rgba(255, 227, 234, 0.3));
  cursor: pointer;
  user-select: none;
}

.article-content details.gb-acc > summary::-webkit-details-marker,
.ar-content details.gb-acc > summary::-webkit-details-marker { display: none; }

.article-content details.gb-acc > summary::before, .ar-content details.gb-acc > summary::before {
  content: '▸';
  position: absolute;
  left: 15px;
  color: var(--accent);
  transition: transform 0.18s var(--ease);
}

.article-content details.gb-acc[open] > summary::before,
.ar-content details.gb-acc[open] > summary::before { transform: rotate(90deg); }

.article-content .gb-acc-body, .ar-content .gb-acc-body { padding: 14px 16px 4px; }

/* ---- 分栏 ---- */
.article-content .gb-cols, .ar-content .gb-cols { display: flex; gap: 22px; margin: 20px 0; align-items: flex-start; }

.article-content .gb-cols > .gb-col, .ar-content .gb-cols > .gb-col { flex: 1 1 0; min-width: 0; }

/* ---- 图库 ---- */
/* 轨道一律 minmax(0, 1fr)：图片的固有宽度（如 1200px 大图）会把 1fr 轨道撑开，
   repeat(n, 1fr) 的下限是 auto=min-content，窄屏下整页就横向溢出了 */
.article-content .gb-gallery, .ar-content .gb-gallery { display: grid; gap: 8px; margin: 20px 0; }

.article-content .gb-gallery-1, .ar-content .gb-gallery-1 { grid-template-columns: minmax(0, 1fr); }

.article-content .gb-gallery-2, .ar-content .gb-gallery-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.article-content .gb-gallery-3, .ar-content .gb-gallery-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.article-content .gb-gallery-4, .ar-content .gb-gallery-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.article-content .gb-gallery img, .ar-content .gb-gallery img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  margin: 0;
  cursor: zoom-in;
}

/* ---- 表格 ---- */
.article-content table.gb-table, .ar-content table.gb-table {
  width: 100%;
  margin: 20px 0;
  border-collapse: collapse;
  font-size: 14.5px;
}

.article-content table.gb-table th, .article-content table.gb-table td,
.ar-content table.gb-table th, .ar-content table.gb-table td {
  padding: 9px 12px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.article-content table.gb-table th, .ar-content table.gb-table th {
  background: #FFF7F9;
  color: var(--accent-deep);
  font-weight: 600;
}

.article-content table.gb-table tbody tr:nth-child(even),
.ar-content table.gb-table tbody tr:nth-child(even) { background: rgba(255, 247, 249, 0.6); }

/* 表格在窄屏可横向滚动（外层没有容器，直接用块级滚动） */
@media (max-width: 640px) {
  .article-content table.gb-table, .ar-content table.gb-table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* ---- 间隔块 ---- */
.article-content .gb-spacer, .ar-content .gb-spacer { display: block; }

.article-content .gb-spacer-sm, .ar-content .gb-spacer-sm { height: 16px; }

.article-content .gb-spacer-md, .ar-content .gb-spacer-md { height: 32px; }

.article-content .gb-spacer-lg, .ar-content .gb-spacer-lg { height: 64px; }

/* ---- 嵌入（YouTube / B 站 / 网页） ---- */
.article-content figure.gb-embed, .ar-content figure.gb-embed { margin: 20px 0; }

.article-content figure.gb-embed iframe, .ar-content figure.gb-embed iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 12px;
  background: #000;
}

/* ---- 任务清单（勾选框由 CSS 画） ---- */
.article-content ul.gb-tasks, .ar-content ul.gb-tasks { list-style: none; padding-left: 2px; margin: 18px 0; }

.article-content ul.gb-tasks > li, .ar-content ul.gb-tasks > li {
  position: relative;
  padding-left: 30px;
  margin: 7px 0;
}

.article-content ul.gb-tasks > li::before, .ar-content ul.gb-tasks > li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.42em;
  width: 16px;
  height: 16px;
  border: 2px solid var(--accent);
  border-radius: 5px;
  background: #fff;
}

.article-content ul.gb-tasks > li.is-done, .ar-content ul.gb-tasks > li.is-done {
  color: var(--text-sub);
  text-decoration: line-through;
}

.article-content ul.gb-tasks > li.is-done::before, .ar-content ul.gb-tasks > li.is-done::before {
  content: '✓';
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

/* ---- 引用块的出处（cite） ---- */
.article-content blockquote cite, .ar-content blockquote cite {
  display: block;
  margin-top: 8px;
  font-size: 12.5px;
  font-style: normal;
  color: var(--text-sub);
}

@media (max-width: 640px) {
  .article-content .gb-cols, .ar-content .gb-cols { flex-direction: column; gap: 14px; }
  .article-content .gb-gallery-3, .article-content .gb-gallery-4,
  .ar-content .gb-gallery-3, .ar-content .gb-gallery-4 { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   隐藏内容积分解锁（.hcb-*）
   · 未解锁：灰底遮罩卡，内容不存在于 DOM（不是 CSS 遮挡）
   · 已解锁：正常内容容器，带轻微展开动画
   ============================================================ */

/* ---- 未解锁遮罩 ---- */
.hcb-slot-locked {
  margin: 18px 0;
  border-radius: var(--radius);
  overflow: hidden;
}

/* ---- 作者/管理员预览提示条（仅作者可见，普通读者不渲染内容） ---- */
.hcb-author-note {
  margin: 0 0 14px;
  padding: 10px 14px;
  border: 1px solid #BFD8F5;
  border-radius: 10px;
  background: #F2F8FF;
  color: #2C5A8F;
  font-size: 13px;
  line-height: 1.7;
}

.hcb-author-note b { font-weight: 700; margin-right: 6px; }

.hcb-mask {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 180px;
  padding: 26px 20px;
  text-align: center;
  /* 半透明灰底 + 上下边缘羽化：视觉上像「被盖住的一块」，
     但下面没有任何真实内容，移除样式也看不到东西 */
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(74, 58, 62, 0.07) 22%,
                    rgba(74, 58, 62, 0.07) 78%, rgba(255, 255, 255, 0.55) 100%);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  user-select: none;              /* 遮罩文字不可选中，避免被当正文复制 */
}

.hcb-lock { font-size: 26px; line-height: 1; opacity: 0.7; }

.hcb-tip {
  font-size: 15px;
  color: var(--text);
}
.hcb-tip b { color: var(--accent-deep); font-size: 17px; padding: 0 2px; }

.hcb-refund { font-size: 12px; color: #715960; }
.article-content .hcb-mask p { margin: 0; }
.hcb-unlock-btn:focus-visible, .hcb-btn-main:focus-visible, .hcb-btn-ghost:focus-visible {
  outline: 2px solid var(--accent-deep); outline-offset: 3px;
}

.hcb-unlock-btn {
  margin-top: 6px;
  padding: 9px 30px;
  border: 0;
  border-radius: 999px;
  background: var(--grad-accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(232, 93, 117, 0.28);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.hcb-unlock-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(232, 93, 117, 0.36); }
.hcb-unlock-btn:active { transform: translateY(0) scale(0.97); }
.hcb-unlock-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ---- 已解锁内容 ---- */
.hcb-block { margin: 18px 0; }
.hcb-just-unlocked { animation: hcbExpand 0.32s var(--ease); }
@keyframes hcbExpand {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- 块已被作者删除（点解锁时才发现的极端情况）：一行轻提示 ---- */
.hcb-gone {
  margin: 18px 0;
  padding: 14px 16px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-sub);
  font-size: 13.5px;
  text-align: center;
}

/* ---- 登录回跳定位高亮 ---- */
.hcb-flash { animation: hcbFlash 0.8s var(--ease) 2; border-radius: var(--radius); }
@keyframes hcbFlash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232, 93, 117, 0); }
  50%      { box-shadow: 0 0 0 6px rgba(232, 93, 117, 0.16); }
}

/* ---- 积分不足弹窗 ---- */
.hcb-modal-mask {
  position: fixed; inset: 0; z-index: 900;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(74, 58, 62, 0.42);
  animation: hcbFade 0.2s var(--ease);
}
@keyframes hcbFade { from { opacity: 0; } to { opacity: 1; } }

.hcb-modal {
  width: 100%; max-width: 360px;
  padding: 22px 20px 18px;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.hcb-modal h4 { font-size: 16px; margin-bottom: 10px; color: var(--accent-deep); }
.hcb-modal p { font-size: 14px; color: var(--text); margin-bottom: 6px; }
.hcb-modal-balance { font-size: 12.5px; color: var(--text-sub); }
.hcb-modal-balance b { color: var(--accent-deep); }
.hcb-modal-btns { display: flex; gap: 10px; margin-top: 16px; }
.hcb-btn-main, .hcb-btn-ghost {
  flex: 1; padding: 10px 0; border-radius: 999px; font-size: 14px;
  text-align: center; cursor: pointer; border: 0;
}
.hcb-btn-main { background: var(--grad-accent); color: #fff; font-weight: 600; }
.hcb-btn-main:hover { color: #fff; }
.hcb-btn-ghost { background: var(--bg-deep); color: var(--text); }

/* ---- 移动端 ---- */
@media (max-width: 768px) {
  .hcb-mask { min-height: 180px; padding: 20px 14px; }
  .hcb-unlock-btn { width: 100%; max-width: 240px; }
}

@media (prefers-reduced-motion: reduce) {
  .hcb-just-unlocked, .hcb-flash, .hcb-modal-mask { animation: none; }
  .hcb-unlock-btn { transition: none; }
}
