/* ============================================================
   Sakurumii Blog · 仿 Aemeath 风格设计系统
   白卡 + 红色强调 / 红竖条标题 / 三栏布局
   ============================================================ */

:root {
  --red: #e03e3e;
  --red-2: #ff6b6b;
  --red-soft: #fdecec;
  --red-soft-2: #fbd9d9;
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #333333;
  --text-2: #666666;
  --muted: #9aa0a6;
  --border: #f0f0f2;
  --input-bg: #f7f8fa;
  --shadow: 0 2px 16px rgba(31, 35, 41, 0.06);
  --radius: 14px;
  --topbar-h: 64px;
}

[data-theme="dark"] {
  --red-soft: #3a2528;
  --red-soft-2: #4c2c30;
  --bg: #16171b;
  --card: #1f2127;
  --text: #e6e6e9;
  --text-2: #b6bac0;
  --muted: #7d828a;
  --border: #2c2f36;
  --input-bg: #191b21;
  --shadow: 0 2px 16px rgba(0, 0, 0, 0.4);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }
::selection { background: var(--red); color: #fff; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #d8d8dc; border-radius: 4px; }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #3a3d45; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------- 顶部导航 ---------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 10px 16px 6px;
  background: linear-gradient(var(--bg) 55%, transparent);
}
.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px 0 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red-2), var(--red));
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}
.brand img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.85);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 14.5px;
  color: var(--text-2);
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover { color: var(--red); }
.nav-links a.active {
  color: var(--red);
  background: var(--red-soft);
  font-weight: 600;
}
.nav-links a svg { width: 16px; height: 16px; }
.nav-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.nav-travellings {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-2);
  font-size: 13.5px;
  transition: color 0.15s, border-color 0.15s;
}
.nav-travellings:hover { color: var(--red); border-color: var(--red-soft-2); }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-2);
  transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--red-soft); color: var(--red); }
.icon-btn svg { width: 18px; height: 18px; }
.nav-user { position: relative; }
.nav-user-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border: none;
  border-radius: 999px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 13.5px;
  font-weight: 600;
  max-width: 140px;
}
.nav-user-btn svg { width: 16px; height: 16px; }
.nav-user-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-dropdown {
  position: absolute;
  right: 0;
  top: 42px;
  min-width: 140px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 6px;
  display: none;
  flex-direction: column;
  z-index: 110;
}
.nav-dropdown.open { display: flex; }
.nav-dropdown a, .nav-dropdown button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  background: none;
  color: var(--text-2);
  font-size: 14px;
  text-align: left;
  width: 100%;
}
.nav-dropdown a:hover, .nav-dropdown button:hover { background: var(--red-soft); color: var(--red); }
.nav-dropdown svg { width: 15px; height: 15px; }

/* ---------------- 三栏布局 ---------------- */
.layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 16px 24px;
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr) 312px;
  gap: 16px;
  align-items: start;
}
.col-left, .col-right { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 78px; }
.col-main { min-width: 0; display: flex; flex-direction: column; gap: 16px; }

/* ---------------- 卡片基础 ---------------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.card-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 16.5px;
  font-weight: 700;
  margin-bottom: 14px;
}
.card-title::before {
  content: "";
  width: 4px;
  height: 17px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--red-2), var(--red));
  flex-shrink: 0;
}
.card-title .title-more {
  margin-left: auto;
  font-size: 13px;
  font-weight: 400;
  color: var(--red);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.card-title .title-more svg { width: 14px; height: 14px; }

/* ---------------- 左栏：个人资料卡 ---------------- */
.profile-card { padding: 0; overflow: hidden; text-align: center; }
.profile-cover { height: 110px; object-fit: cover; width: 100%; display: block; }
.profile-avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 4px solid var(--card);
  margin: -46px auto 0;
  display: block;
  position: relative;
  box-shadow: 0 4px 14px rgba(224, 62, 62, 0.18);
}
.profile-name { font-size: 18px; font-weight: 700; margin-top: 10px; }
.profile-sig { font-size: 13px; color: var(--muted); margin-top: 4px; padding: 0 16px; }
.profile-social {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}
.profile-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--text-2);
  transition: all 0.15s;
}
.profile-social a:hover { background: var(--red-soft); color: var(--red); transform: translateY(-2px); }
.profile-social svg { width: 17px; height: 17px; }
.profile-stats {
  display: flex;
  gap: 10px;
  padding: 14px;
  margin-top: 14px;
  border-top: 1px dashed var(--border);
}
.profile-stats > div {
  flex: 1;
  background: var(--red-soft);
  border-radius: 10px;
  padding: 8px 4px;
}
.profile-stats .ps-num { font-size: 17px; font-weight: 700; color: var(--red); }
.profile-stats .ps-label { font-size: 11.5px; color: var(--text-2); margin-top: 1px; }
.profile-stats .ps-top { display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 11.5px; color: var(--text-2); }
.profile-stats .ps-top svg { width: 13px; height: 13px; color: var(--red); }

.welcome-card p { font-size: 13.8px; color: var(--text-2); }
.welcome-actions { display: flex; gap: 10px; margin-top: 14px; }
.welcome-actions .btn { flex: 1; }

.hitokoto-card .hitokoto-text {
  font-family: "Noto Serif SC", "STSong", serif;
  font-size: 14.5px;
  color: var(--text-2);
  letter-spacing: 0.5px;
}
.hitokoto-card .hitokoto-from { margin-top: 8px; font-size: 12.5px; color: var(--muted); text-align: right; }

/* ---------------- 右栏：问候 / 统计 / 信息 ---------------- */
.greet-card .greet-hello { font-size: 14px; color: var(--text-2); display: flex; align-items: center; justify-content: space-between; }
.greet-card .greet-hello svg { width: 18px; height: 18px; color: var(--red); }
.greet-card .greet-time { font-size: 34px; font-weight: 700; letter-spacing: 1px; line-height: 1.2; margin-top: 2px; }
.greet-card .greet-time small { font-size: 14px; color: var(--muted); font-weight: 400; margin-left: 8px; }
.greet-card .greet-date { font-size: 12.5px; color: var(--muted); }

.banner-card { padding: 0; overflow: hidden; }
.banner-card img { display: block; width: 100%; height: 130px; object-fit: cover; }

.stat-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  font-size: 13.8px;
  color: var(--text-2);
}
.stat-row + .stat-row { border-top: 1px dashed var(--border); }
.stat-row svg { width: 16px; height: 16px; color: var(--red); flex-shrink: 0; }
.stat-row .stat-val { margin-left: auto; font-weight: 700; color: var(--text); }

.info-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 13.2px;
  color: var(--text-2);
}
.info-row + .info-row { border-top: 1px dashed var(--border); }
.info-row svg { width: 15px; height: 15px; color: var(--red); flex-shrink: 0; }
.info-row .info-val {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--input-bg);
  border-radius: 7px;
  padding: 2px 9px;
  font-size: 12.3px;
  color: var(--text);
  max-width: 190px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.info-row .info-val img { width: 14px; height: 14px; }

/* ---------------- 右栏：音乐播放器 ---------------- */
.music-now { display: flex; gap: 12px; align-items: center; }
.music-cover {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--red-soft-2);
  flex-shrink: 0;
}
.music-cover.spinning { animation: spin 12s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.music-meta { flex: 1; min-width: 0; }
.music-name { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.music-artist { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.music-progress { height: 5px; background: var(--red-soft); border-radius: 3px; margin-top: 8px; cursor: pointer; position: relative; }
.music-bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--red-2), var(--red)); border-radius: 3px; }
.music-time { font-size: 11px; color: var(--muted); margin-top: 3px; display: flex; justify-content: space-between; }
.music-ctrl { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 12px; }
.music-ctrl button {
  border: none;
  background: transparent;
  color: var(--text-2);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.music-ctrl button:hover { color: var(--red); background: var(--red-soft); }
.music-ctrl button svg { width: 17px; height: 17px; }
.music-ctrl .music-playbtn {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--red-2), var(--red));
  color: #fff;
  box-shadow: 0 4px 12px rgba(224, 62, 62, 0.35);
}
.music-ctrl .music-playbtn:hover { color: #fff; transform: scale(1.06); }
.music-ctrl .music-playbtn svg { width: 19px; height: 19px; }
.music-playlist { margin-top: 10px; border-top: 1px dashed var(--border); padding-top: 8px; }
.music-playlist .pl-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
}
.music-playlist .pl-item:hover { background: var(--red-soft); color: var(--red); }
.music-playlist .pl-item.playing { color: var(--red); font-weight: 600; }
.music-playlist .pl-item svg { width: 14px; height: 14px; flex-shrink: 0; }
.music-playlist .pl-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------- 右栏：日历 + 热力图 ---------------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head .cal-ym { font-size: 15px; font-weight: 700; }
.cal-head .cal-nav { display: flex; gap: 4px; }
.cal-head .cal-nav button {
  border: none;
  background: transparent;
  color: var(--muted);
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cal-head .cal-nav button:hover { background: var(--red-soft); color: var(--red); }
.cal-head .cal-nav svg { width: 15px; height: 15px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.cal-grid .cal-wd { font-size: 11px; color: var(--muted); padding: 3px 0; }
.cal-grid .cal-day {
  font-size: 12.3px;
  padding: 3px 0;
  border-radius: 7px;
  color: var(--text-2);
  position: relative;
}
.cal-grid .cal-day.today {
  color: var(--red);
  font-weight: 700;
  box-shadow: inset 0 0 0 1.5px var(--red);
}
.cal-grid .cal-day.has-post { color: var(--red); font-weight: 600; }
.cal-grid .cal-day.blank { visibility: hidden; }

.heatmap { display: flex; gap: 3px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); overflow: hidden; }
.heatmap-col { display: flex; flex-direction: column; gap: 3px; }
.heatmap-cell { width: 11px; height: 11px; border-radius: 3px; background: var(--input-bg); }
.heatmap-cell.lv1 { background: #f6b9b9; }
.heatmap-cell.lv2 { background: #ee8080; }
.heatmap-cell.lv3 { background: var(--red); }
[data-theme="dark"] .heatmap-cell.lv1 { background: #5c3335; }
[data-theme="dark"] .heatmap-cell.lv2 { background: #8a4046; }
.heatmap-legend { display: flex; align-items: center; gap: 4px; margin-top: 8px; font-size: 11px; color: var(--muted); justify-content: flex-end; }
.heatmap-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ---------------- 右栏：分类 / 标签 ---------------- */
.cat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--text-2);
  transition: all 0.15s;
}
.cat-item:hover { background: var(--red-soft); color: var(--red); }
.cat-item:hover .cat-n { background: var(--red); color: #fff; }
.cat-item .cat-n {
  margin-left: auto;
  background: var(--red-soft);
  color: var(--red);
  font-size: 12px;
  font-weight: 600;
  border-radius: 7px;
  padding: 1px 9px;
  transition: all 0.15s;
}
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-pill {
  background: var(--red-soft);
  color: var(--red);
  font-size: 12.8px;
  border-radius: 8px;
  padding: 3px 11px;
  transition: all 0.15s;
}
.tag-pill:hover { background: var(--red); color: #fff; transform: translateY(-1px); }

/* ---------------- 中栏：搜索 / 文章列表 ---------------- */
.search-box { display: flex; gap: 10px; }
.search-box input {
  flex: 1;
  height: 42px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  border-radius: 12px;
  padding: 0 16px;
  font-size: 14.5px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-box input:focus { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.search-box input::placeholder { color: var(--muted); }

.list-head { font-size: 15px; color: var(--text-2); padding: 2px 4px; }
.list-head strong { color: var(--red); font-size: 17px; }

.post-item { display: block; transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s; }
.post-item:hover { transform: translateY(-3px); border-color: var(--red-soft-2); box-shadow: 0 8px 24px rgba(224, 62, 62, 0.1); }
.post-item-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17.5px;
  font-weight: 700;
  line-height: 1.45;
}
.post-item-title:hover { color: var(--red); }
.post-item-title .pin-badge {
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--red-2), var(--red));
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  padding: 1px 9px;
  border-radius: 999px;
}
.post-item-summary {
  margin-top: 8px;
  font-size: 13.8px;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-item-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--muted);
}
.post-item-meta .meta-item { display: inline-flex; align-items: center; gap: 4px; }
.post-item-meta svg { width: 13.5px; height: 13.5px; }
.post-item-meta .meta-cat { color: var(--red); background: var(--red-soft); border-radius: 6px; padding: 1px 9px; }
.post-item-meta .meta-tag:hover { color: var(--red); }

.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; padding: 6px 0 2px; }
.pagination button, .pagination span {
  min-width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 10px;
  color: var(--text-2);
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
}
.pagination button:hover:not(:disabled) { border-color: var(--red); color: var(--red); }
.pagination .page-cur { background: linear-gradient(135deg, var(--red-2), var(--red)); border-color: transparent; color: #fff; font-weight: 600; }
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }
.pagination svg { width: 15px; height: 15px; }

.empty-tip { text-align: center; padding: 46px 0; color: var(--muted); font-size: 14.5px; }
.empty-tip svg { width: 42px; height: 42px; margin-bottom: 10px; opacity: 0.5; }

/* ---------------- 中栏：分类网格（仿设计图） ---------------- */
.cat-hero .cat-hero-sub { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.cat-hero .cat-hero-title { font-size: 24px; font-weight: 800; color: var(--red); }
.cats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.cat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.cat-card:hover { transform: translateY(-3px); border-color: var(--red-soft-2); box-shadow: 0 8px 24px rgba(224, 62, 62, 0.1); }
.cat-card .cat-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--red-soft);
  color: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cat-card .cat-icon svg { width: 22px; height: 22px; }
.cat-card .cat-body { flex: 1; min-width: 0; }
.cat-card .cat-name { font-size: 16px; font-weight: 700; }
.cat-card .cat-count { font-size: 12.8px; color: var(--muted); margin-top: 1px; }
.cat-card .cat-arrow { color: var(--muted); transition: transform 0.15s, color 0.15s; }
.cat-card:hover .cat-arrow { color: var(--red); transform: translateX(3px); }
.cat-card .cat-arrow svg { width: 17px; height: 17px; }

/* ---------------- 中栏：文章详情 ---------------- */
.post-title { font-size: 26px; font-weight: 800; line-height: 1.4; }
.post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 12px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--border);
  font-size: 13px;
  color: var(--muted);
}
.post-meta .meta-item { display: inline-flex; align-items: center; gap: 5px; }
.post-meta svg { width: 14.5px; height: 14.5px; }
.post-meta .meta-cat { color: var(--red); background: var(--red-soft); border-radius: 7px; padding: 2px 10px; font-weight: 600; }
.post-meta .meta-tag:hover { color: var(--red); }
.article { margin-top: 18px; font-size: 15.2px; color: var(--text); word-break: break-word; }
.article h2 { font-size: 21px; margin: 26px 0 12px; padding-left: 11px; border-left: 4px solid var(--red); line-height: 1.4; }
.article h3 { font-size: 18px; margin: 22px 0 10px; }
.article h4 { font-size: 16px; margin: 18px 0 8px; }
.article h5 { font-size: 15px; margin: 16px 0 8px; }
.article p { margin: 10px 0; }
.article a { color: var(--red); border-bottom: 1px dashed var(--red-soft-2); }
.article a:hover { border-bottom-style: solid; }
.article img { border-radius: 10px; margin: 12px auto; display: block; }
.article code {
  background: var(--red-soft);
  color: var(--red);
  border-radius: 5px;
  padding: 1px 7px;
  font-size: 0.88em;
  font-family: "JetBrains Mono", Consolas, Monaco, monospace;
}
.article pre {
  background: #22252b;
  color: #dcdfe4;
  border-radius: 12px;
  padding: 16px 18px;
  overflow-x: auto;
  margin: 14px 0;
  font-size: 13.5px;
  line-height: 1.65;
}
.article pre code { background: none; color: inherit; padding: 0; }
.article blockquote {
  border-left: 4px solid var(--red);
  background: var(--red-soft);
  border-radius: 0 10px 10px 0;
  padding: 10px 16px;
  margin: 12px 0;
  color: var(--text-2);
}
.article blockquote p { margin: 4px 0; }
.article ul, .article ol { padding-left: 24px; margin: 10px 0; }
.article li { margin: 4px 0; }
.article hr { border: none; border-top: 1px dashed var(--border); margin: 22px 0; }
.article strong { color: var(--red); }
.post-nav { display: flex; gap: 12px; margin-top: 4px; }
.post-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 13px 16px;
  font-size: 14px;
  color: var(--text-2);
  transition: border-color 0.15s, color 0.15s;
}
.post-nav a:hover { border-color: var(--red); color: var(--red); }
.post-nav a span { font-size: 12px; color: var(--muted); }
.post-nav a.pn-next { text-align: right; }
.post-nav a.pn-next span { text-align: right; }
.post-nav .pn-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------- 中栏：友链 ---------------- */
.friends-note { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; color: var(--text-2); }
.friends-note svg { width: 20px; height: 20px; color: var(--red); flex-shrink: 0; margin-top: 2px; }
.friends-note a { color: var(--red); font-weight: 600; }
.friends-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.friend-card { display: flex; align-items: center; gap: 13px; padding: 16px; transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s; }
.friend-card:hover { transform: translateY(-3px); border-color: var(--red-soft-2); box-shadow: 0 8px 24px rgba(224, 62, 62, 0.1); }
.friend-card .fc-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--red-soft);
  color: var(--red);
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.friend-card .fc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.friend-card .fc-body { flex: 1; min-width: 0; }
.friend-card .fc-name { font-size: 15.5px; font-weight: 700; }
.friend-card:hover .fc-name { color: var(--red); }
.friend-card .fc-desc { font-size: 12.8px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------- 中栏：留言板 ---------------- */
.gb-box textarea {
  width: 100%;
  min-height: 96px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14.5px;
  color: var(--text);
  resize: vertical;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.gb-box textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.gb-box-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.gb-box-foot .gb-user { font-size: 13px; color: var(--muted); }
.gb-box-foot .gb-user b { color: var(--red); }
.gb-login-tip { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--text-2); }
.gb-item { display: flex; gap: 12px; }
.gb-item + .gb-item { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }
.gb-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--red-soft);
  color: var(--red);
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.gb-body { flex: 1; min-width: 0; }
.gb-head { display: flex; align-items: baseline; gap: 10px; }
.gb-name { font-size: 14px; font-weight: 700; color: var(--red); }
.gb-date { font-size: 12px; color: var(--muted); }
.gb-content { font-size: 14.3px; color: var(--text); margin-top: 3px; word-break: break-word; white-space: pre-wrap; }

/* ---------------- 登录/注册模态（横向双栏 · 壁纸透明底） ---------------- */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: url("../assets/images/login-bg.webp") center / cover no-repeat;
}
.auth-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(20, 16, 18, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.auth-overlay[hidden] { display: none; }
.auth-card {
  position: relative;
  width: 780px;
  max-width: calc(100vw - 32px);
  background: color-mix(in srgb, var(--card) 94%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  display: flex;
  padding: 36px 34px;
  gap: 30px;
  animation: authIn 0.28s ease;
}
@keyframes authIn { from { opacity: 0; transform: translateY(16px) scale(0.98); } }
.auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: var(--input-bg);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-close:hover { background: var(--red-soft); color: var(--red); }
.auth-close svg { width: 15px; height: 15px; }
.auth-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.auth-divider { width: 1px; background: linear-gradient(180deg, transparent, var(--border) 25%, var(--border) 75%, transparent); flex-shrink: 0; }
.auth-col h2 { font-size: 22px; font-weight: 800; text-align: center; }
.auth-col h2 em { font-style: normal; color: var(--red); }
.auth-sub { text-align: center; font-size: 12.8px; color: var(--muted); margin: 6px 0 18px; }
.auth-col form { display: flex; flex-direction: column; gap: 12px; }
.auth-col input {
  height: 44px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  border-radius: 12px;
  padding: 0 15px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.03);
}
.auth-col input:focus { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.auth-col input::placeholder { color: var(--muted); }
.auth-note { font-size: 11.8px; color: var(--muted); text-align: center; }
.auth-note b { color: var(--red); font-weight: 600; }
.auth-swap { text-align: center; font-size: 12.8px; color: var(--muted); margin-top: 16px; }
.auth-swap a { color: var(--red); font-weight: 600; cursor: pointer; }

/* ---------------- 按钮 / 输入 ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: none;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 600;
  padding: 0 20px;
  height: 42px;
  color: #fff;
  background: linear-gradient(135deg, var(--red-2), var(--red));
  box-shadow: 0 4px 14px rgba(224, 62, 62, 0.28);
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(224, 62, 62, 0.36); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn svg { width: 16px; height: 16px; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13.5px; border-radius: 10px; }
.btn-ghost {
  background: var(--red-soft);
  color: var(--red);
  box-shadow: none;
}
.btn-ghost:hover { box-shadow: none; background: var(--red-soft-2); }

/* ---------------- 页脚 ---------------- */
.site-footer {
  max-width: 1280px;
  margin: 0 auto;
  padding: 26px 16px 30px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.site-footer .sf-row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 14px; }
.site-footer .sf-row + .sf-row { margin-top: 8px; }
.site-footer a { color: var(--text-2); transition: color 0.15s; }
.site-footer a:hover { color: var(--red); }
.site-footer .sf-icp { display: inline-flex; align-items: center; gap: 4px; }
.site-footer .sf-hosting { display: inline-flex; align-items: center; gap: 5px; }
.site-footer .sf-hosting img { width: 15px; height: 15px; }
.site-footer .sf-moe { color: var(--red); }
.site-footer .sf-copy { margin-top: 8px; font-size: 12.5px; }

/* ---------------- Toast ---------------- */
.toast-wrap { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 999; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast {
  background: rgba(30, 30, 34, 0.92);
  color: #fff;
  font-size: 13.8px;
  padding: 10px 20px;
  border-radius: 999px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.25);
  animation: toastIn 0.25s ease;
  max-width: 80vw;
}
.toast.toast-err { background: rgba(190, 40, 40, 0.94); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }

/* ---------------- 回到顶部 ---------------- */
.back-top {
  position: fixed;
  right: 22px;
  bottom: 26px;
  z-index: 90;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, color 0.15s, border-color 0.15s;
}
.back-top.show { opacity: 1; pointer-events: auto; }
.back-top:hover { color: var(--red); border-color: var(--red-soft-2); }
.back-top svg { width: 18px; height: 18px; }

/* ---------------- 管理后台 ---------------- */
.admin-wrap { max-width: 1060px; margin: 0 auto; padding: 20px 16px 60px; }
.admin-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.admin-topbar .at-back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-2); }
.admin-topbar .at-back:hover { color: var(--red); }
.admin-topbar .at-back svg { width: 15px; height: 15px; }
.admin-topbar h1 { font-size: 20px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.admin-topbar h1 svg { width: 20px; height: 20px; color: var(--red); }
.admin-topbar .at-right { margin-left: auto; display: flex; gap: 8px; }
.admin-login { max-width: 400px; margin: 9vh auto 0; }
.admin-login .card { padding: 30px; }
.admin-login h2 { text-align: center; margin-bottom: 6px; }
.admin-login .auth-sub { margin-bottom: 16px; }
.admin-login input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  border-radius: 12px;
  padding: 0 15px;
  font-size: 14px;
  outline: none;
  color: var(--text);
}
.admin-login input:focus { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.admin-login .btn { width: 100%; margin-top: 14px; }
.admin-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.admin-tabs button {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-2);
  border-radius: 999px;
  padding: 8px 20px;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.admin-tabs button.active { background: linear-gradient(135deg, var(--red-2), var(--red)); border-color: transparent; color: #fff; font-weight: 600; }
.admin-tabs button svg { width: 15px; height: 15px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13.8px; }
.admin-table th {
  text-align: left;
  color: var(--muted);
  font-weight: 600;
  font-size: 12.5px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.admin-table td { padding: 10px; border-bottom: 1px dashed var(--border); color: var(--text-2); vertical-align: middle; }
.admin-table td .td-title { color: var(--text); font-weight: 600; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.admin-table .row-acts { display: flex; gap: 6px; justify-content: flex-end; }
.admin-table .row-acts button {
  border: none;
  background: var(--input-bg);
  color: var(--text-2);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.admin-table .row-acts button:hover { background: var(--red-soft); color: var(--red); }
.admin-table .row-acts button svg { width: 14.5px; height: 14.5px; }
.admin-badge { display: inline-block; font-size: 11.5px; border-radius: 6px; padding: 1px 8px; background: var(--input-bg); color: var(--muted); }
.admin-badge.on { background: var(--red-soft); color: var(--red); font-weight: 600; }
.admin-form .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.admin-form .fg-span2 { grid-column: span 2; }
.admin-form label { font-size: 12.8px; color: var(--muted); display: block; margin-bottom: 5px; }
.admin-form input[type="text"], .admin-form textarea, .admin-form select {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--input-bg);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 14px;
  color: var(--text);
  outline: none;
}
.admin-form input:focus, .admin-form textarea:focus, .admin-form select:focus { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.admin-form textarea { min-height: 300px; resize: vertical; line-height: 1.7; font-family: "JetBrains Mono", Consolas, monospace; font-size: 13.5px; }
.admin-form .form-checks { display: flex; gap: 18px; align-items: center; font-size: 14px; color: var(--text-2); }
.admin-form .form-checks label { display: inline-flex; align-items: center; gap: 6px; margin: 0; cursor: pointer; }
.admin-form .form-checks input { accent-color: var(--red); width: 15px; height: 15px; }
.admin-form .form-actions { display: flex; gap: 10px; margin-top: 4px; }
.md-preview { border: 1px dashed var(--border); border-radius: 10px; padding: 14px 16px; margin-top: 10px; max-height: 420px; overflow-y: auto; }

/* ---------------- 响应式兜底（页面为 width=1024 桌面视口） ---------------- */
@media (max-width: 1080px) {
  .layout { grid-template-columns: 250px minmax(0, 1fr) 280px; }
}
