/* =========================================================
 * CampusConfess 校园表白墙 · 公告栏贴纸风
 *
 * 设计语言：米纸方格底 · 墨线硬边框 · 贴纸硬投影 ·
 *           楷体手写标题 · 荧光笔高亮 · 胶带装饰
 * 配色：校园蓝 #4a90d9 / 活力橙 #ff6b35 / 樱花粉 #e91e63 ·
 *           荧光黄 #ffe45c（高亮）
 * ========================================================= */

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

:root {
  /* 纸与墨 */
  --paper: #f1ebdd;
  --paper-2: #f7f3e7;
  --card: #fffdf6;
  --ink: #211d17;
  --ink-2: #5f594c;
  --ink-3: #8d8677;
  --gridline: rgba(33, 29, 23, .06);
  --on-marker: #211d17;           /* 荧光底上的固定深色字 */

  /* 品牌 */
  --primary: #4a90d9;
  --primary-dark: #3a7bc8;
  --secondary: #ff6b35;
  --accent: #ffb7c5;
  --pink: #e91e63;
  --marker: #ffe45c;              /* 荧光笔黄 */
  --success: #2f9e44;
  --danger: #d64545;
  --warning: #ffc107;
  --info: #17a2b8;

  /* 语义别名（沿用旧变量名，方便维护） */
  --text: #211d17;
  --text-2: #5f594c;
  --text-3: #8d8677;
  --border: #211d17;
  --bg: #f1ebdd;

  /* 边框与投影 */
  --line: 1.5px solid var(--ink);
  --line-2: 2px solid var(--ink);
  --shadow-hard: 3px 3px 0 var(--ink);
  --shadow-hard-sm: 2px 2px 0 var(--ink);
  --shadow-hard-lg: 6px 6px 0 var(--ink);
  --radius: 4px;
  --radius-sm: 3px;
  --max: 1200px;
  --font-hand: "KaiTi", "STKaiti", "Kaiti SC", "华文楷体", "DFKai-SB", serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* 方格作业纸底纹 */
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--gridline) 1px, transparent 1px),
    linear-gradient(90deg, var(--gridline) 1px, transparent 1px);
  background-size: 26px 26px;
}

[hidden] { display: none !important; }
::selection { background: var(--marker); color: var(--on-marker); }

a { color: var(--primary); text-decoration: none; transition: color .15s; }
a:hover { color: var(--secondary); }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }

:focus-visible {
  outline: 2px dashed var(--primary);
  outline-offset: 2px;
}

.container { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* ---------- 按钮（贴纸按钮） ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 24px;
  border: var(--line); border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 700;
  box-shadow: var(--shadow-hard);
  transition: transform .12s, box-shadow .12s, background .15s, color .15s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-secondary { background: var(--secondary); color: #fff; }
.btn-secondary:hover { background: #ef5c22; color: #fff; }
.btn-outline { background: var(--card); color: var(--ink); }
.btn-outline:hover { background: var(--marker); color: var(--on-marker); }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 32px; font-size: 16px; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--paper-2);
  border-bottom: var(--line-2);
}
.header-inner {
  display: flex; align-items: center; gap: 24px;
  height: 64px; max-width: var(--max); margin: 0 auto; padding: 0 16px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
  width: 38px; height: 38px;
  border: var(--line-2); border-radius: var(--radius);
  background: var(--pink); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; transform: rotate(-6deg);
  box-shadow: var(--shadow-hard-sm);
  transition: transform .2s;
}
.brand:hover .brand-logo { transform: rotate(0); }
.brand-title {
  font-family: var(--font-hand);
  font-size: 20px; font-weight: 700; color: var(--text);
  line-height: 1.2; letter-spacing: .06em;
}
.brand-sub { font-size: 11px; color: var(--ink-3); letter-spacing: .12em; }

.main-nav { display: flex; gap: 6px; margin-left: 12px; }
.main-nav a {
  padding: 6px 14px; border: 1.5px solid transparent; border-radius: var(--radius-sm);
  color: var(--text-2); font-size: 15px; font-weight: 600;
  transition: all .15s;
}
.main-nav a:hover {
  color: var(--on-marker);
  background: rgba(255, 228, 92, .55);
  border-color: var(--ink);
}
.main-nav a.active {
  background: var(--marker); color: var(--on-marker);
  border-color: var(--ink); box-shadow: var(--shadow-hard-sm);
  font-weight: 700;
}

.header-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.header-search { display: flex; position: relative; }
.header-search input {
  width: 210px; padding: 8px 40px 8px 14px;
  border: var(--line); border-radius: var(--radius-sm);
  background: var(--card); color: var(--text);
  font-size: 14px; outline: none; transition: box-shadow .15s;
}
.header-search input:focus { box-shadow: var(--shadow-hard-sm); }
.header-search button {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 2px;
  color: var(--text-2); font-size: 14px;
}
.header-search button:hover { color: var(--primary); }

.hamburger {
  display: none; width: 40px; height: 40px; font-size: 20px; color: var(--text);
  border: var(--line); border-radius: var(--radius-sm);
  background: var(--card); box-shadow: var(--shadow-hard-sm);
}

/* ---------- 移动端抽屉 ---------- */
.mobile-nav {
  position: fixed; top: 0; right: -280px; width: 270px; height: 100vh;
  background: var(--paper-2); z-index: 210; transition: right .3s;
  display: flex; flex-direction: column;
  border-left: var(--line-2);
  box-shadow: -6px 0 0 rgba(33, 29, 23, .12);
}
.mobile-nav.open { right: 0; }
.m-nav-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px; border-bottom: var(--line);
  font-family: var(--font-hand); font-weight: 700; font-size: 17px; letter-spacing: .08em;
}
.m-nav-close {
  font-size: 18px; color: var(--text-2);
  width: 30px; height: 30px; border: var(--line); border-radius: var(--radius-sm);
  background: var(--card);
}
.m-nav-menu { padding: 8px 0; flex: 1; }
.m-nav-menu a {
  display: block; padding: 13px 20px; color: var(--text); font-size: 15px;
  border-bottom: 1px dashed var(--ink-3);
}
.m-nav-menu a.active {
  background: var(--marker); color: var(--on-marker); font-weight: 700;
  border-left: 4px solid var(--pink);
}
.m-nav-foot { padding: 16px; border-top: var(--line); }
.mobile-overlay {
  position: fixed; inset: 0; background: rgba(33, 29, 23, .55);
  z-index: 205; opacity: 0; visibility: hidden; transition: all .3s;
}
.mobile-overlay.show { opacity: 1; visibility: visible; }

/* ---------- 首页轮播（海报招贴风） ---------- */
.hero { padding: 26px 0 10px; }
.slider {
  position: relative; height: 310px;
  border: var(--line-2); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-hard-lg);
}
.slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity .5s;
  display: flex; align-items: center;
}
.slide.active { opacity: 1; z-index: 1; }
/* 胶带装饰 */
.slide::after {
  content: ""; position: absolute; top: 16px; right: 46px;
  width: 118px; height: 26px;
  background: rgba(255, 253, 246, .38);
  border-left: 1px dashed rgba(255, 255, 255, .55);
  border-right: 1px dashed rgba(255, 255, 255, .55);
  transform: rotate(7deg);
}
.slide-inner { padding: 0 8%; color: #fff; max-width: 660px; }
.slide-tag {
  display: inline-block; padding: 4px 14px; margin-bottom: 16px;
  background: var(--card); color: var(--ink);
  border: var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hard-sm);
  font-size: 13px; font-weight: 700; transform: rotate(-2deg);
}
.slide-title {
  font-family: var(--font-hand);
  font-size: 38px; font-weight: 700; letter-spacing: .06em;
  margin-bottom: 12px; line-height: 1.35;
  text-shadow: 3px 3px 0 rgba(33, 29, 23, .35);
}
.slide-sub { font-size: 16px; opacity: .95; margin-bottom: 24px; }
.slide-btn {
  display: inline-block; padding: 10px 28px;
  background: var(--card); color: var(--ink);
  border: var(--line); border-radius: var(--radius-sm);
  font-weight: 700; font-size: 15px;
  box-shadow: var(--shadow-hard);
  transition: transform .15s, box-shadow .15s;
}
.slide-btn:hover {
  transform: translate(-2px, -2px); color: var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
}

.slider-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 40px; height: 40px;
  border: var(--line); border-radius: var(--radius-sm);
  background: var(--card); color: var(--ink);
  font-size: 16px; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-hard-sm);
  transition: all .15s;
}
.slider-arrow:hover { background: var(--marker); }
.slider-arrow.prev { left: 14px; }
.slider-arrow.next { right: 14px; }
.slider-dots {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  z-index: 2; display: flex; gap: 8px;
}
.slider-dots .dot {
  width: 10px; height: 10px;
  background: rgba(255, 253, 246, .55);
  border: 1px solid rgba(33, 29, 23, .4);
  transition: all .25s; cursor: pointer;
}
.slider-dots .dot.active { width: 26px; background: var(--marker); }

/* ---------- 类型筛选 Tab（贴纸标签） ---------- */
.filter-bar {
  background: var(--paper-2);
  border-bottom: var(--line);
  position: sticky; top: 64px; z-index: 90;
}
.tabs {
  display: flex; gap: 10px;
  max-width: var(--max); margin: 0 auto; padding: 14px 16px;
  overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex-shrink: 0; padding: 7px 18px;
  background: var(--card); color: var(--text-2);
  border: var(--line); border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow-hard-sm);
  cursor: pointer; transition: all .15s;
}
.tab:hover { background: rgba(255, 228, 92, .55); color: var(--on-marker); }
.tab:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink); }
.tab.active { background: var(--primary); color: #fff; }

/* ---------- 瀑布流卡片（图钉墙） ---------- */
.feed { padding: 26px 0 44px; }
.waterfall { columns: 3; column-gap: 20px; }

.card {
  position: relative;
  break-inside: avoid;
  background: var(--card);
  border: var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  margin-bottom: 22px; overflow: hidden;
  transition: transform .18s, box-shadow .18s;
  animation: fadeInUp .4s ease both;
}
/* 手贴上去的轻微歪斜 */
.waterfall .card:nth-child(odd) { transform: rotate(-.4deg); }
.waterfall .card:nth-child(even) { transform: rotate(.4deg); }
.card:hover {
  transform: rotate(0) translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--ink);
  z-index: 2;
}

.card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px; gap: 8px;
}
.card-author { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar {
  position: relative; overflow: hidden;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1.5px solid var(--ink);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 15px; font-weight: 700;
}
.avatar .av-letter { position: relative; z-index: 0; line-height: 1; }
.avatar .av-img {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}
.avatar-lg { width: 72px; height: 72px; font-size: 30px; }
.avatar-xl { width: 84px; height: 84px; font-size: 34px; }

.a-meta { min-width: 0; }
.a-name {
  font-size: 14px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.a-time { font-size: 12px; color: var(--ink-3); }

/* 分类小签（彩色贴纸 + 同色硬投影） */
.tag {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 700;
  background: var(--tag-bg, #eef4fb); color: var(--tag-c, var(--primary));
  border: 1.5px solid var(--tag-c, var(--primary));
  box-shadow: 2px 2px 0 var(--tag-c, var(--primary));
}

.card-body { padding: 0 16px 12px; }
.card-title {
  font-family: var(--font-hand);
  font-size: 18px; font-weight: 700; line-height: 1.45;
  margin-bottom: 6px; letter-spacing: .03em;
}
.card-title a { color: var(--text); }
.card-title a:hover {
  color: var(--text);
  text-decoration: underline; text-decoration-style: wavy;
  text-decoration-color: var(--secondary); text-underline-offset: 4px;
}
.card-text { font-size: 14px; color: var(--text-2); line-height: 1.75; }
.card-text.clamped { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-text p { margin: 0 0 6px; }
.card-text p:last-child { margin-bottom: 0; }
.expand-btn { display: inline-block; margin-top: 6px; padding: 2px 12px; font-size: 12px; color: #222; background: #fff; border: 1.5px solid #222; border-radius: 999px; box-shadow: 2px 2px 0 rgba(34, 34, 34, .18); cursor: pointer; font-family: inherit; line-height: 1.8; }
.expand-btn:hover { background: var(--marker, #ffe45c); }

/* ---- 投稿配图（用户自主上传） ---- */
.upload-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.upload-pick { padding: 8px 18px; font-size: 14px; background: #fff; color: #222; border: 1.5px solid #222; border-radius: 999px; box-shadow: 3px 3px 0 rgba(34, 34, 34, .18); cursor: pointer; font-family: inherit; }
.upload-pick:hover { background: var(--marker, #ffe45c); }
.upload-previews { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.up-thumb { position: relative; width: 84px; height: 84px; border: 1.5px solid #222; border-radius: 10px; overflow: hidden; box-shadow: 2px 2px 0 rgba(34, 34, 34, .15); }
.up-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.up-del { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; padding: 0; line-height: 17px; text-align: center; background: #fff; border: 1.5px solid #222; border-radius: 50%; font-size: 12px; cursor: pointer; color: #222; }

/* ---- 投稿验证码 ---- */
.captcha-line { display: flex; gap: 10px; align-items: stretch; }
.captcha-line .form-control { flex: 1; min-width: 0; }
.captcha-img { width: 120px; height: 40px; flex: 0 0 120px; border: 1.5px solid #222; border-radius: 8px; box-shadow: 2px 2px 0 rgba(34, 34, 34, .15); cursor: pointer; background: #fff; object-fit: cover; }

/* ---- 个人中心：EMLOG 账号卡 ---- */
.role-chip { display: inline-block; font-size: 12px; padding: 1px 10px; border: 1.5px solid #222; border-radius: 999px; background: var(--marker, #ffe45c); vertical-align: middle; margin-left: 6px; font-weight: 400; color: #222; }
.profile-actions { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- 登录区：第三方登录插槽 / 注册登录入口 ---- */
.auth-links { display: flex; align-items: center; gap: 8px; }
.oauth-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1.5px solid #222; border-radius: 50%; background: #fff; box-shadow: 2px 2px 0 rgba(34, 34, 34, .15); font-weight: 700; font-size: 14px; color: #222; text-decoration: none; }
.oauth-btn.qq:hover { background: #12b7f5; color: #fff; }
.oauth-btn.wx:hover { background: #07c160; color: #fff; }

/* ---- 多图：卡片九宫格 img / 详情多图网格 ---- */
.card-images .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.log-cover-multi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.log-cover-multi img { width: 100%; aspect-ratio: 1; object-fit: cover; border: 1.5px solid var(--ink, #222); border-radius: 10px; }

.card-images { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; }
.ph {
  position: relative; overflow: hidden;
  border: 1.5px solid var(--ink); border-radius: var(--radius-sm);
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-size: 34px; cursor: zoom-in; transition: transform .18s;
}
.ph:hover { transform: scale(1.03) rotate(-.5deg); }
.card-images .ph:nth-child(1):nth-last-child(1) { grid-column: span 2; aspect-ratio: 16 / 9; }

.card-foot {
  display: flex; align-items: center; gap: 18px;
  padding: 10px 16px; border-top: 1px dashed var(--ink-3);
}
.act {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; color: var(--ink-3); font-weight: 600; transition: color .15s;
}
.act:hover { color: var(--primary); }
.act.like.liked { color: var(--pink); }
.act.like.liked .ic { animation: heartBeat .4s ease; }
.card-foot .more-link { margin-left: auto; font-size: 13px; font-weight: 700; }

/* ---------- 加载更多 / 空状态 ---------- */
.load-wrap { text-align: center; margin-top: 10px; }
.empty {
  text-align: center; padding: 64px 24px;
  background: var(--card);
  border: 2px dashed var(--ink-3); border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
}
.empty-ic { font-size: 52px; margin-bottom: 16px; }
.empty-title {
  font-family: var(--font-hand);
  font-size: 23px; font-weight: 700; letter-spacing: .06em; margin-bottom: 8px;
}
.empty-text { color: var(--ink-3); margin-bottom: 24px; }
.empty-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- 详情页 ---------- */
.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  padding: 18px 0; font-size: 14px; color: var(--ink-3);
}
.breadcrumb a { color: var(--ink-3); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: var(--ink-3); }
.breadcrumb .cur { color: var(--text); font-weight: 700; }

.detail-card {
  background: var(--card);
  border: var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  overflow: hidden; margin-bottom: 26px;
  animation: fadeInUp .4s ease both;
}
.detail-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 26px; border-bottom: 1px dashed var(--ink-3);
  gap: 12px; flex-wrap: wrap;
}
.detail-content { padding: 24px 26px; }
.detail-title {
  font-family: var(--font-hand);
  font-size: 30px; font-weight: 700; letter-spacing: .04em;
  line-height: 1.4; margin-bottom: 14px;
}
.detail-meta {
  display: flex; gap: 16px; font-size: 13px; color: var(--ink-3);
  margin-bottom: 20px; flex-wrap: wrap;
}
.detail-text {
  font-size: 16px; color: var(--text);
  line-height: 1.95; white-space: pre-wrap;
}

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 22px; }
.gallery .ph { aspect-ratio: 1; font-size: 48px; }

.detail-actions {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 26px; border-top: 1px dashed var(--ink-3); flex-wrap: wrap;
}
.action-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 18px; font-size: 14px; font-weight: 600;
  background: var(--card); color: var(--text-2);
  border: var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hard-sm);
  transition: all .15s;
}
.action-btn:hover {
  background: var(--marker); color: var(--on-marker);
  transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink);
}
.action-btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink); }
.action-btn.like.liked { background: #ffe0e9; color: var(--pink); }
.action-btn.like.liked .ic { animation: heartBeat .4s ease; }
.action-btn.fav.faved { background: var(--marker); color: var(--on-marker); }
.action-btn.report-btn:hover { background: rgba(214, 69, 69, .12); color: var(--danger); }

/* ---------- 评论 ---------- */
.comments-card {
  background: var(--card);
  border: var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  padding: 24px 26px; margin-bottom: 26px;
}
.comments-title {
  font-family: var(--font-hand);
  font-size: 21px; font-weight: 700; letter-spacing: .05em; margin-bottom: 18px;
}
.comments-title span { font-family: inherit; font-size: 14px; color: var(--ink-3); }
.c-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px dashed var(--ink-3); }
.c-item:last-of-type { border-bottom: none; }
.c-body { flex: 1; min-width: 0; }
.c-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.c-name { font-size: 14px; font-weight: 700; }
.c-time { font-size: 12px; color: var(--ink-3); }
.c-text { font-size: 14px; color: var(--text-2); line-height: 1.75; }
.c-reply { font-size: 13px; color: var(--ink-3); margin-top: 6px; }
.c-reply:hover { color: var(--primary); }

.comment-form { margin-top: 18px; border-top: 1px dashed var(--ink-3); padding-top: 18px; }
.comment-form textarea {
  width: 100%; min-height: 90px; padding: 12px 14px;
  border: var(--line); border-radius: var(--radius-sm);
  background: var(--card); color: var(--text);
  font-size: 14px; font-family: inherit; resize: vertical; outline: none;
  transition: box-shadow .15s;
}
.comment-form textarea:focus { box-shadow: var(--shadow-hard-sm); }
.cf-row { display: flex; gap: 10px; margin-top: 10px; align-items: center; }
.cf-row input {
  flex: 1; padding: 9px 14px;
  border: var(--line); border-radius: var(--radius-sm);
  background: var(--card); color: var(--text);
  font-size: 14px; outline: none;
}
.cf-row input:focus { box-shadow: var(--shadow-hard-sm); }

/* ---------- 相关推荐 ---------- */
.section-title {
  font-family: var(--font-hand);
  font-size: 21px; font-weight: 700; letter-spacing: .05em;
  margin: 4px 0 18px; display: inline-block;
  padding: 0 8px;
  background: linear-gradient(transparent 55%, var(--marker) 55%);
}
.related-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 44px; }
.related-grid .card { margin-bottom: 0; }

/* ---------- 投稿页 ---------- */
.page-head { text-align: center; padding: 38px 0 28px; }
.page-title {
  font-family: var(--font-hand);
  font-size: 34px; font-weight: 700; letter-spacing: .08em; margin-bottom: 8px;
}
.page-sub { color: var(--ink-3); font-size: 16px; }

.form-card {
  position: relative;
  max-width: 780px; margin: 0 auto 44px;
  background: var(--card);
  border: var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-hard-lg); padding: 34px;
}
/* 表单顶部胶带 */
.form-card::before {
  content: ""; position: absolute; top: -12px; left: 50%;
  width: 128px; height: 26px;
  background: rgba(255, 228, 92, .8);
  border-left: 1px dashed rgba(33, 29, 23, .35);
  border-right: 1px dashed rgba(33, 29, 23, .35);
  transform: translateX(-50%) rotate(-2deg);
}
.form-group { margin-bottom: 22px; }
.form-label { display: block; font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.req { color: var(--danger); }
.form-help { font-size: 13px; color: var(--ink-3); margin-top: 6px; }
.char-count { display: block; text-align: right; font-size: 12px; color: var(--ink-3); margin-top: 5px; }

.type-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.type-opt input { display: none; }
.type-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 15px 8px;
  border: var(--line); border-radius: var(--radius-sm);
  background: var(--card);
  cursor: pointer; transition: all .15s;
  font-size: 13px; font-weight: 600; color: var(--text-2);
}
.type-card .ic { font-size: 24px; }
.type-card:hover { background: rgba(255, 228, 92, .45); color: var(--on-marker); }
.type-opt input:checked + .type-card {
  background: var(--primary); color: #fff;
  box-shadow: var(--shadow-hard);
  transform: translate(-1px, -1px);
}
/* 已选小红章 */
.type-opt input:checked + .type-card::after {
  content: "已选";
  position: absolute; top: -9px; right: -7px;
  padding: 1px 6px;
  background: var(--card); color: var(--pink);
  border: 1.5px solid var(--pink); border-radius: 2px;
  font-size: 10px; font-weight: 700;
  transform: rotate(8deg);
}

.form-control {
  width: 100%; padding: 11px 14px;
  border: var(--line); border-radius: var(--radius-sm);
  background: var(--card); color: var(--text);
  font-size: 15px; font-family: inherit; outline: none;
  transition: box-shadow .15s;
}
.form-control:focus { box-shadow: var(--shadow-hard-sm); }
textarea.form-control { min-height: 150px; resize: vertical; line-height: 1.7; }

.upload-area {
  border: 2px dashed var(--ink-3); border-radius: var(--radius-sm);
  padding: 26px; text-align: center; color: var(--ink-3);
  cursor: pointer; transition: all .15s;
  background: var(--card);
}
.upload-area:hover {
  border-color: var(--primary); color: var(--primary);
  background: rgba(74, 144, 217, .08);
}
.upload-area .ic { font-size: 34px; display: block; margin-bottom: 6px; }
.previews { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 12px; }
.prev-item {
  position: relative; aspect-ratio: 1; overflow: hidden;
  border: var(--line); border-radius: var(--radius-sm);
}
.prev-item img { width: 100%; height: 100%; object-fit: cover; }
.prev-del {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px;
  background: var(--ink); color: var(--paper);
  font-size: 12px; display: flex; align-items: center; justify-content: center;
}

.check-line { display: flex; align-items: center; gap: 8px; font-size: 15px; cursor: pointer; }
.check-line input { width: 17px; height: 17px; accent-color: var(--primary); }

/* 投稿须知（黄色便签） */
.notice {
  background: #fff3bf;
  border: var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hard);
  padding: 18px 20px; transform: rotate(-.35deg);
  color: var(--on-marker);
}
.notice h4 { font-size: 15px; margin-bottom: 10px; display: flex; gap: 7px; align-items: center; }
.notice li { font-size: 14px; margin-bottom: 6px; padding-left: 16px; position: relative; }
.notice li::before {
  content: "·"; position: absolute; left: 5px; color: var(--pink); font-weight: 900;
}

/* ---------- 搜索页 ---------- */
.search-box { max-width: 760px; margin: 0 auto 14px; }
.search-input-group {
  display: flex; overflow: hidden;
  border: var(--line-2); border-radius: var(--radius-sm);
  background: var(--card);
  box-shadow: var(--shadow-hard);
}
.search-input-group input {
  flex: 1; padding: 15px 18px; border: none;
  background: var(--card); color: var(--text);
  font-size: 16px; outline: none;
}
.search-input-group input:focus { background: #fffef9; }
.search-input-group button {
  padding: 0 30px; background: var(--primary); color: #fff;
  font-size: 16px; font-weight: 700;
  border-left: var(--line);
  transition: background .15s;
}
.search-input-group button:hover { background: var(--secondary); }
.filters { display: flex; gap: 14px; justify-content: center; margin-bottom: 8px; flex-wrap: wrap; }
.filter-group { display: flex; align-items: center; gap: 7px; font-size: 14px; color: var(--text-2); }
.select {
  padding: 7px 12px;
  border: var(--line); border-radius: var(--radius-sm);
  background: var(--card); color: var(--text);
  font-size: 14px; outline: none; cursor: pointer;
}
.select:focus { box-shadow: var(--shadow-hard-sm); }

.results-info {
  display: flex; gap: 16px; flex-wrap: wrap; align-items: center;
  background: var(--card);
  border: var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hard);
  padding: 13px 18px; margin: 20px 0;
  font-size: 14px; color: var(--text-2);
}
.results-info .kw {
  color: var(--pink); font-weight: 700;
  background: rgba(255, 183, 197, .5);
  padding: 0 6px; border-radius: 2px;
}
.results-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 30px; }
.results-grid .card { margin-bottom: 0; }

/* 热门搜索（贴角胶带） */
.hot-section {
  position: relative;
  background: var(--card);
  border: var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  padding: 24px; margin-bottom: 44px;
}
.hot-section::before {
  content: ""; position: absolute; top: -10px; right: 34px;
  width: 92px; height: 22px;
  background: rgba(255, 183, 197, .85);
  transform: rotate(4deg);
}
.hot-title {
  font-family: var(--font-hand);
  font-size: 18px; font-weight: 700; letter-spacing: .05em; margin-bottom: 14px;
}
.hot-tags { display: flex; gap: 10px; flex-wrap: wrap; }
.hot-tag {
  padding: 6px 16px;
  background: var(--card); color: var(--text-2);
  border: var(--line); border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow-hard-sm);
  transition: all .15s;
}
.hot-tag:hover { background: var(--primary); color: #fff; transform: translate(-1px, -1px); }

/* ---------- 页脚 / 悬浮按钮 ---------- */
.site-footer {
  background: #211d17; color: #d9d2c2;
  border-top: var(--line-2);
  padding: 28px 0; text-align: center; font-size: 14px;
}
.f-links { display: flex; gap: 22px; justify-content: center; margin-bottom: 10px; flex-wrap: wrap; }
.f-links a { color: #f0e8d6; }
.f-links a:hover {
  color: var(--marker);
  text-decoration: underline; text-decoration-style: wavy; text-underline-offset: 4px;
}
.site-footer p { color: #a89f8c; }

.fab {
  position: fixed; right: 26px; bottom: 30px; z-index: 120;
  display: flex; align-items: center; gap: 7px;
  padding: 13px 22px;
  background: var(--secondary); color: #fff;
  border: var(--line-2); border-radius: var(--radius);
  font-size: 15px; font-weight: 700;
  box-shadow: 4px 4px 0 var(--ink);
  transform: rotate(-3deg);
  transition: all .15s;
}
.fab:hover {
  color: #fff; transform: rotate(0) translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}

.btt {
  position: fixed; left: 26px; bottom: 30px; z-index: 120;
  width: 42px; height: 42px;
  background: var(--card); color: var(--text-2); font-size: 17px; font-weight: 700;
  border: var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hard);
  opacity: 0; visibility: hidden;
  transition: all .2s;
}
.btt.show { opacity: 1; visibility: visible; }
.btt:hover { background: var(--marker); color: var(--on-marker); }

/* ---------- 弹窗 / 灯箱 / Toast ---------- */
.modal {
  position: fixed; inset: 0; z-index: 300; display: flex;
  align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: all .22s;
}
.modal.show { opacity: 1; visibility: visible; }
.modal-mask { position: absolute; inset: 0; background: rgba(33, 29, 23, .55); }
.modal-box {
  position: relative;
  background: var(--card);
  border: var(--line-2); border-radius: var(--radius);
  box-shadow: var(--shadow-hard-lg);
  padding: 34px 30px; max-width: 400px; width: 90%; text-align: center;
  transform: scale(.9) rotate(-.5deg); transition: transform .22s;
}
.modal.show .modal-box { transform: scale(1) rotate(0); }
.modal-ic { font-size: 50px; margin-bottom: 14px; }
.modal-title {
  font-family: var(--font-hand);
  font-size: 23px; font-weight: 700; letter-spacing: .06em; margin-bottom: 10px;
}
.modal-text { color: var(--text-2); font-size: 15px; margin-bottom: 22px; line-height: 1.7; }
.modal-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.share-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 6px; }
.share-opt {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 15px 10px; font-size: 14px; font-weight: 600; color: var(--text-2);
  background: var(--card);
  border: var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hard-sm);
  transition: all .15s;
}
.share-opt:hover { background: var(--marker); color: var(--on-marker); transform: translate(-1px, -1px); }
.share-opt .ic { font-size: 24px; }
.modal-close {
  position: absolute; top: 10px; right: 12px;
  width: 30px; height: 30px; font-size: 16px; color: var(--text-2);
  border: var(--line); border-radius: var(--radius-sm);
  background: var(--card); line-height: 1;
}
.modal-close:hover { background: var(--danger); color: #fff; }

.lightbox {
  position: fixed; inset: 0; z-index: 320; display: flex;
  align-items: center; justify-content: center;
  background: rgba(20, 17, 12, .93); opacity: 0; visibility: hidden; transition: all .22s;
}
.lightbox.show { opacity: 1; visibility: visible; }
.lb-box {
  width: min(760px, 92vw); height: min(560px, 78vh);
  border: 5px solid #f7f3e7;
  transform: rotate(-1.2deg);
  display: flex; align-items: center; justify-content: center;
  font-size: 130px; color: #fff;
  box-shadow: 10px 10px 0 rgba(0, 0, 0, .45);
}
.lb-close {
  position: absolute; top: 22px; right: 28px;
  width: 42px; height: 42px;
  background: #f7f3e7; color: #211d17; font-size: 18px; font-weight: 700;
  border: 2px solid #211d17; border-radius: 3px;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .5);
}
.lb-close:hover { background: var(--marker); }

.toast {
  position: fixed; top: 84px; left: 50%; transform: translateX(-50%) translateY(-16px);
  background: #211d17; color: #ffe45c;
  padding: 10px 24px;
  border-radius: 3px;
  font-size: 14px; font-weight: 700; letter-spacing: .04em;
  box-shadow: 4px 4px 0 rgba(255, 228, 92, .45);
  z-index: 400;
  opacity: 0; visibility: hidden; transition: all .28s;
}
.toast.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

/* ---------- 动画 ---------- */
/* 仅做透明度渐入：把 transform 留给旋转/悬停效果 */
@keyframes fadeInUp {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes heartBeat {
  0% { transform: scale(1); }
  35% { transform: scale(1.35); }
  70% { transform: scale(.92); }
  100% { transform: scale(1); }
}

/* ---------- 单页路由视图 ---------- */
.view { display: none; }
.view.active {
  display: block;
  animation: viewIn .26s ease both;
}
@keyframes viewIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 发布时 QQ 头像获取 ---------- */
.qq-fetch { display: flex; align-items: center; gap: 14px; }
.qq-fetch .form-control { flex: 1; }
.qq-preview {
  width: 48px; height: 48px; font-size: 17px; flex-shrink: 0;
  box-shadow: var(--shadow-hard-sm);
}

/* =========================================================
 * 迭代新增：排序 / 统计条 / 卡片收藏与删除 /
 *           关键词高亮 / 上一条下一条 / 数据管理
 * ========================================================= */

/* 筛选行：Tab + 排序 */
.filter-row {
  display: flex; align-items: center; gap: 0;
  max-width: var(--max); margin: 0 auto; padding: 0 16px;
}
/* 关键：min-width:0 允许标签区收缩滚动，绝不与排序区重叠 */
.filter-row .tabs {
  flex: 1 1 auto; min-width: 0;
  margin: 0; padding: 12px 16px 12px 0; max-width: none;
}
.sort-switch {
  display: flex; gap: 6px;
  flex: 0 0 auto; white-space: nowrap;
  padding: 12px 0 12px 16px;
  border-left: 1px dashed var(--ink-3);
}
/* 窄屏：排序独占一行居中，与分类彻底分行 */
@media (max-width: 900px) {
  .filter-row { flex-wrap: wrap; }
  .filter-row .tabs { flex: 1 1 100%; padding: 12px 0 6px; }
  .sort-switch {
    flex: 1 1 100%; justify-content: center;
    border-left: none; border-top: 1px dashed var(--ink-3);
    padding: 10px 0 12px;
  }
}
.sort-btn {
  padding: 6px 14px;
  background: var(--card); color: var(--text-2);
  border: var(--line); border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 700;
  box-shadow: var(--shadow-hard-sm);
  cursor: pointer; transition: all .15s;
}
.sort-btn:hover { background: rgba(255, 228, 92, .55); color: var(--on-marker); }
.sort-btn.active { background: var(--secondary); color: #fff; }

/* 数据统计条（钉在墙上的纸条） */
.stats-strip {
  display: block; width: max-content; max-width: calc(100% - 32px);
  margin: 22px auto 0; padding: 8px 20px;
  background: var(--card); color: var(--text-2);
  border: var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hard);
  transform: rotate(-.4deg);
  font-size: 14px; text-align: center;
}
.stats-strip b { color: var(--pink); font-size: 16px; margin: 0 2px; }

/* 卡片：右侧组（分类签 + 删除） */
.head-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.card-del {
  width: 22px; height: 22px; font-size: 11px; font-weight: 700; line-height: 1;
  color: var(--ink-3);
  background: var(--card);
  border: 1.5px solid var(--ink-3); border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.card-del:hover { background: var(--danger); color: #fff; border-color: var(--danger); }

/* 卡片收藏 */
.act.fav.faved { color: #e2a400; }

/* 卡片底部换行保护（新增收藏后更挤） */
.card-foot { flex-wrap: wrap; }

/* 搜索关键词高亮 */
mark.kw-hl {
  background: var(--marker); color: var(--on-marker);
  padding: 0 2px; border-radius: 2px; font-weight: 700;
}

/* 详情：上一条 / 下一条 */
.pnav {
  display: flex; justify-content: space-between; gap: 14px;
  margin: -10px 0 26px;
}
.pnav-btn {
  flex: 1; max-width: 49%;
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  background: var(--card); color: var(--text);
  border: var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hard-sm);
  font-size: 14px; font-weight: 700;
  transition: all .15s;
}
.pnav-btn span {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--ink-2); font-weight: 600; font-size: 13px;
}
.pnav-btn:hover {
  background: var(--marker); color: var(--on-marker);
  transform: translateY(-2px);
}
.pnav-btn.next { justify-content: flex-end; text-align: right; }

/* 举报后状态 */
.action-btn.report-btn.reported,
.action-btn[disabled] {
  opacity: .8; cursor: default;
  background: var(--paper-2); color: var(--ink-3);
  box-shadow: none;
}
.action-btn[disabled]:hover {
  transform: none; box-shadow: none;
  background: var(--paper-2); color: var(--ink-3);
}

/* 个人中心：数据管理 */
.profile-danger { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin: -6px 0 44px; }
.btn-sm { padding: 7px 16px; font-size: 13px; }

/* =========================================================
 * 二轮迭代：灯箱切换 / 关于我深度页 / 评论计数
 * ========================================================= */

/* 灯箱：左右切换箭头 + 计数 */
.lb-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 46px; height: 46px;
  background: #f7f3e7; color: #211d17;
  font-size: 26px; font-weight: 700; line-height: 1;
  border: 2px solid #211d17; border-radius: 3px;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .5);
  display: flex; align-items: center; justify-content: center;
}
.lb-arrow:hover { background: var(--marker); }
.lb-prev { left: 26px; }
.lb-next { right: 26px; }
.lb-count {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #211d17; color: #ffe45c;
  border: 1.5px solid #ffe45c; border-radius: 3px;
  padding: 4px 14px; font-size: 13px; font-weight: 700; letter-spacing: .1em;
}

/* 主题按钮：固定尺寸 SVG */
.theme-toggle svg { display: block; width: 18px; height: 18px; }

/* 关于我：统计卡可点击（直达 Tab） */
.profile-stats .stat {
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.profile-stats .stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hard-sm);
}

/* 关于我：更新入口链接 */
.profile-edit { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 700; }
.profile-edit:hover {
  text-decoration: underline; text-decoration-style: wavy; text-underline-offset: 3px;
}

/* 关于我：动态时间线（蓝=发布，橙=评论） */
.act-post { border-left: 4px solid var(--primary); }
.act-comment { border-left: 4px solid var(--secondary); }

/* 关于我：删除评论 */
.c-del { margin-left: 14px; font-size: 12px; font-weight: 700; color: var(--danger); }
.c-del:hover { text-decoration: underline; }

/* 详情：评论字数计数 */
.cf-count { display: block; text-align: right; font-size: 12px; color: var(--ink-3); margin-top: 4px; }

/* =========================================================
 * 多页面版新增：公告栏(热榜+情话盲盒) / 热度徽章 /
 * 表情快捷输入 / 广告位 / 关于页分类卡
 * ========================================================= */

/* 公告栏：左右两块贴纸卡（窄屏纵向堆叠） */
.board {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 18px;
  margin: 22px 0 6px;
}
.board section {
  background: var(--card);
  border: var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  padding: 18px 20px;
  min-width: 0;
}
.board h3 {
  font-family: var(--font-hand);
  font-size: 18px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.board h3 em {
  font-style: normal;
  font-size: 12px;
  background: var(--marker);
  color: var(--on-marker);
  padding: 1px 8px;
  border-radius: 2px;
  margin-left: 6px;
}

/* 热榜列表 */
.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-list li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  border-bottom: 1px dashed var(--ink-3);
  color: var(--text);
  font-size: 14px;
}
.rank-list li:last-child a { border-bottom: none; }
.rank-list li a:hover { background: rgba(255, 228, 92, .45); }
.medal { flex-shrink: 0; font-size: 16px; }
.rk-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.rk-like { flex-shrink: 0; color: var(--pink); font-weight: 700; font-size: 13px; }
.rank-empty { color: var(--ink-3); font-size: 14px; padding: 10px 4px; }

/* 情话盲盒 */
.quote-text {
  font-family: var(--font-hand);
  font-size: 17px;
  line-height: 1.8;
  min-height: 64px;
  color: var(--text);
  padding: 10px 12px;
  background: #fff6c9;
  border: 1.5px dashed var(--ink);
  border-radius: 3px;
  transform: rotate(-.4deg);
  margin-bottom: 12px;
  transition: opacity .25s;
}
body.dark .quote-text { background: #4a432a; color: #ffe9a8; }

/* 热度徽章（卡片头部） */
.heat {
  font-size: 10px;
  font-weight: 800;
  line-height: 1.4;
  padding: 2px 7px;
  border: 1.5px solid var(--secondary);
  border-radius: 2px;
  color: var(--secondary);
  background: var(--card);
  transform: rotate(-5deg);
  flex-shrink: 0;
  margin-right: 4px;
}
.heat.hot {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
  box-shadow: 1.5px 1.5px 0 var(--ink);
}

/* 评论表情快捷输入 */
.emoji-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.emoji-bar button {
  width: 34px;
  height: 30px;
  font-size: 16px;
  line-height: 1;
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  box-shadow: 1.5px 1.5px 0 var(--ink);
  cursor: pointer;
  transition: transform .12s, background .12s;
}
.emoji-bar button:hover { background: var(--marker); transform: translateY(-2px); }

/* 广告位占位（对接 EMLOG 广告组件 / 联盟代码时替换内部内容） */
.ad-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 96px;
  margin: 22px 0;
  background: repeating-linear-gradient(45deg, rgba(33, 29, 23, .04) 0 10px, transparent 10px 20px);
  border: 2px dashed var(--ink-3);
  border-radius: var(--radius);
  color: var(--ink-3);
  text-align: center;
  padding: 14px;
}
.ad-tag {
  position: absolute;
  top: 8px;
  left: 10px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  background: var(--ink);
  color: var(--paper);
  padding: 2px 8px;
  border-radius: 2px;
}
.ad-text { font-size: 13px; font-weight: 600; }
.ad-hint { font-size: 11px; opacity: .8; }
body.dark .ad-slot { background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .05) 0 10px, transparent 10px 20px); }
body.dark .ad-tag { background: var(--paper); color: var(--ink); }

/* 关于页：分类卡片 */
.about-types {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.about-type {
  border: 1.5px dashed var(--ink-3);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: var(--paper-2);
}
.about-type p { font-size: 13px; color: var(--text-2); margin-top: 8px; line-height: 1.6; }
body.dark .about-type { background: var(--card); }

/* 中屏：热榜整行，仪式与情话并排 */
@media (max-width: 1024px) {
  .board { grid-template-columns: 1fr 1fr; }
  .board-rank { grid-column: 1 / -1; }
}
/* 窄屏：公告栏堆叠 */
@media (max-width: 768px) {
  .board { grid-template-columns: 1fr; }
  .rank-list li a { padding: 9px 2px; }
}

/* =========================================================
 * 游戏化：今日仪式（打卡/心情） / 成就徽章墙 / 彩蛋爱心雨
 * ========================================================= */

/* 今日仪式 */
.streak-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 14px;
  margin-bottom: 12px;
}
.streak-flame { font-size: 20px; }
.streak-row b { color: var(--secondary); font-size: 17px; font-family: var(--font-hand); }
.checkin-btn { margin-left: auto; }
.checkin-btn:disabled { opacity: .65; cursor: default; box-shadow: none; }
.mood-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-3);
  letter-spacing: .12em;
  margin-bottom: 6px;
}
.mood-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.mood-btn {
  font-size: 20px;
  padding: 6px 0;
  line-height: 1;
  background: var(--paper-2);
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  box-shadow: 1.5px 1.5px 0 var(--ink);
  cursor: pointer;
  transition: transform .12s, background .12s;
}
.mood-btn:hover { transform: translateY(-2px); background: var(--marker); }
.mood-btn.picked {
  background: var(--marker);
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, .18);
  transform: translateY(0);
}
.mood-echo {
  font-family: var(--font-hand);
  font-size: 14px;
  line-height: 1.6;
  margin-top: 10px;
  padding: 6px 10px;
  background: #fff6c9;
  border-left: 3px solid var(--secondary);
  border-radius: 2px;
}
body.dark .mood-echo { background: #4a432a; color: #ffe9a8; }
.mood-trail {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 15px;
}
.trail-label { font-size: 11px; color: var(--ink-3); }
.trail-day.miss { color: var(--ink-3); opacity: .5; font-weight: 700; }

/* 成就徽章墙（关于我） */
.badge-section { margin: 6px 0 24px; }
.badge-head {
  font-family: var(--font-hand);
  font-size: 18px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}
.badge-count {
  font-size: 12px;
  font-weight: 700;
  background: var(--marker);
  color: var(--on-marker);
  padding: 1px 10px;
  border-radius: 2px;
}
.badge-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 10px;
}
.badge-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
  padding: 10px 8px;
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 2px 2px 0 var(--ink);
}
.badge-ic { font-size: 26px; line-height: 1.2; }
.badge-name { font-weight: 700; font-size: 13px; }
.badge-desc { font-size: 11px; color: var(--ink-3); line-height: 1.4; }
.badge-tile.locked {
  opacity: .55;
  filter: grayscale(1);
  border-style: dashed;
  box-shadow: none;
  background: var(--paper-2);
}
body.dark .badge-tile.locked { background: var(--card); }

/* 彩蛋：爱心雨 */
@keyframes heartFall {
  0% { transform: translateY(-8vh) rotate(-14deg) scale(.9); opacity: 0; }
  12% { opacity: 1; }
  100% { transform: translateY(106vh) rotate(26deg) scale(1.1); opacity: 0; }
}
.hearts-rain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 260;
  overflow: hidden;
}
.hearts-rain span {
  position: absolute;
  top: -6vh;
  animation: heartFall linear forwards;
  will-change: transform;
}

/* ---------- 深色模式切换 / 用户区 ---------- */
.theme-toggle {
  width: 36px; height: 36px;
  background: var(--card); font-size: 16px;
  color: var(--text); /* SVG 用 currentColor，深浅色都要有可见前景色 */
  border: var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hard-sm);
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s;
  flex-shrink: 0;
}
.theme-toggle:hover { transform: translateY(-2px); }
.theme-toggle:active { transform: translateY(0); box-shadow: none; }

.user-area { position: relative; }
.user-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 10px 4px 4px;
  background: var(--card);
  border: var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hard-sm);
  cursor: pointer; position: relative;
}
.user-chip .avatar { width: 30px; height: 30px; font-size: 13px; }
.user-nick {
  font-size: 14px; font-weight: 700;
  max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.user-menu {
  position: absolute; top: calc(100% + 10px); right: 0;
  min-width: 150px;
  background: var(--card);
  border: var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hard-lg);
  opacity: 0; visibility: hidden;
  transform: translateY(-6px); transition: all .18s;
  z-index: 150; overflow: hidden;
}
.user-chip:hover .user-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.user-menu a, .user-menu button {
  display: block; width: 100%; text-align: left;
  padding: 11px 16px; font-size: 14px; color: var(--text-2);
  background: none; border: none; cursor: pointer;
  border-bottom: 1px dashed var(--ink-3);
}
.user-menu a:last-child, .user-menu button:last-child { border-bottom: none; }
.user-menu a:hover, .user-menu button:hover {
  background: var(--marker); color: var(--on-marker); font-weight: 700;
}

/* ---------- 评论增强 ---------- */
.c-quote {
  font-size: 13px; color: var(--text-2);
  background: #fff6c9;
  border-left: 4px solid var(--ink);
  padding: 6px 10px; margin-bottom: 6px;
  transform: rotate(-.3deg);
}
.c-ops { display: flex; gap: 16px; margin-top: 7px; }
.c-op { font-size: 13px; color: var(--ink-3); font-weight: 600; transition: color .15s; }
.c-op:hover { color: var(--primary); }
.c-op.liked { color: var(--pink); }
.c-replies { margin-left: 48px; border-left: 2px dashed var(--ink-3); padding-left: 12px; }
.c-item-sub { padding: 10px 0; border-bottom: none; }
.c-item-sub .avatar { width: 30px; height: 30px; font-size: 13px; }

.reply-bar {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(74, 144, 217, .12);
  border: var(--line); border-radius: var(--radius-sm);
  padding: 9px 14px; font-size: 13px; color: var(--text-2); margin-bottom: 10px;
}
.reply-bar b { color: var(--primary); }
.reply-bar button { color: var(--danger); font-size: 13px; font-weight: 700; }

/* ---------- 举报弹窗 ---------- */
.report-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.report-reason {
  padding: 11px 8px;
  border: var(--line); border-radius: var(--radius-sm);
  background: var(--card);
  font-size: 14px; font-weight: 600; color: var(--text-2);
  box-shadow: var(--shadow-hard-sm);
  transition: all .15s;
}
.report-reason:hover {
  border-color: var(--danger); color: var(--danger);
  background: rgba(214, 69, 69, .1);
  transform: translate(-1px, -1px);
}

/* ---------- 敏感词提示 ---------- */
.ban-tip {
  display: block; font-size: 13px; color: var(--danger);
  font-weight: 600; margin-top: 5px; min-height: 17px;
}

/* ---------- 个人中心 ---------- */
.profile-card {
  position: relative;
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  background: var(--card);
  border: var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  padding: 26px 30px; margin-bottom: 24px;
}
/* 头像卡左上角胶带 */
.profile-card::before {
  content: ""; position: absolute; top: -9px; left: 30px;
  width: 86px; height: 20px;
  background: rgba(74, 144, 217, .45);
  transform: rotate(-4deg);
}
.profile-info { flex: 1; min-width: 200px; }
.profile-nick {
  font-family: var(--font-hand);
  font-size: 27px; font-weight: 700; letter-spacing: .05em; margin-bottom: 5px;
}
.profile-meta { font-size: 13px; color: var(--ink-3); }
.profile-stats { display: flex; gap: 14px; flex-wrap: wrap; }
.profile-stats .stat {
  text-align: center;
  background: var(--paper-2);
  border: 1.5px dashed var(--ink);
  border-radius: var(--radius-sm);
  padding: 8px 18px;
  min-width: 76px;
}
.profile-stats .stat b { display: block; font-size: 23px; color: var(--primary); }
.profile-stats .stat span { font-size: 12px; color: var(--ink-3); }

.ptabs {
  display: flex; gap: 10px; margin-bottom: 24px;
  overflow-x: auto; scrollbar-width: none;
}
.ptabs::-webkit-scrollbar { display: none; }
.ptab {
  flex-shrink: 0; padding: 9px 22px;
  background: var(--card); color: var(--text-2);
  border: var(--line); border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 600;
  box-shadow: var(--shadow-hard-sm);
  cursor: pointer; transition: all .15s;
}
.ptab:hover { background: rgba(255, 228, 92, .55); color: var(--on-marker); }
.ptab.active { background: var(--primary); color: #fff; }

.profile-comments { display: flex; flex-direction: column; gap: 16px; margin-bottom: 40px; }
.pm-comment {
  background: var(--card);
  border: var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  padding: 18px 20px;
}
.pm-comment-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.pm-comment-title { font-weight: 700; font-size: 15px; font-family: var(--font-hand); letter-spacing: .03em; }
.pm-comment-title:hover {
  color: var(--text);
  text-decoration: underline; text-decoration-style: wavy;
  text-decoration-color: var(--secondary); text-underline-offset: 3px;
}
.pm-comment-time { font-size: 12px; color: var(--ink-3); }
.pm-comment-text { font-size: 14px; color: var(--text-2); line-height: 1.75; }
.pm-comment-ops { margin-top: 8px; font-size: 13px; font-weight: 700; }

/* ---------- 关于页 ---------- */
.about-hero {
  background-color: var(--primary);
  /* 平涂 + 斜纹肌理（非渐变） */
  background-image: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 255, .07) 0 12px,
    transparent 12px 24px
  );
  border-bottom: var(--line-2);
  padding: 54px 16px;
}
.about-logo {
  width: 74px; height: 74px; margin: 0 auto 16px;
  background: var(--pink); color: #fff;
  border: 3px solid #fff; border-radius: 6px;
  box-shadow: 5px 5px 0 rgba(33, 29, 23, .5);
  display: flex; align-items: center; justify-content: center;
  font-size: 38px; transform: rotate(-6deg);
}
.about-card {
  position: relative;
  background: var(--card);
  border: var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  padding: 30px 32px; margin: 26px 0;
}
.about-h {
  font-family: var(--font-hand);
  font-size: 23px; font-weight: 700; letter-spacing: .06em;
  margin-bottom: 16px; display: inline-block;
  padding: 0 6px;
  background: linear-gradient(transparent 58%, var(--marker) 58%);
}
.about-p { font-size: 15px; color: var(--text-2); line-height: 1.95; }

.about-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature {
  background: var(--paper-2);
  border: 1.5px dashed var(--ink);
  border-radius: var(--radius-sm);
  padding: 20px 18px; text-align: center;
}
.feature-ic { font-size: 32px; display: block; margin-bottom: 10px; }
.feature h4 { font-size: 16px; margin-bottom: 7px; }
.feature p { font-size: 13px; color: var(--ink-3); line-height: 1.7; }

.about-steps { counter-reset: step; padding-left: 6px; }
.about-steps li {
  counter-increment: step; position: relative;
  padding: 10px 0 10px 48px; font-size: 15px; color: var(--text-2);
  border-bottom: 1px dashed var(--ink-3);
}
.about-steps li:last-child { border-bottom: none; }
.about-steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 10px;
  width: 28px; height: 28px;
  background: var(--primary); color: #fff;
  border: var(--line); border-radius: 3px;
  box-shadow: var(--shadow-hard-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
  transform: rotate(-5deg);
}
.about-steps b { color: var(--text); }

.about-rules li { font-size: 15px; color: var(--text-2); padding: 8px 0; }

/* =========================================================
 * 深色模式（暖墨夜灯：纸变夜色，墨变米白）
 * ========================================================= */
body.dark {
  --paper: #16140f;
  --paper-2: #1e1b15;
  --card: #24211a;
  --ink: #eee6d4;
  --ink-2: #b6ae9a;
  --ink-3: #8a8371;
  --gridline: rgba(238, 230, 212, .05);
  --bg: #16140f;
  --text: #eee6d4;
  --text-2: #b6ae9a;
  --text-3: #8a8371;
}
body.dark a { color: #7db4f0; }
body.dark a:hover { color: #a5cbf5; }
/* 荧光黄底在夜间改用暗纸，避免刺眼 */
body.dark .notice { background: #3a3517; color: var(--ink); }
body.dark .notice li::before { color: var(--accent); }
body.dark .c-quote { background: #35301a; }
body.dark .reply-bar { background: rgba(125, 180, 240, .14); }
body.dark .results-info .kw { background: rgba(233, 30, 99, .3); color: var(--accent); }
body.dark .main-nav a.active,
body.dark .tab.active,
body.dark .ptab.active,
body.dark .type-opt input:checked + .type-card { color: #10131a; }
body.dark .m-nav-menu a.active { color: var(--on-marker); }
body.dark .site-footer { background: #0f0d09; color: #b9b1a0; }
body.dark .site-footer p { color: #7f7869; }
body.dark .f-links a { color: #ded6c2; }
body.dark .lb-box { border-color: #ded6c2; }
body.dark .lb-close { background: #ded6c2; color: #16140f; border-color: #16140f; }
body.dark .toast { background: #eee6d4; color: #6b4f00; box-shadow: 4px 4px 0 rgba(255, 228, 92, .5); }
body.dark .type-opt input:checked + .type-card::after { background: var(--card); }
body.dark .notice { transform: none; }

/* =========================================================
 * 响应式
 * ========================================================= */
@media (max-width: 1024px) {
  .waterfall { columns: 2; }
  .results-grid { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .main-nav, .header-search { display: none; }
  .hamburger { display: block; }
  .user-nick { display: none; }
  .user-chip { padding: 3px; }
  .slider { height: 230px; }
  .slide-title { font-size: 27px; }
  .slide-sub { font-size: 14px; }
  .slide::after { width: 84px; right: 24px; }
  .filter-bar { top: 64px; }
  .waterfall { columns: 1; }
  .results-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .type-grid { grid-template-columns: repeat(2, 1fr); }
  .previews { grid-template-columns: repeat(3, 1fr); }
  .form-card { padding: 24px 18px; margin-left: 4px; margin-right: 4px; }
  .detail-content, .detail-head, .detail-actions { padding-left: 18px; padding-right: 18px; }
  .detail-title { font-size: 24px; }
  .page-title { font-size: 27px; }
  .related-grid { grid-template-columns: 1fr; }
  .fab { right: 16px; bottom: 20px; padding: 12px 18px; }
  .btt { left: 16px; bottom: 20px; }
  .profile-card { padding: 22px 18px; gap: 16px; }
  .profile-stats { gap: 10px; width: 100%; justify-content: flex-start; }
  .profile-stats .stat { min-width: 64px; padding: 6px 12px; }
  .profile-stats .stat b { font-size: 20px; }
  .about-card { padding: 24px 18px; }
  .about-features { grid-template-columns: repeat(2, 1fr); }
  .c-replies { margin-left: 20px; }
}

@media (max-width: 480px) {
  .brand-sub { display: none; }
  .slide-title { font-size: 22px; }
  .card-images .ph { font-size: 26px; }
  .results-info { font-size: 13px; gap: 8px; }
  .about-features { grid-template-columns: 1fr; }
  .report-list { grid-template-columns: 1fr; }
  .qq-fetch { gap: 10px; }
  .tabs { padding: 12px; }
}

/* ====== EMLOG 对接补充样式（PHP 渲染的新结构） ====== */

/* 详情正文（富文本/Markdown 输出） */
#articleContent { font-size: 15.5px; line-height: 1.9; color: var(--text-2); word-wrap: break-word; }
#articleContent p { margin: 0 0 14px; }
#articleContent a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
#articleContent img {
  max-width: 100%; height: auto; display: block; margin: 14px auto;
  border: var(--line); box-shadow: var(--shadow-hard); border-radius: var(--radius); cursor: zoom-in;
}
#articleContent h1, #articleContent h2, #articleContent h3, #articleContent h4 {
  color: var(--ink); font-family: var(--font-hand); margin: 20px 0 10px; line-height: 1.4;
}
#articleContent ul, #articleContent ol { padding-left: 22px; margin: 0 0 14px; }
#articleContent li { margin-bottom: 6px; }
#articleContent blockquote {
  margin: 14px 0; padding: 10px 14px;
  background: var(--marker); color: var(--on-marker);
  border: var(--line); box-shadow: var(--shadow-hard); border-radius: var(--radius);
  font-family: var(--font-hand);
}
#articleContent pre {
  margin: 14px 0; padding: 14px; overflow-x: auto;
  background: var(--ink); color: #f5f5f5;
  border: var(--line); border-radius: var(--radius); box-shadow: var(--shadow-hard);
  font-size: 13px; line-height: 1.7;
}
#articleContent code { font-family: Consolas, Monaco, monospace; font-size: 13px; }
#articleContent :not(pre) > code {
  background: #f0ead6; color: var(--ink); padding: 1px 6px;
  border: 1px solid var(--ink-3); border-radius: 3px;
}
#articleContent hr { border: none; border-top: 1.5px dashed var(--ink-3); margin: 20px 0; }
#articleContent table { border-collapse: collapse; margin: 14px 0; width: 100%; }
#articleContent th, #articleContent td { border: var(--line); padding: 7px 10px; font-size: 14px; }
#articleContent th { background: var(--marker); color: var(--on-marker); }
body.dark #articleContent { color: #c9d4e3; }
body.dark #articleContent h1, body.dark #articleContent h2,
body.dark #articleContent h3, body.dark #articleContent h4 { color: var(--ink); }
body.dark #articleContent blockquote { background: var(--ink); color: var(--marker); }
body.dark #articleContent :not(pre) > code { background: #2a2f36; color: var(--marker); border-color: var(--ink-3); }

/* 详情封面 */
.log-cover { margin-bottom: 16px; }
.log-cover img {
  width: 100%; max-height: 420px; object-fit: cover; display: block;
  border: var(--line); box-shadow: var(--shadow-hard); border-radius: var(--radius); cursor: zoom-in;
}

/* 置顶 / 编辑角标 */
.log-topflg {
  display: inline-block; vertical-align: middle;
  background: var(--secondary); color: #fff;
  border: var(--line); box-shadow: 2px 2px 0 var(--ink);
  font-size: 11px; font-weight: 800; padding: 1px 7px;
  border-radius: 3px; transform: rotate(-3deg); margin: 0 6px;
}
.detail-edit { margin-left: auto; }
.detail-edit a { color: var(--primary); font-size: 13px; font-weight: 700; }
.detail-edit a:hover { text-decoration: underline; }

/* 热榜空态 / 统计条公告 */
.rk-empty { color: var(--ink-3); font-size: 13px; padding: 6px 2px; }
.stats-notice {
  font-family: var(--font-hand); color: var(--ink);
  max-width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
body.dark .stats-notice { color: var(--text); }

/* 评论区补充 */
.c-empty { color: var(--ink-3); font-size: 14px; padding: 22px 0; text-align: center; }
.c-login-tip {
  font-size: 14px; color: var(--text-2); padding: 12px 14px;
  background: var(--marker); color: var(--on-marker);
  border: var(--line); box-shadow: var(--shadow-hard); border-radius: var(--radius);
  font-family: var(--font-hand);
}
.c-login-tip a { color: inherit; font-weight: 800; text-decoration: underline; }
.comment-children { padding-left: 46px; }
.comment-children > .c-item { border-bottom: none; padding-bottom: 4px; }
.comment-children .c-body { border-left: 2px dashed var(--ink-3); padding-left: 12px; }
.comment-item { scroll-margin-top: 90px; }

/* 评论审核提示（静态策略 + 提交后动态回执，data-dynamic 由 JS 维护） */
.cf-note {
  font-size: 13px; color: var(--text-2); line-height: 1.7;
  border: 2px dashed var(--ink-3); border-radius: var(--radius);
  padding: 10px 12px; margin-top: 10px;
}

/* 登录 Hub 合作账号（关于我 #loginNudge / 评论登录提示；JS 填充前保持隐藏） */
.oauth-slot[hidden] { display: none; }
.oauth-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 4px; }
.oauth-btn.lg { width: auto; min-width: 156px; height: 44px; padding: 0 20px; border-radius: 999px; gap: 8px; font-size: 15px; }
.oauth-btn.lg span { font-weight: 800; }
.oauth-or { display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 13px; color: var(--ink-3); margin: 12px 0; }
.oauth-or::before, .oauth-or::after { content: ''; width: 72px; border-top: 2px dashed var(--ink-3); }
#loginNudge { scroll-margin-top: 90px; }
.captcha-container { display: flex; align-items: center; gap: 8px; }
.comment-name { flex: 1; min-width: 120px; }
.c-op:disabled, .c-op[disabled] { opacity: .5; cursor: default; }
body.dark .c-item { border-bottom-color: var(--ink-3); }

/* 分页（EMLOG pagination 输出 a / span / em） */
.pagination { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; margin: 26px 0 6px; }
.pagination a, .pagination span {
  display: inline-block; min-width: 34px; text-align: center;
  padding: 6px 11px; font-size: 14px; font-weight: 700;
  background: var(--card); color: var(--ink);
  border: var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-hard-sm); text-decoration: none;
  transition: transform .12s, box-shadow .12s;
}
.pagination a:hover { transform: translateY(-2px); box-shadow: 3px 3px 0 var(--ink); }
.pagination span { background: var(--marker); color: var(--on-marker); cursor: default; }
.pagination em { color: var(--ink-3); font-style: normal; font-size: 13px; }
body.dark .pagination a { background: #2a2f36; color: var(--text); }
body.dark .pagination span { background: var(--marker); color: var(--on-marker); }

/* 分类标签（blog_tag 输出 a.tags） */
a.tags {
  display: inline-block; font-size: 12px; font-weight: 700;
  color: var(--ink); background: var(--bg-2, #f4f7fb);
  border: var(--line); border-radius: 999px; padding: 2px 10px;
  text-decoration: none; margin-right: 6px; transition: transform .12s;
}
a.tags:hover { transform: translateY(-2px); background: var(--marker); color: var(--on-marker); }
body.dark a.tags { background: #2a2f36; color: var(--text); }
body.dark a.tags:hover { background: var(--marker); color: var(--on-marker); }

/* 详情锚点滚动留白 */
#comments, #relatedTitle { scroll-margin-top: 90px; }

/* ---- AI 树洞挂件（cc_connect 插件启用时显示） ---- */
.ai-dock { background: var(--card); border: var(--line); border-radius: var(--radius); box-shadow: var(--shadow-hard); padding: 16px 18px; margin: 0 0 18px; }
.ai-dock-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.ai-dock-ic { font-size: 20px; }
.ai-dock-head b { font-size: 15px; }
.ai-dock-sub { font-size: 12px; color: var(--ink-3); margin-left: auto; }
.ai-log { max-height: 240px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.ai-msg { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.ai-msg.me { flex-direction: row-reverse; }
.ai-who { flex: 0 0 auto; font-size: 12px; color: var(--ink-3); padding-top: 3px; }
.ai-bubble { background: var(--bg-2, #f4f7fb); border: var(--line); border-radius: 10px; padding: 6px 11px; line-height: 1.6; max-width: 78%; word-break: break-word; white-space: pre-wrap; }
.ai-msg.me .ai-bubble { background: var(--marker); color: var(--on-marker); }
.ai-msg.pending .ai-bubble { color: var(--ink-3); font-style: italic; }
.ai-msg.err .ai-bubble { background: #ffe3e3; }
.ai-input-row { display: flex; gap: 8px; }
.ai-input { flex: 1; min-width: 0; padding: 9px 14px; border: var(--line); border-radius: 999px; font-family: inherit; font-size: 14px; background: var(--card); color: var(--ink); }
.ai-input:focus { outline: none; box-shadow: 3px 3px 0 var(--marker); }
.ai-polish { margin-top: 8px; }
body.dark .ai-bubble { background: #2a2f36; }
body.dark .ai-input { background: #1a1d22; }
