/* ============================================================
   畅意人生 · 样式
   明快浅色主题：薄荷白底 + 清新玉绿主色 + 暖金点缀 + 粒子背景
   ============================================================ */

:root {
  --bg: #f3f7f4;
  --bg-soft: #e9f0eb;
  --surface: #ffffff;
  --surface-2: #eef4f0;
  --ink: #20302a;            /* 主文字（深） */
  --ink-soft: #56675d;
  --ink-faint: #8a978f;
  --green: #2f9e6e;          /* 清新玉绿主色 */
  --green-deep: #1d7a53;     /* 深玉绿 */
  --green-soft: rgba(47, 158, 110, 0.13);
  --green-softer: rgba(47, 158, 110, 0.07);
  --line: rgba(31, 48, 42, 0.10);
  --line-soft: rgba(31, 48, 42, 0.06);
  --gold: #b07d28;
  --gold-soft: rgba(176, 125, 40, 0.14);
  --danger: #c5523f;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(31, 48, 42, 0.06), 0 12px 30px rgba(31, 48, 42, 0.09);
  --shadow-hover: 0 2px 10px rgba(31, 48, 42, 0.10), 0 18px 42px rgba(31, 48, 42, 0.13);
  --glow: 0 8px 28px rgba(47, 158, 110, 0.22);
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "SF Mono", "JetBrains Mono", Consolas, "Courier New", monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  line-height: 1.75;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1100px 560px at 50% -8%, #e3f2e9 0%, rgba(227, 242, 233, 0) 60%),
    radial-gradient(900px 500px at 100% 0%, #e8f1f6 0%, rgba(232, 241, 246, 0) 55%),
    var(--bg);
  background-attachment: fixed;
}

/* 粒子背景画布：固定全屏、置于内容之下、不拦截事件 */
#bgParticles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

a { color: var(--green-deep); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--green); }

img { max-width: 100%; height: auto; }

/* ---------- 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 251, 249, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); flex-shrink: 0; }
.brand:hover { color: var(--ink); }
.brand-mark { font-size: 26px; line-height: 1; filter: drop-shadow(0 2px 6px rgba(79, 169, 126, 0.4)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-family: var(--serif); font-size: 19px; letter-spacing: 0.5px; }
.brand-text small { font-size: 11px; color: var(--ink-faint); letter-spacing: 1px; }

.site-nav { display: flex; gap: 4px; margin-left: auto; }
.site-nav a {
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 15px;
  transition: all 0.2s;
}
.site-nav a:hover { color: var(--green-deep); background: var(--green-softer); }
.site-nav a.active { color: var(--green-deep); background: var(--green-soft); font-weight: 600; }

.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 14px;
  font-family: var(--sans);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn:hover { border-color: var(--green); color: var(--green-deep); transform: translateY(-1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--green) 0%, #3f8e68 100%);
  border-color: transparent;
  color: #08120c;
  font-weight: 600;
  box-shadow: var(--glow);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--green-deep) 0%, var(--green) 100%); color: #08120c; }

.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--green-softer); border-color: transparent; }

.btn-danger { color: var(--danger); border-color: rgba(224, 122, 110, 0.4); }
.btn-danger:hover { background: rgba(224, 122, 110, 0.12); border-color: var(--danger); color: var(--danger); }

.btn-sm { padding: 4px 12px; font-size: 13px; }
.btn-lg { padding: 12px 28px; font-size: 16px; }

/* ---------- 主区域 ---------- */
.site-main { flex: 1; width: 100%; }

.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 36px 24px 64px;
  animation: pageIn 0.4s ease;
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-narrow { max-width: 760px; }
.page-admin { max-width: 1280px; }

/* ---------- 首页布局：侧栏 + 文章流 ---------- */
.home-layout {
  max-width: 1200px;
  display: grid;
  grid-template-columns: 300px 1fr;
  grid-template-areas: "side feed";
  gap: 32px;
  align-items: start;
}

.home-hero {
  grid-area: feed;
  text-align: center;
  padding: 18px 24px 26px;
  margin-bottom: 4px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--green-softer), var(--gold-soft));
  border: 1px solid var(--line-soft);
  animation: fadeUp 0.5s ease both;
}
.home-hero-title {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 3px;
  background: linear-gradient(90deg, var(--green-deep), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.home-hero-sub { color: var(--ink-soft); font-size: 14px; letter-spacing: 1px; margin-top: 4px; }
.home-hero-meta { margin-top: 10px; font-size: 12.5px; color: var(--ink-faint); }

.feed-col { grid-area: feed; min-width: 0; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 文章卡片列表 ---------- */
.post-list { display: flex; flex-direction: column; gap: 22px; }

.post-card {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  color: var(--ink);
  cursor: pointer;
  animation: fadeUp 0.5s ease both;
}
.post-card:nth-child(2) { animation-delay: 0.05s; }
.post-card:nth-child(3) { animation-delay: 0.1s; }
.post-card:nth-child(4) { animation-delay: 0.15s; }
.post-card:nth-child(5) { animation-delay: 0.2s; }
.post-card:nth-child(6) { animation-delay: 0.25s; }
.post-card:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(79, 169, 126, 0.4);
  color: var(--ink);
}
.post-card.is-private {
  border-left: 3px solid var(--gold);
  background: linear-gradient(90deg, var(--gold-soft), var(--surface) 36%);
}

.post-card-cover {
  width: 240px;
  flex-shrink: 0;
  background: var(--green-softer) center/cover no-repeat;
  position: relative;
  min-height: 190px;
}
.post-card-cover .cover-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  background: linear-gradient(135deg, rgba(47, 158, 110, 0.12), rgba(238, 244, 240, 0.6));
}

.post-card-body { padding: 22px 26px; display: flex; flex-direction: column; gap: 10px; min-width: 0; flex: 1; }

.post-card-title {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--ink);
}
.post-card:hover .post-card-title { color: var(--green-deep); }

.post-card-summary {
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 13px;
  color: var(--ink-faint);
}
.post-card-meta .meta-item { display: inline-flex; align-items: center; gap: 5px; }

.card-flags { display: flex; gap: 8px; }
.private-flag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold);
  border: 1px solid rgba(201, 168, 106, 0.35);
}

.tag-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-pill {
  display: inline-block;
  padding: 2px 10px;
  background: var(--green-softer);
  color: var(--green-deep);
  border-radius: 999px;
  font-size: 12.5px;
  transition: all 0.2s;
}
a.tag-pill:hover { background: var(--green-soft); color: var(--green-deep); }
/* 分类 pill（暖金系，与绿色标签区分） */
.tag-pill.cat-pill { background: var(--gold-soft); color: var(--gold); }
a.tag-pill.cat-pill:hover { background: rgba(201, 168, 106, 0.24); color: var(--gold); }
.filter-bar .tag-pill.cat-pill.on,
.tag-cloud .tag-pill.cat-pill.on { background: var(--gold); color: #1a1408; }
.tag-cloud .tag-pill.cat-pill.on .n { color: rgba(26, 20, 8, 0.7); }
.article-cats-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: -6px 0 14px;
}
.article-cats-row .label { font-size: 13.5px; color: var(--ink-faint); }

/* ---------- 侧栏 ---------- */
.side-col { grid-area: side; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 84px; }
.side-col, .feed-col { animation: fadeUp 0.5s ease both; }

.side-card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.side-title {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.side-title::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }

/* 用户卡 */
.side-user-card { text-align: center; }
.su-avatar {
  width: 60px; height: 60px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-softer), var(--green-soft));
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-family: var(--serif); color: var(--green-deep);
  box-shadow: var(--glow);
}
.su-name { font-weight: 600; font-size: 16px; }
.su-role { font-size: 12.5px; color: var(--ink-faint); margin: 4px 0 14px; }
.su-actions { display: flex; flex-direction: column; gap: 8px; }

/* 日历 */
.calendar-card { padding-bottom: 14px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-title { font-size: 13.5px; color: var(--ink-soft); font-weight: 600; }
.cal-nav {
  width: 28px; height: 28px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 8px;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  transition: all 0.2s;
}
.cal-nav:hover { border-color: var(--green); color: var(--green-deep); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-week span { text-align: center; font-size: 11px; color: var(--ink-faint); padding: 2px 0; }
.cal-cell {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  color: var(--ink-soft);
  border-radius: 7px;
  cursor: default;
  transition: all 0.15s;
}
.cal-cell.empty { visibility: hidden; }
.cal-cell.has { cursor: pointer; color: var(--ink); background: var(--green-soft); font-weight: 600; }
.cal-cell.has:hover { background: var(--green); color: #08120c; }
.cal-cell.today { box-shadow: inset 0 0 0 1px var(--gold); }
.cal-cell .dot { display: none; }
.cal-clear {
  margin-top: 10px;
  width: 100%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-faint);
  border-radius: 8px;
  padding: 6px;
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.2s;
}
.cal-clear:hover { color: var(--green-deep); border-color: var(--green); }

/* 分类 / 标签 */
.side-cats { display: flex; flex-direction: column; gap: 4px; }
.side-cat {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px;
  border-radius: 9px;
  color: var(--ink-soft);
  font-size: 14px;
  transition: all 0.2s;
}
.side-cat:hover { background: var(--green-softer); color: var(--green-deep); }
.side-cat.on { background: var(--gold-soft); color: var(--gold); }
.side-cat .n { font-size: 12px; color: var(--ink-faint); }
.side-cat.on .n { color: var(--gold); }

.side-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.side-tag {
  padding: 3px 11px;
  background: var(--green-softer);
  color: var(--green-deep);
  border-radius: 999px;
  font-size: 12.5px;
  transition: all 0.2s;
}
.side-tag:hover { background: var(--green-soft); }
.side-tag.on { background: var(--gold); color: #1a1408; }
.side-empty { font-size: 13px; color: var(--ink-faint); padding: 4px 2px; }

/* 当前筛选提示 */
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 20px; }
.af-label { font-size: 13px; color: var(--ink-faint); }
.filter-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px;
  border: 1px solid var(--green);
  background: var(--green-soft);
  color: var(--green-deep);
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.filter-chip:hover { background: var(--green); color: #08120c; }
.filter-chip .x { font-size: 11px; opacity: 0.7; }

/* ---------- 分页 ---------- */
.pager { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 40px; flex-wrap: wrap; }
.pager-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.pager-btn:hover:not(:disabled) { border-color: var(--green); color: var(--green-deep); }
.pager-btn.current { background: var(--green); border-color: var(--green); color: #08120c; font-weight: 600; }
.pager-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------- 筛选栏 ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 26px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}
.filter-bar .filter-label { font-size: 13.5px; color: var(--ink-faint); margin-right: 2px; }
.filter-bar .tag-pill { cursor: pointer; border: none; font-family: var(--sans); }
.filter-bar .tag-pill.on { background: var(--green); color: #08120c; }

/* ---------- 文章详情 ---------- */
.article { max-width: 780px; margin: 0 auto; }

.article-header { text-align: center; margin-bottom: 36px; }
.article-title {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 16px;
}
.article-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 14px;
  color: var(--ink-faint);
}

.article-cover {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 36px;
  border: 1px solid var(--line-soft);
  background: var(--green-softer);
}
.article-cover img { display: block; width: 100%; }

.article-body {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 40px 44px;
  box-shadow: var(--shadow);
  font-size: 16.5px;
}

.article-footer { margin-top: 32px; }

.article-tags-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  margin-bottom: 24px;
}
.article-tags-row .label { font-size: 13.5px; color: var(--ink-faint); }

/* 上一篇 / 下一篇 */
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.post-nav-card {
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  color: var(--ink);
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.post-nav-card:hover { border-color: var(--green); color: var(--green-deep); transform: translateY(-2px); }
.post-nav-card .dir { font-size: 12.5px; color: var(--ink-faint); }
.post-nav-card .t {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 15.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.post-nav-card.next { text-align: right; }
.post-nav-card.placeholder { opacity: 0.45; pointer-events: none; }

/* ---------- 附件 ---------- */
.attachment-box {
  margin-top: 24px;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}
.attachment-box h4 { font-family: var(--serif); font-size: 15.5px; margin-bottom: 12px; color: var(--ink); }
.attachment-list { display: flex; flex-direction: column; gap: 8px; }
.attachment-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  font-size: 14px;
}
.attachment-item .file-icon { font-size: 18px; }
.attachment-item .file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-item .file-size { color: var(--ink-faint); font-size: 12.5px; }

/* ---------- 评论区 ---------- */
.comments { margin-top: 40px; }
.comments h3 {
  font-family: var(--serif);
  font-size: 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.comments h3 .count { font-size: 14px; color: var(--ink-faint); font-family: var(--sans); }

.comment-form {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 22px;
}
.comment-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.7;
  resize: vertical;
  min-height: 88px;
  background: var(--bg);
  color: var(--ink);
  transition: border-color 0.2s;
}
.comment-form textarea:focus { outline: none; border-color: var(--green); background: var(--surface); }
.comment-form .form-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.comment-form .hint { font-size: 13px; color: var(--ink-faint); }

.comment-item {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
}
.comment-item:last-child { border-bottom: none; }
.comment-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 15px;
  flex-shrink: 0;
}
.comment-main { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.comment-author { font-weight: 600; font-size: 14.5px; }
.comment-author .author-badge {
  font-size: 11px;
  background: var(--green-soft);
  color: var(--green-deep);
  border-radius: 4px;
  padding: 1px 6px;
  margin-left: 6px;
  font-weight: 500;
}
.comment-time { font-size: 12.5px; color: var(--ink-faint); }
.comment-text { font-size: 14.5px; color: var(--ink-soft); line-height: 1.7; word-break: break-word; }
.comment-del { border: none; background: none; color: var(--ink-faint); cursor: pointer; font-size: 12px; padding: 2px 4px; }
.comment-del:hover { color: var(--danger); }

/* ---------- 标签页 ---------- */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 34px;
}
.tag-cloud .tag-pill {
  font-size: 14px;
  padding: 7px 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--sans);
  transition: all 0.2s;
  box-shadow: var(--shadow);
}
.tag-cloud .tag-pill:hover { border-color: var(--green); color: var(--green-deep); transform: translateY(-1px); }
.tag-cloud .tag-pill .n { color: var(--ink-faint); font-size: 12px; margin-left: 6px; }
.tag-cloud .tag-pill.on { background: var(--green); color: #fff; border-color: var(--green); }
.tag-cloud .tag-pill.on .n { color: rgba(255, 255, 255, 0.85); }
/* 分类 pill（暖金系，与绿色标签区分） */
.tag-cloud .tag-pill.cat-pill.on { background: var(--gold); border-color: var(--gold); color: #fff; }
.tag-cloud .tag-pill.cat-pill.on .n { color: rgba(255, 255, 255, 0.85); }

.section-title {
  font-family: var(--serif);
  font-size: 24px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- 关于页 ---------- */
.about-card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 44px 48px;
  box-shadow: var(--shadow);
}
.about-hero { text-align: center; margin-bottom: 30px; }
.about-hero .avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-softer), var(--green-soft));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  margin-bottom: 14px;
  box-shadow: var(--glow);
}
.about-hero h2 { font-family: var(--serif); font-size: 26px; }
.about-hero p { color: var(--ink-faint); font-size: 14px; margin-top: 4px; }

/* ---------- 登录弹窗 ---------- */
.login-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(40, 55, 48, 0.40);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.25s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.login-modal-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 92vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 38px;
  box-shadow: 0 30px 80px rgba(31, 48, 42, 0.22);
  animation: modalIn 0.3s cubic-bezier(0.2, 0.8, 0.3, 1.1);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--surface-2);
  border-radius: 50%;
  color: var(--ink-faint);
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
}
.modal-close:hover { background: rgba(224, 122, 110, 0.18); color: var(--danger); }

/* ---------- 登录页 ---------- */
.auth-card {
  max-width: 420px;
  margin: 48px auto;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 36px 38px;
  box-shadow: var(--shadow);
}
.auth-card h2 {
  font-family: var(--serif);
  font-size: 24px;
  text-align: center;
  margin-bottom: 6px;
}
.auth-card .auth-sub { text-align: center; color: var(--ink-faint); font-size: 13.5px; margin-bottom: 26px; }

.auth-tabs { display: flex; background: var(--bg); border-radius: 999px; padding: 4px; margin-bottom: 22px; }
.auth-tabs button {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 4px;
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--sans);
}
.auth-tabs button.on { background: var(--surface); color: var(--green-deep); font-weight: 600; box-shadow: 0 1px 4px rgba(31, 48, 42, 0.12); }

.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-size: 13.5px; color: var(--ink-soft); margin-bottom: 6px; }
.form-field input, .form-field textarea, .form-field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 15px;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  transition: border-color 0.2s, background 0.2s;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus { outline: none; border-color: var(--green); background: var(--surface); }

.otp-row { display: flex; gap: 10px; }
.otp-row input { flex: 1; }
.otp-row .btn { flex-shrink: 0; }

.form-error { color: var(--danger); font-size: 13px; margin: 4px 0 10px; min-height: 18px; }
.form-ok { color: var(--green-deep); font-size: 13px; margin: 4px 0 10px; min-height: 18px; }

.auth-alt { text-align: center; margin-top: 18px; font-size: 13px; color: var(--ink-faint); }
.auth-alt button { border: none; background: none; color: var(--green-deep); cursor: pointer; font-size: 13px; padding: 0; }
.auth-alt button:hover { text-decoration: underline; }

.auth-wechat { text-align: center; padding: 8px 0 2px; }
.auth-wechat .btn { width: 100%; }
.auth-wechat .wx-tip { font-size: 12.5px; color: var(--ink-faint); margin-top: 10px; line-height: 1.6; }

/* ---------- 管理后台 ---------- */
.admin-layout { display: grid; grid-template-columns: 220px 1fr; gap: 26px; align-items: start; }

.admin-side {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 14px;
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.admin-side .side-user {
  padding: 10px 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 8px;
}
.admin-side .side-user .u-name { font-weight: 600; font-size: 15px; word-break: break-all; }
.admin-side .side-user .u-role { font-size: 12px; color: var(--ink-faint); margin-top: 2px; }
.admin-side button, .admin-side a {
  display: flex;
  align-items: center;
  gap: 9px;
  border: none;
  background: none;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  color: var(--ink-soft);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
  font-family: var(--sans);
  width: 100%;
}
.admin-side button:hover, .admin-side a:hover { background: var(--green-softer); color: var(--green-deep); }
.admin-side .on { background: var(--green-soft); color: var(--green-deep); font-weight: 600; }
.admin-side .signout { color: var(--danger); margin-top: 6px; }
.admin-side .signout:hover { background: rgba(224, 122, 110, 0.12); color: var(--danger); }

.admin-panel {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 26px 28px;
  min-height: 480px;
}

.admin-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.admin-panel-head h3 { font-family: var(--serif); font-size: 20px; }

/* 后台筛选栏 */
.admin-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 14px 16px;
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}
.af-input {
  flex: 1;
  min-width: 180px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 14px;
  background: var(--bg);
  color: var(--ink);
}
.af-input:focus { outline: none; border-color: var(--green); background: var(--surface); }
.af-select {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 13.5px;
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
}
.af-select:focus { outline: none; border-color: var(--green); }

.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 720px; }
.admin-table th {
  text-align: left;
  padding: 10px 12px;
  color: var(--ink-faint);
  font-weight: 500;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.admin-table td { padding: 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table .cell-title { font-weight: 600; color: var(--ink); max-width: 320px; }
.admin-table .cell-title .sub { display: block; font-weight: 400; font-size: 12.5px; color: var(--ink-faint); margin-top: 2px; }
.admin-table .row-actions { display: flex; gap: 6px; white-space: nowrap; }
.admin-count { margin-top: 16px; font-size: 13px; color: var(--ink-faint); text-align: center; }

.status-select {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12.5px;
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
}
.status-select.status-published { background: var(--green-soft); color: var(--green-deep); border-color: transparent; }
.status-select.status-private { background: var(--gold-soft); color: var(--gold); border-color: transparent; }
.status-select.status-draft { background: rgba(31, 48, 42, 0.05); color: var(--ink-soft); border-color: transparent; }

.status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
}
.status-badge.published { background: var(--green-soft); color: var(--green-deep); }
.status-badge.private { background: var(--gold-soft); color: var(--gold); }
.status-badge.draft { background: rgba(31, 48, 42, 0.05); color: var(--ink-soft); }

/* ---------- 编辑器 ---------- */
.editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.editor-pane { display: flex; flex-direction: column; gap: 14px; }
.editor-pane .pane-label { font-size: 13px; color: var(--ink-faint); }

.editor-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.editor-toolbar .spacer { flex: 1; }

#mdEditor {
  width: 100%;
  min-height: 460px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.8;
  resize: vertical;
  background: var(--bg);
  color: var(--ink);
}
#mdEditor:focus { outline: none; border-color: var(--green); background: var(--surface); }

.md-preview {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  min-height: 460px;
  max-height: 640px;
  overflow: auto;
  background: var(--bg);
  font-size: 15px;
}

.editor-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.editor-actions .spacer { flex: 1; }

/* ---------- Markdown 渲染内容 ---------- */
.md-content { line-height: 1.9; word-break: break-word; }
.md-content h1, .md-content h2, .md-content h3, .md-content h4 {
  font-family: var(--serif);
  line-height: 1.5;
  margin: 1.4em 0 0.7em;
  color: var(--ink);
}
.md-content h1 { font-size: 1.55em; padding-bottom: 0.35em; border-bottom: 1px solid var(--line); }
.md-content h2 { font-size: 1.35em; padding-bottom: 0.3em; border-bottom: 1px solid var(--line-soft); }
.md-content h3 { font-size: 1.18em; }
.md-content h4 { font-size: 1.05em; }
.md-content h1:first-child, .md-content h2:first-child, .md-content h3:first-child { margin-top: 0; }
.md-content p { margin: 0.9em 0; }
.md-content strong { color: var(--ink); font-weight: 700; }
.md-content a { border-bottom: 1px solid var(--green-soft); }
.md-content a:hover { border-bottom-color: var(--green); }
.md-content ul, .md-content ol { margin: 0.8em 0; padding-left: 1.6em; }
.md-content li { margin: 0.35em 0; }
.md-content li > ul, .md-content li > ol { margin: 0.3em 0; }
.md-content blockquote {
  margin: 1.1em 0;
  padding: 10px 18px;
  border-left: 3px solid var(--green);
  background: var(--green-softer);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink-soft);
}
.md-content blockquote p { margin: 0.4em 0; }
.md-content code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: rgba(31, 48, 42, 0.05);
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  padding: 1px 6px;
  color: #b07d28;
}
.md-content pre {
  background: #eef3f0;
  color: #20302a;
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  overflow-x: auto;
  margin: 1.1em 0;
  line-height: 1.65;
  border: 1px solid var(--line-soft);
}
.md-content pre code { background: none; border: none; padding: 0; color: inherit; font-size: 13.5px; }
.md-content img {
  display: block;
  max-width: 100%;
  border-radius: var(--radius-sm);
  margin: 1.1em auto;
  border: 1px solid var(--line-soft);
}
.md-content hr { border: none; height: 1px; background: var(--line); margin: 2em 0; }
.md-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.1em 0;
  font-size: 0.94em;
  display: block;
  overflow-x: auto;
}
.md-content th, .md-content td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.md-content th { background: var(--bg-soft); font-weight: 600; }
.md-content tr:nth-child(even) td { background: rgba(31, 48, 42, 0.03); }
.md-content .img-locked {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 34px 20px;
  background: var(--bg-soft);
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink-faint);
  font-size: 13.5px;
  margin: 1.1em 0;
}
.md-content .img-locked .icon { font-size: 26px; }
.md-content .img-failed {
  padding: 20px;
  background: rgba(224, 122, 110, 0.1);
  border: 1px dashed rgba(224, 122, 110, 0.45);
  border-radius: var(--radius-sm);
  color: var(--danger);
  font-size: 13.5px;
  text-align: center;
  margin: 1.1em 0;
}

/* ---------- 空状态 ---------- */
.empty-state {
  text-align: center;
  padding: 70px 20px;
  color: var(--ink-faint);
}
.empty-state .icon { font-size: 46px; margin-bottom: 14px; }
.empty-state p { font-size: 15px; margin-bottom: 18px; }

/* ---------- Toast ---------- */
.toast-wrap {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  background: #ffffff;
  color: var(--ink);
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 14px;
  border: 1px solid var(--line);
  box-shadow: 0 8px 28px rgba(31, 48, 42, 0.16);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  max-width: 82vw;
}
.toast.ok { background: var(--green); color: #fff; border-color: transparent; }
.toast.err { background: var(--danger); color: #fff; border-color: transparent; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px); } }

/* ---------- 加载 ---------- */
.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 110px 20px;
  color: var(--ink-faint);
}
.loading-leaf { font-size: 42px; animation: leafSway 1.6s ease-in-out infinite; filter: drop-shadow(0 4px 10px rgba(79, 169, 126, 0.4)); }
@keyframes leafSway {
  0%, 100% { transform: rotate(-8deg); }
  50% { transform: rotate(10deg); }
}

.inline-loading { text-align: center; color: var(--ink-faint); padding: 40px 0; font-size: 14px; }

/* ---------- 页脚 ---------- */
.site-footer { border-top: 1px solid var(--line-soft); background: rgba(246, 250, 248, 0.7); }
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px;
  text-align: center;
}
.footer-slogan { font-family: var(--serif); color: var(--ink-soft); font-size: 15px; letter-spacing: 1px; }
.footer-meta { color: var(--ink-faint); font-size: 12.5px; margin-top: 6px; }

/* ---------- 用户资料 / 弹窗 ---------- */
.dlg-title { font-family: var(--serif); font-size: 19px; margin-bottom: 16px; color: var(--ink); }
.dlg-body { max-height: 66vh; overflow: auto; }
.dlg-tip { font-size: 14px; color: var(--ink-soft); line-height: 1.7; margin-bottom: 16px; }
.dlg-tip strong { color: var(--green-deep); }
.auth-forgot { text-align: right; margin-top: 10px; }
.auth-forgot a { font-size: 13.5px; color: var(--green-deep); text-decoration: none; }
.auth-forgot a:hover { text-decoration: underline; }

.profile-card { max-width: 560px; }
.pf-no { font-size: 15px; color: var(--ink-soft); margin-bottom: 8px; }
.pf-no strong { color: var(--green-deep); font-size: 22px; }
.pf-line { font-size: 14px; color: var(--ink-soft); margin-bottom: 4px; }
.pf-tip { font-size: 13px; color: var(--ink-faint); margin-top: 14px; line-height: 1.7; }
.pf-check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-soft); margin: 12px 0; cursor: pointer; }
.pf-check input { width: 16px; height: 16px; accent-color: var(--green); }

/* 手机/邮箱所有权验证 */
.pf-verify { background: var(--paper, #f6f5f0); border: 1px solid var(--line, #e5e2d8); border-radius: 10px; padding: 12px 14px; margin: 16px 0; }
.pf-verify-line { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 14px; flex-wrap: wrap; }
.pf-v-label { min-width: 48px; color: var(--ink-soft); }
.pf-v-status { flex: 1; min-width: 140px; color: var(--ink-faint); }
.pf-v-status.ok, .pf-v-status::before { }
.btn.btn-mini { padding: 5px 12px; font-size: 13px; border-radius: 8px; min-height: 32px; white-space: nowrap; }
@media (max-width: 860px) {
  .pf-verify-line { gap: 6px; }
  .btn.btn-mini { flex: 1; }
}
/* 用户管理表格列较多：加宽并禁止短列折行，超出横向滚动 */
.admin-table.users-table { min-width: 1060px; }
.admin-table.users-table th, .admin-table.users-table td { white-space: nowrap; }

.admin-side .u-no { font-size: 12px; color: var(--ink-faint); font-weight: 400; }
.me-tag {
  display: inline-block; margin-left: 6px; padding: 1px 7px;
  border-radius: 999px; background: var(--green-soft); color: var(--green-deep);
  font-size: 11px; font-weight: 600;
}
.head-sub { font-size: 13px; color: var(--ink-faint); }

/* 编辑器手机端页签（默认隐藏，仅窄屏启用） */
.editor-tabs { display: none; gap: 6px; margin-bottom: 12px; }
.editor-tabs button {
  flex: 1; padding: 10px; border: 1px solid var(--line); background: var(--surface);
  border-radius: 999px; font-size: 15px; color: var(--ink-soft); cursor: pointer; font-family: var(--sans);
  transition: all 0.2s;
}
.editor-tabs button.on { background: var(--green); color: #fff; border-color: var(--green); font-weight: 600; }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .home-layout { grid-template-columns: 1fr; grid-template-areas: "feed" "side"; }
  .side-col { position: static; top: auto; }
  .home-hero { grid-area: feed; }
}

@media (max-width: 860px) {
  .post-card { flex-direction: column; }
  .post-card-cover { width: 100%; min-height: 160px; max-height: 220px; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-side { position: static; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .admin-side .side-user { border-bottom: none; border-right: 1px solid var(--line-soft); margin-bottom: 0; padding: 6px 14px 6px 8px; }
  .admin-side button, .admin-side a { width: auto; }
  .editor-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .header-inner { padding: 12px 16px; gap: 12px; flex-wrap: wrap; }
  .site-nav { order: 3; width: 100%; margin-left: 0; justify-content: center; }
  .header-actions { margin-left: auto; }
  .page { padding: 24px 16px 48px; }
  .home-hero-title { font-size: 21px; }
  .hero { padding: 36px 8px 30px; }
  .hero-title { font-size: 30px; }
  .article-body { padding: 26px 22px; }
  .article-title { font-size: 25px; }
  .about-card { padding: 28px 24px; }
  .post-nav { grid-template-columns: 1fr; }
  .admin-panel { padding: 18px 16px; }
  .admin-table .cell-title { max-width: 140px; }
  .auth-card, .login-modal-card { padding: 28px 22px; }
  /* 手机端：个人信息栏（侧栏用户卡）移至顶栏，此处省去避免重复 */
  .side-user-card { display: none; }
}

/* ---------- 移动端增强 ---------- */
@media (max-width: 860px) {
  /* 编辑器改为「编辑 / 预览」页签切换，避免手机上上下堆叠过长 */
  .editor-tabs { display: flex; }
  .editor-grid.mobile-edit > .editor-pane:nth-child(2) { display: none; }
  .editor-grid.mobile-preview > .editor-pane:nth-child(1) { display: none; }
  #mdEditor, #abEditor { min-height: 320px; }
  .md-preview { min-height: 320px; max-height: 70vh; }
  /* 宽表格横向滚动更顺滑（用户管理列较多） */
  .admin-table-wrap { -webkit-overflow-scrolling: touch; }
  .admin-table { min-width: 880px; }
}

@media (max-width: 640px) {
  /* 表单字号 ≥16px，避免 iOS 聚焦输入框时页面自动缩放 */
  .form-field input, .form-field textarea, .form-field select,
  .af-input, .af-select, #mdEditor, #abEditor, .comment-form textarea {
    font-size: 16px;
  }
  /* 触控目标加大 */
  .btn { padding: 10px 18px; }
  .btn-sm { padding: 7px 14px; }
  .pager-btn { min-width: 42px; height: 42px; }
  .admin-side button, .admin-side a { padding: 12px; }
  /* 弹窗在小屏内滚动 */
  .login-modal-card { max-height: 90vh; overflow: auto; }
  .dlg-body { max-height: 62vh; }
  .admin-table { font-size: 13.5px; }
}

/* ---------------- 数据备份面板 ---------------- */
.backup-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.backup-block h4 { font-size: 15px; margin-bottom: 6px; color: var(--ink); }
.backup-tip { font-size: 13px; color: var(--ink-soft); margin-bottom: 12px; line-height: 1.6; }
.backup-tip code { background: var(--surface-2); border-radius: 5px; padding: 1px 6px; font-size: 12px; }
.backup-preview { margin-top: 14px; }
.backup-preview .bp-meta { font-size: 12.5px; color: var(--ink-faint); margin-bottom: 8px; }
.bp-counts { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 12px; }
.bp-counts li { background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 6px 12px; font-size: 13px; color: var(--ink-soft); }
.bp-counts li b { color: var(--green-deep); }
.bp-confirm { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-soft); margin: 6px 0 12px; cursor: pointer; }
.bp-confirm input { width: 16px; height: 16px; accent-color: var(--green); }
.backup-result { background: var(--green-softer); border: 1px solid var(--green-soft); border-radius: var(--radius-sm); padding: 14px 16px; }
.backup-result h4 { font-size: 14px; margin-bottom: 8px; color: var(--green-deep); }
.backup-result ul { list-style: none; }
.backup-result li { font-size: 13.5px; color: var(--ink); padding: 3px 0; }

/* ================= 页面内浮层：微信扫码二维码 ================= */
.wx-qr-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 2000;
  display: flex; align-items: center; justify-content: center; animation: wxFadeIn .16s ease; }
@keyframes wxFadeIn { from { opacity: 0; } to { opacity: 1; } }
.wx-qr-card { position: relative; background: #fff; border-radius: 14px; padding: 20px 22px 16px;
  width: 348px; max-width: calc(100vw - 36px); box-shadow: 0 18px 48px rgba(0, 0, 0, .18); text-align: center;
  animation: wxPop .18s ease; }
@keyframes wxPop { from { transform: translateY(10px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.wx-qr-close { position: absolute; top: 8px; right: 10px; width: 28px; height: 28px; border: none; background: none;
  font-size: 15px; color: #9aa3af; cursor: pointer; border-radius: 6px; }
.wx-qr-close:hover { background: #f2f4f7; color: #333; }
.wx-qr-title { font-size: 16px; font-weight: 600; color: #1f2937; margin-bottom: 12px; }
.wx-qr-box { width: 300px; max-width: 100%; height: 332px; margin: 0 auto; border: none;
  border-radius: 10px; overflow: hidden; background: #fff; position: relative; }
/* iframe 原生按 300px 渲染，由 JS 用 transform: scale 等比缩放到容器宽度，保证窄屏下二维码始终居中 */
.wx-qr-box iframe { width: 300px; height: 332px; border: 0; display: block; transform-origin: top left; }
.wx-qr-tip { font-size: 12.5px; color: #8a919c; margin: 10px 0 12px; line-height: 1.7; }
.wx-qr-fallback { display: block; font-size: 12.5px; color: #4b8dff; margin-top: 8px; cursor: pointer; }
.wx-qr-fallback:hover { text-decoration: underline; }

/* 快速登录弹层内嵌二维码模式：整卡居中、不额外加投影 */
.wx-qr-inmodal { text-align: center; box-shadow: none; }
.wx-qr-inmodal .wx-qr-title { margin-bottom: 12px; }
.wx-qr-inmodal .form-error { text-align: center; }

/* 微信 tab 内嵌二维码挂载区 */
.wx-qr-area { min-height: 100px; }
.wx-qr-loading { padding: 28px 0; font-size: 13px; color: #8a919c; }
.wx-qr-area .wx-qr-tip { margin: 8px 0 6px; }

/* 页面切换淡入：登录/登出后的重渲染更柔和，不再生硬跳变 */
#app > .page { animation: pageIn .18s ease; }
@keyframes pageIn { from { opacity: .35; } to { opacity: 1; } }

/* 登录弹层淡出关闭 */
.login-modal-overlay.wx-closing { opacity: 0; transition: opacity .18s ease; pointer-events: none; }

/* ================= 留言板 ================= */
.board-form { background: #fff; border: 1px solid #e6e8eb; border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.board-input { width: 100%; border: 1px solid #dfe3e8; border-radius: 8px; padding: 9px 11px; font-size: 14px; margin-bottom: 10px; font-family: inherit; box-sizing: border-box; background: #fff; color: #333; }
.board-input:focus { outline: none; border-color: #4b8dff; }
textarea.board-input { resize: vertical; min-height: 72px; }
.board-form-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.board-select { border: 1px solid #dfe3e8; border-radius: 8px; padding: 8px 10px; font-size: 13.5px; background: #fff; color: #333; }
.board-hint { font-size: 12.5px; color: #8a919c; }
.board-list { display: flex; flex-direction: column; gap: 12px; }
.board-item { background: #fff; border: 1px solid #e6e8eb; border-radius: 12px; padding: 12px 14px; }
.board-item-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.board-name { font-size: 13.5px; color: #1f2937; }
.board-time { font-size: 12px; color: #9aa3af; margin-left: auto; }
.board-del { border: none; background: none; color: #c0c6cf; cursor: pointer; font-size: 13px; padding: 2px 4px; }
.board-del:hover { color: #c0392b; }
.board-vis { font-size: 11.5px; color: #8a6d1a; background: #fdf6e3; border: 1px solid #f0e2b6; border-radius: 20px; padding: 1px 8px; white-space: nowrap; }
.board-item-body { font-size: 14px; color: #333; line-height: 1.7; word-break: break-word; }
/* 侧栏滚动预览 */
.board-card .board-scroll { height: 128px; overflow: hidden; margin: 8px 0 10px; }
.board-track { display: flex; flex-direction: column; animation: boardUp 14s linear infinite; }
.board-scroll:hover .board-track { animation-play-state: paused; }
@keyframes boardUp { from { transform: translateY(0); } to { transform: translateY(-50%); } }
.board-line { font-size: 12.5px; color: #555; line-height: 1.5; padding: 5px 0; border-bottom: 1px dashed #eef0f3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.board-line b { color: #1f2937; margin-right: 4px; }
.board-card .board-hint { color: #9aa3af; }
.board-enter { display: block; text-align: center; }

/* 微信授权页不做裁切：扫码态（顶部「微信登录」标题≈60px）与快捷登录态（头像几乎顶格）
   两种布局高度不同，静态裁切无法两全——保留自然渲染。框高取 332px：实测在该高度下
   微信二维码外框四边都完整可见（底部不再被裁掉），左右留白 31px、QR 框内左右各 19px 完全对称；
   292px 时内容偏高会把二维码框底边裁掉，看起来像「只有上/左/右有边框、底部没有」。 */
.wx-qr-box { height: 332px; }
.wx-qr-box iframe { height: 332px; margin-top: 0; }

/* ================= 站内信 ================= */
.header-mail { position: relative; font-size: 15px; }
.mail-badge { position: absolute; top: -6px; right: -8px; min-width: 16px; height: 16px; line-height: 16px;
  padding: 0 4px; border-radius: 9px; background: #e74c3c; color: #fff; font-size: 10.5px; text-align: center; }
.mail-badge.on { position: static; display: inline-block; }
.mail-thread { background: #fff; border: 1px solid #e6e8eb; border-radius: 12px; padding: 14px 16px; }
.mail-thread-head { font-size: 14px; color: #374151; margin-bottom: 10px; }
.mail-msgs { max-height: 46vh; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px 2px; }
.mail-msg { display: flex; flex-direction: column; align-items: flex-start; }
.mail-msg.mine { align-items: flex-end; }
.mail-bubble { max-width: 78%; padding: 8px 12px; border-radius: 12px; font-size: 14px; line-height: 1.6; word-break: break-word; }
.mail-msg.mine .mail-bubble { background: #e8f1ff; color: #1f2937; border-bottom-right-radius: 4px; }
.mail-msg.theirs .mail-bubble { background: #f2f4f7; color: #1f2937; border-bottom-left-radius: 4px; }
.mail-time { font-size: 11.5px; color: #9aa3af; margin-top: 3px; }
.mail-unread-tag { color: #e74c3c; }
.mail-empty { color: #9aa3af; font-size: 13.5px; text-align: center; padding: 24px 0; }
.mail-send { display: flex; gap: 10px; align-items: flex-end; margin-top: 12px; }
.mail-send .board-input { margin-bottom: 0; flex: 1; }
.mail-send .btn { flex-shrink: 0; }
.mail-conv-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.mail-conv { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: #f8f9fb;
  border: 1px solid #e6e8eb; border-radius: 10px; padding: 10px 12px; cursor: pointer; font-size: 13.5px; }
.mail-conv:hover { border-color: #4b8dff; }
.mail-conv-name { font-weight: 600; color: #1f2937; flex-shrink: 0; }
.mail-conv-last { color: #8a919c; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.mail-new { display: flex; align-items: center; gap: 8px; margin-top: 4px; }

/* 我的资料 · 头像 */
.pf-avatar-row { display: flex; align-items: center; gap: 14px; margin: 10px 0 14px; }
.pf-avatar { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; background: #eef2f7;
  display: flex; align-items: center; justify-content: center; font-size: 22px; color: #4b8dff; flex-shrink: 0; }
.pf-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-avatar-fields { flex: 1; }

