/* ============================================================
   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); }
.tag-pill i {
  font-style: normal;
  font-size: 11px;
  margin-left: 5px;
  opacity: 0.72;
}
.tag-pill:hover i { opacity: 1; }

/* ---------------- 中栏：搜索 / 文章列表 ---------------- */
.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-thread + .gb-thread { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }
.gb-replies { margin-top: 10px; padding-left: 14px; border-left: 2px solid var(--border); display: grid; gap: 10px; }
.gb-item.is-reply .gb-avatar { width: 28px; height: 28px; font-size: 12.5px; }
.gb-item.is-reply .gb-name { font-size: 13px; }
.gb-item.is-reply .gb-content { font-size: 13.5px; margin-top: 2px; }
.gb-reply-btn {
  align-self: flex-start;
  margin-top: 5px;
  padding: 0;
  border: none;
  background: none;
  font-size: 12.3px;
  color: var(--muted);
  cursor: pointer;
}
.gb-reply-btn:hover { color: var(--red); }
.gb-replying {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 6px 12px;
  background: var(--red-soft);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-2);
}
.gb-replying b { color: var(--red); }
.gb-replying button { border: none; background: none; font-size: 12.5px; color: var(--muted); cursor: pointer; padding: 0; }
.gb-replying button:hover { color: var(--red); }
.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; }

/* ---------------- 登录/注册（独立页面 /login/，样式见 css/login.css） ---------------- */
.auth-sub { text-align: center; font-size: 12.8px; color: var(--muted); margin: 6px 0 18px; }

/* ---------------- 按钮 / 输入 ---------------- */
.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; }
}

/* ---------------- 侧栏卡片线稿装饰（has-bg，右下角淡色线稿） ---------------- */
:root {
  --skm-decor-blossom: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 190 150'%3E%3Cg fill='none' stroke='white' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M191 143c-37-4-61-20-78-43-15-21-20-42-39-55-12-8-25-11-39-10' stroke-width='3'/%3E%3Cpath d='M135 122c5-20 19-34 39-42M107 92c-17-4-31-14-41-29M151 107c10 1 19 5 27 12' stroke-width='2.2'/%3E%3Cellipse cx='176' cy='77' rx='11' ry='5' transform='rotate(-28 176 77)' stroke-width='2'/%3E%3Cellipse cx='164' cy='88' rx='11' ry='5' transform='rotate(42 164 88)' stroke-width='2'/%3E%3Cpath d='M109 93c-9 0-15-6-15-13 7-1 13 3 15 13Zm1 0c0-9 6-15 13-15 1 7-3 13-13 15Zm-1 1c9 0 15 6 15 13-7 1-13-3-15-13Zm-1 0c0 9-6 15-13 15-1-7 3-13 13-15Z' stroke-width='2.2'/%3E%3C/g%3E%3Cg fill='white'%3E%3Ccircle cx='109' cy='93' r='3.5'/%3E%3Ccircle cx='146' cy='44' r='3'/%3E%3Ccircle cx='157' cy='35' r='1.7'/%3E%3Cpath d='m171 47 2 5 5 2-5 2-2 5-2-5-5-2 5-2 2-5Z'/%3E%3C/g%3E%3C/svg%3E");
  --skm-decor-sun-cloud: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 190 150'%3E%3Cg fill='none' stroke='white' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='132' cy='57' r='25' stroke-width='3'/%3E%3Cpath d='M132 18v12M132 84v12M93 57h12M159 57h12M105 30l9 9M150 75l9 9M105 84l9-9M150 39l9-9' stroke-width='3'/%3E%3Cpath d='M47 111h91c14 0 22-8 22-19s-9-19-20-19c-4 0-7 1-10 3-6-15-19-24-35-24-20 0-36 15-38 34-2-1-5-1-7-1-9 0-16 6-16 13s5 13 13 13Z' stroke-width='3'/%3E%3C/g%3E%3Cg fill='white'%3E%3Ccircle cx='43' cy='47' r='3'/%3E%3Ccircle cx='58' cy='36' r='2'/%3E%3C/g%3E%3C/svg%3E");
  --skm-decor-quote: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 190 150'%3E%3Cg fill='none' stroke='white' stroke-linecap='round'%3E%3Cpath d='M47 47c-13 8-20 20-20 36h22v25H24V85c0-21 8-37 23-48m52 10C86 55 79 67 79 83h22v25H76V85c0-21 8-37 23-48' stroke-width='4'/%3E%3Cpath d='M119 60h43M119 75h35M119 90h46M119 105h28' stroke-width='3'/%3E%3Cpath d='M51 124c28 9 67 10 108 1' stroke-width='2' stroke-dasharray='5 7'/%3E%3C/g%3E%3Cg fill='white'%3E%3Ccircle cx='157' cy='42' r='3'/%3E%3Cpath d='m139 29 2 5 5 2-5 2-2 5-2-5-5-2 5-2 2-5Z'/%3E%3C/g%3E%3C/svg%3E");
  --skm-decor-constellation: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 190 150'%3E%3Cg fill='none' stroke='white' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M24 111C43 79 64 87 82 57S116 38 138 68S160 101 178 45' stroke-width='3'/%3E%3Cpath d='M43 70 67 111M82 57 104 119M138 68 125 117M178 45 158 102' stroke-width='1.8' stroke-dasharray='4 6'/%3E%3C/g%3E%3Cg fill='white'%3E%3Ccircle cx='24' cy='111' r='5'/%3E%3Ccircle cx='43' cy='70' r='3.5'/%3E%3Ccircle cx='67' cy='111' r='4'/%3E%3Ccircle cx='82' cy='57' r='5'/%3E%3Ccircle cx='104' cy='119' r='3.5'/%3E%3Ccircle cx='138' cy='68' r='5'/%3E%3Ccircle cx='158' cy='102' r='3.5'/%3E%3Ccircle cx='178' cy='45' r='4.5'/%3E%3Cpath d='m119 24 2 5 5 2-5 2-2 5-2-5-5-2 5-2 2-5Z'/%3E%3C/g%3E%3C/svg%3E");
  --skm-decor-window: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 190 150'%3E%3Cg fill='none' stroke='white' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='23' y='27' width='144' height='101' rx='13' stroke-width='3'/%3E%3Cpath d='M23 51h144M38 39h1m12 0h1m12 0h1M42 69h47v38H42V69Zm59 0h46M101 82h38M101 95h46M101 108h29' stroke-width='3'/%3E%3Cpath d='M33 136h124' stroke-width='2' stroke-dasharray='5 7'/%3E%3C/g%3E%3Cg fill='white'%3E%3Ccircle cx='153' cy='20' r='3'/%3E%3C/g%3E%3C/svg%3E");
  --skm-decor-orbit: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 190 150'%3E%3Cg fill='none' stroke='white'%3E%3Cellipse cx='104' cy='79' rx='70' ry='29' transform='rotate(-18 104 79)' stroke-width='2.5'/%3E%3Cellipse cx='104' cy='79' rx='37' ry='67' transform='rotate(31 104 79)' stroke-width='2.5'/%3E%3Ccircle cx='104' cy='79' r='22' stroke-width='3'/%3E%3Cpath d='M28 118c33 16 78 12 117-12' stroke-width='2' stroke-dasharray='5 7'/%3E%3C/g%3E%3Cg fill='white'%3E%3Ccircle cx='49' cy='54' r='6'/%3E%3Ccircle cx='154' cy='108' r='4'/%3E%3Ccircle cx='154' cy='35' r='2.5'/%3E%3Cpath d='m43 97 2 5 5 2-5 2-2 5-2-5-5-2 5-2 2-5Zm121-34 1.5 4 4 1.5-4 1.5-1.5 4-1.5-4-4-1.5 4-1.5 1.5-4Z'/%3E%3C/g%3E%3C/svg%3E");
  --skm-decor-clock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 190 150'%3E%3Cg fill='none' stroke='white' stroke-linecap='round'%3E%3Ccircle cx='119' cy='78' r='47' stroke-width='3'/%3E%3Cpath d='M119 47v32l24 16M119 25v10M119 121v10M66 78h10M162 78h10M82 41l7 8M149 108l7 8M82 115l7-8M149 49l7-8' stroke-width='3'/%3E%3Cpath d='M36 104h33M46 116h26M42 91h20' stroke-width='2' stroke-dasharray='6 6'/%3E%3C/g%3E%3Cg fill='white'%3E%3Ccircle cx='119' cy='78' r='4'/%3E%3Ccircle cx='47' cy='44' r='3'/%3E%3C/g%3E%3C/svg%3E");
  --skm-decor-parcel: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 190 150'%3E%3Cg fill='none' stroke='white' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m78 58 39-20 39 20-39 20-39-20Zm0 0v45l39 21 39-21V58m-39 20v46m-20-76 39 20' stroke-width='3'/%3E%3Cpath d='M40 95c11 0 18 1 25 7m-8-15 9 15-16 5M164 40c-10-8-21-11-34-10m12-8-13 8 11 10' stroke-width='2.5'/%3E%3Cpath d='M38 51h24M45 62h18' stroke-width='2' stroke-dasharray='5 7'/%3E%3C/g%3E%3Cg fill='white'%3E%3Ccircle cx='39' cy='95' r='3'/%3E%3Ccircle cx='47' cy='40' r='2'/%3E%3Ccircle cx='171' cy='114' r='2.5'/%3E%3C/g%3E%3C/svg%3E");
  --skm-decor-paper-plane: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 190 150'%3E%3Cg fill='none' stroke='white' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m71 72 91-40-35 91-21-33-35-18Zm35 18 56-58M71 72l38 6' stroke-width='3'/%3E%3Cpath d='M29 112c20 12 43 11 62-1M35 95c-9 4-14 10-15 18' stroke-width='2.3' stroke-dasharray='6 7'/%3E%3C/g%3E%3Cg fill='white'%3E%3Ccircle cx='43' cy='45' r='3'/%3E%3Ccircle cx='55' cy='34' r='2'/%3E%3Cpath d='m145 117 2 5 5 2-5 2-2 5-2-5-5-2 5-2 2-5Z'/%3E%3C/g%3E%3C/svg%3E");
}
.card.has-bg { position: relative; overflow: hidden; }
.card.has-bg::before {
  content: "";
  position: absolute;
  right: -10px;
  bottom: -9px;
  width: 195px;
  height: 154px;
  background: linear-gradient(138deg, var(--red-2), var(--red) 72%, #f6b9b9);
  -webkit-mask-image: var(--decor-mask);
  mask-image: var(--decor-mask);
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
  opacity: 0.2;
  transform: rotate(-2deg);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.card.has-bg:hover::before {
  opacity: 0.31;
  transform: translate(-4px, -3px) rotate(-4deg) scale(1.04);
}
html.dark .card.has-bg::before { opacity: 0.12; }
html.dark .card.has-bg:hover::before { opacity: 0.22; }
.card.has-bg > * { position: relative; z-index: 1; }
.card-bg-greet { --decor-mask: var(--skm-decor-sun-cloud); }
.card-bg-welcome { --decor-mask: var(--skm-decor-blossom); }
.card-bg-hitokoto { --decor-mask: var(--skm-decor-quote); }
.card-bg-stats { --decor-mask: var(--skm-decor-constellation); }
.card-bg-info { --decor-mask: var(--skm-decor-window); }
.card-bg-music { --decor-mask: var(--skm-decor-orbit); }
.card-bg-cal { --decor-mask: var(--skm-decor-clock); }
.card-bg-cats { --decor-mask: var(--skm-decor-parcel); }
.card-bg-tags { --decor-mask: var(--skm-decor-paper-plane); }

/* ---------------- 右下角欢迎弹窗（仿 Aemeath WelcomeToast） ---------------- */
.welcome-toast {
  position: fixed;
  right: max(1.25rem, env(safe-area-inset-right));
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  z-index: 990;
  display: grid;
  width: min(24.5rem, calc(100vw - 2rem));
  padding: 16px 44px 16px 16px;
  border: 1px solid color-mix(in srgb, var(--red) 24%, transparent);
  border-radius: 16px;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 13px;
  background: color-mix(in srgb, var(--card) 90%, transparent);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  box-shadow:
    0 16px 40px rgba(15, 23, 42, 0.16),
    inset 0 1px rgba(255, 255, 255, 0.35);
  opacity: 0;
  pointer-events: none;
  transform: translateY(calc(100% + 32px)) scale(0.96);
  transition: opacity 320ms ease, transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}
.welcome-toast[data-state="visible"] {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.welcome-toast-icon {
  display: grid;
  width: 43px;
  height: 43px;
  border-radius: 13px;
  place-items: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.72), transparent 36%),
    linear-gradient(135deg, color-mix(in srgb, var(--red) 55%, white), var(--red));
  box-shadow: 0 10px 22px color-mix(in srgb, var(--red) 22%, transparent);
  color: #fff;
  font-size: 21px;
}
.welcome-toast-kicker {
  display: block;
  margin-bottom: 2px;
  color: var(--red);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
}
.welcome-toast-title {
  display: block;
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.42;
  overflow-wrap: anywhere;
}
.welcome-toast-message {
  margin: 4px 0 0;
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.58;
  overflow-wrap: anywhere;
}
.welcome-toast-close {
  position: absolute;
  top: 9px;
  right: 10px;
  display: grid;
  width: 27px;
  height: 27px;
  border: 0;
  border-radius: 999px;
  place-items: center;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 19px;
  line-height: 1;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}
.welcome-toast-close:hover {
  background: var(--red-soft);
  color: var(--red);
  transform: rotate(8deg);
}
@media (prefers-reduced-motion: reduce) {
  .welcome-toast { transition: opacity 120ms linear; transform: none; }
}
