/* ========== 变量：亮色 ========== */
:root {
  --bg-page: #eef0f4;          /* 背景图加载前/失败时的兜底（不是渐变） */
  --bg-card: #ffffff;
  --bg-side: #fafbfc;
  --bg-soft: #f4f5f8;
  --text: #1f2328;
  --text-soft: #6b7280;
  --text-faint: #9aa1ac;
  --border: #ececf1;
  --accent: #f97316;
  --accent-soft: #fff1e6;
  --shadow: 0 10px 40px rgba(30, 32, 50, .08);
  --radius-card: 20px;
  --radius-item: 12px;
  --hover: #f4f5f8;
}

/* ========== 变量：暗色 ========== */
html[data-theme="dark"] {
  --bg-page: #0e1014;
  --bg-card: #1a1c22;
  --bg-side: #16181d;
  --bg-soft: #22242b;
  --text: #e6e8ec;
  --text-soft: #9aa1ac;
  --text-faint: #6b7280;
  --border: #2a2d35;
  --accent: #fb923c;
  --accent-soft: #3a2417;
  --shadow: 0 10px 40px rgba(0, 0, 0, .4);
  --hover: #22242b;
}

/* ========== 基础 ========== */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg-page);
  background-image: var(--bg-image, none);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  transition: background-color .2s, color .2s;
}

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

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

/* ========== 大卡片布局 ========== */
.layout {
  max-width: 1120px;
  height: calc(100vh - 80px);
  margin: 40px auto;
  background: var(--bg-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  display: flex;
  overflow: hidden;
}

/* ========== 侧栏 ========== */
.sidebar {
  width: 260px;
  flex: 0 0 260px;
  background: var(--bg-side);
  border-right: 1px solid var(--border);
  padding: 24px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.sidebar::-webkit-scrollbar {
  display: none;
}

.profile { text-align: center; }

.avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 10px;
  border: 3px solid var(--bg-card);
  box-shadow: 0 4px 16px rgba(30, 32, 50, .1);
}

.site-name {
  font-size: 18px;
  margin: 0 0 6px;
  font-weight: 600;
}

.signature {
  margin: 0;
  font-size: 13px;
  color: var(--text-soft);
}

/* 外链图标 */
.links {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.links a {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: var(--text-soft);
  transition: background .15s, color .15s, transform .15s;
}
.links a:hover {
  background: var(--accent-soft);
  color: var(--accent);
  transform: translateY(-1px);
}
.links .link-label { display: none; }

/* 主导航 */
.menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.menu a {
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--text-soft);
  font-size: 14px;
  transition: background .15s, color .15s;
}
.menu a:hover { background: var(--hover); color: var(--text); }
.menu a.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 500;
}

/* LOGO */
.logo { margin-top: auto; padding-top: 20px; }
.logo img { width: 100%; border-radius: 8px; }

/* 侧栏底部 */
.sidebar-foot {
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-foot-tools {
  display: flex;
  gap: 4px;
}

.foot-text {
  font-size: 11.5px;
  color: var(--text-faint);
  line-height: 1.5;
  letter-spacing: .02em;
  word-break: break-word;
}
.theme-toggle {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--text-soft);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
}
.theme-toggle:hover { background: var(--hover); color: var(--accent); }
.theme-toggle .moon { display: none; }
html[data-theme="dark"] .theme-toggle .sun  { display: none; }
html[data-theme="dark"] .theme-toggle .moon { display: inline; }

.foot-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ========== 内容区 ========== */
.content {
  flex: 1;
  min-width: 0;
  padding: 40px;
  overflow-y: auto;
}

/* ========== 文章列表卡片（左图右文） ========== */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.post-card {
  display: flex;
  gap: 20px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-item);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.post-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(249, 115, 22, .12);
}

.post-card-cover {
  flex: 0 0 200px;
  width: 200px;
  height: 130px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--bg-soft);
}

.post-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.post-card-title {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-excerpt {
  color: var(--text-soft);
  font-size: 13.5px;
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-date {
  font-size: 12.5px;
  color: var(--text-faint);
}

/* 无封面：文字卡片 */
.post-card.no-cover { padding: 20px; }
.post-card.no-cover .post-card-title { margin-bottom: 6px; }

/* ========== 分页 ========== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 32px;
}
.pagination a,
.pagination span {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--text-soft);
  border: 1px solid var(--border);
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .current {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.pagination .disabled { opacity: .4; pointer-events: none; }

/* ========== 文章详情 ========== */
.post-header { margin-bottom: 28px; }

.post-banner {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: var(--radius-item);
  margin-bottom: 24px;
}

.post-title {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 10px;
  line-height: 1.35;
}

.post-meta {
  color: var(--text-faint);
  font-size: 13px;
}

/* Markdown 正文 */
.post-body { font-size: 15.5px; line-height: 1.85; }
.post-body h1, .post-body h2, .post-body h3 {
  margin: 1.6em 0 .6em;
  line-height: 1.35;
}
.post-body h2 { font-size: 20px; border-bottom: 1px solid var(--border); padding-bottom: .3em; }
.post-body h3 { font-size: 17px; }
.post-body p { margin: 0 0 1em; }
.post-body img { border-radius: 8px; margin: 1em auto; }
.post-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.post-body blockquote {
  margin: 1em 0;
  padding: 4px 16px;
  border-left: 3px solid var(--accent);
  background: var(--bg-soft);
  border-radius: 0 6px 6px 0;
  color: var(--text-soft);
}
.post-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9em;
  background: var(--bg-soft);
  padding: 2px 6px;
  border-radius: 4px;
}
.post-body pre {
  background: var(--bg-soft);
  padding: 14px 16px;
  border-radius: 8px;
  overflow-x: auto;
  line-height: 1.6;
}
.post-body pre code { background: none; padding: 0; }
.post-body hr { border: none; border-top: 1px solid var(--border); margin: 2em 0; }

/* 上一篇/下一篇 */
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 40px 0 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 13.5px;
}
.post-nav a { color: var(--text-soft); max-width: 45%; }
.post-nav a:hover { color: var(--accent); }
.post-nav .spacer { flex: 1; }

/* 邮件引导 */
.post-contact {
  padding: 16px 20px;
  background: var(--accent-soft);
  border-radius: var(--radius-item);
  font-size: 13.5px;
  color: var(--text-soft);
  text-align: center;
  margin-bottom: 20px;
}
.post-contact a { color: var(--accent); }

/* 表态 */
.reactions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.reaction {
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-soft);
  transition: all .15s;
  font-family: inherit;
}
.reaction:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.05);
}
.reaction:disabled { opacity: .6; cursor: default; transform: none; }
.reaction .count { font-size: 12.5px; }

/* ========== 画廊（瀑布流） ========== */
.masonry {
  column-count: 2;
  column-gap: 16px;
}
.masonry-item {
  break-inside: avoid;
  margin-bottom: 16px;
  border-radius: var(--radius-item);
  overflow: hidden;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  background: var(--bg-soft);
}
.masonry-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .15);
}
.masonry-item img { width: 100%; display: block; }

/* 灯箱 */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .88);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 40px 20px;
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox-inner {
  max-width: 960px;
  max-height: 100%;
  background: var(--bg-card);
  border-radius: var(--radius-item);
  overflow: auto;
  transform: scale(.95);
  transition: transform .25s cubic-bezier(.2, .8, .3, 1.05);
}
.lightbox.open .lightbox-inner {
  transform: scale(1);
}
.lightbox-inner img { width: 100%; max-height: 70vh; object-fit: contain; background: #000; }
.lightbox-text { padding: 20px 24px; }
.lightbox-title { font-size: 17px; font-weight: 600; margin: 0 0 8px; }
.lightbox-desc {
  color: var(--text-soft);
  font-size: 14px;
  margin: 0;
  line-height: 1.75;
  white-space: pre-wrap;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  border: none;
  font-size: 22px;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(255, 255, 255, .25); }

/* ========== 留言板 ========== */
.message-form {
  display: grid;
  gap: 10px;
  margin-bottom: 32px;
  padding: 20px;
  background: var(--bg-soft);
  border-radius: var(--radius-item);
}
.message-form input,
.message-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
}
.message-form input:focus,
.message-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.message-form textarea { min-height: 100px; resize: vertical; }
.message-form button {
  justify-self: flex-start;
  padding: 9px 24px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}
.message-form button:hover { opacity: .9; }
.message-form .row { display: flex; gap: 10px; }
.message-form .row input { flex: 1; }
.honeypot { position: absolute; left: -9999px; opacity: 0; }

.message-list { display: flex; flex-direction: column; gap: 16px; }
.message {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-item);
}
.message.admin { background: var(--accent-soft); border-color: transparent; }
.message-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
}
.message-nick { font-weight: 600; color: var(--text); }
.message-nick.is-admin { color: var(--accent); }
.message-time { color: var(--text-faint); font-size: 12px; }
.message-content {
  font-size: 14.5px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
}
.message-replies {
  margin-top: 12px;
  padding-left: 16px;
  border-left: 2px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ========== 轮播 ========== */
.carousel {
  position: relative;
  border-radius: var(--radius-item);
  overflow: hidden;
  background: var(--bg-soft);
}
.carousel-stage {
  position: relative;
  aspect-ratio: 16 / 8;
}
.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .6s ease;
  pointer-events: none;
}
.carousel-slide.active { opacity: 1; pointer-events: auto; }
.carousel-slide > a { display: block; width: 100%; height: 100%; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; }

.carousel-caption {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--border);
}
.carousel-text { flex: 1; min-width: 0; }
.carousel-title { font-size: 15px; font-weight: 600; margin: 0 0 4px; }
.carousel-desc { font-size: 13px; color: var(--text-soft); margin: 0; }
.carousel-btns { display: flex; gap: 6px; }
.carousel-btns button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-soft);
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.carousel-btns button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ========== 页面通用 ========== */
.page-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 24px;
}

.search-box {
  margin-bottom: 20px;
  display: flex;
  gap: 8px;
}
.search-box input {
  flex: 1;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
}
.search-box input:focus { outline: none; border-color: var(--accent); }
.search-box button {
  padding: 9px 18px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
}

.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-faint);
  font-size: 14px;
}

/* ========== 移动端顶栏（默认隐藏） ========== */
.mobile-bar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 100;
  height: 52px;
  padding: 0 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  align-items: center;
  gap: 14px;
}
.hamburger {
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
}
.mobile-title { font-weight: 600; font-size: 15px; }

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  z-index: 200;
}

/* ========== 响应式 ========== */
@media (max-width: 900px) {
  body { background-image: none !important; background: var(--bg-page); }

  .layout {
    height: auto;
    min-height: 100vh;
    overflow: visible;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    display: block;
  }

  .mobile-bar { display: flex; }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    max-height: 100vh;
    z-index: 300;
    transform: translateX(-100%);
    transition: transform .25s ease;
    border-right: 1px solid var(--border);
    border-radius: 0;
  }
  body.nav-open .sidebar { transform: translateX(0); }
  body.nav-open .overlay { display: block; }

  .content { padding: 24px 20px; }

  .masonry { column-count: 2; }
}

@media (max-width: 560px) {
  .post-card { flex-direction: column; gap: 12px; padding: 12px; }
  .post-card-cover { width: 100%; flex: none; height: 160px; }
  .masonry { column-count: 1; }
  .content { padding: 20px 16px; }
  .message-form .row { flex-direction: column; }
}

/* 灯箱：上一张 / 下一张 */
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background .15s, transform .15s;
}
.lightbox-nav:hover {
  background: rgba(255, 255, 255, .28);
}
.lightbox-nav.prev { left: 24px; }
.lightbox-nav.next { right: 24px; }

.lightbox-counter {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--text-faint);
  letter-spacing: .05em;
}

@media (max-width: 560px) {
  .lightbox-nav { width: 38px; height: 38px; }
  .lightbox-nav.prev { left: 8px; }
  .lightbox-nav.next { right: 8px; }
}

/* ========== 首页：轮播下方内容 ========== */
.home-section {
  margin-top: 20px;
}

.home-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-soft);
  margin: 0 0 10px;
  letter-spacing: .02em;
}

/* 站点介绍 —— 左侧文字 + 右侧图标 */
.home-intro-wrap {
  display: flex;
  align-items: center;
  gap: 24px;
}
.home-intro {
  flex: 1;
  min-width: 0;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--text);
  white-space: pre-wrap;
}
.home-intro-icon {
  flex: 0 0 100px;
  width: 100px;
  height: 100px;
  border-radius: var(--radius-item);
  object-fit: contain;
}

/* 统计区 */
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1.6fr;
  gap: 10px;
}

.stat {
  padding: 16px 14px;
  background: var(--bg-soft);
  border-radius: var(--radius-item);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stat-wide {
  padding: 16px 18px;
}

.stat-num {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
  word-break: keep-all;
}

.stat-num-lg {
  font-size: 26px;
  margin: 2px 0 2px;
}

.stat-label {
  font-size: 12.5px;
  color: var(--text-soft);
}

.stat-sub {
  font-size: 11.5px;
  color: var(--text-faint);
  margin-top: 2px;
  letter-spacing: .02em;
}

/* 更新记录 */
.update-log {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.update-log-row {
  padding: 10px 16px;
  background: var(--bg-soft);
  border-radius: var(--radius-item);
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text);
}
.update-log-row strong {
  color: var(--accent);
  font-weight: 600;
}

@media (max-width: 560px) {
  .stats {
    grid-template-columns: 1fr;
  }
}

/* ========== 404 页 ========== */
.page-404 {
  text-align: center;
  padding: 60px 20px;
}
.page-404-code {
  font-size: 88px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -.02em;
}
.page-404-msg {
  font-size: 15px;
  color: var(--text-soft);
  margin: 20px 0 32px;
}
.page-404-actions {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.page-404-link {
  padding: 9px 20px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13.5px;
  color: var(--text-soft);
  transition: border-color .15s, color .15s, background .15s;
}
.page-404-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

/* ========== 日记 ========== */
.diary-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.diary-entry {
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-item);
  background: var(--bg-soft);
}
.diary-date {
  font-size: 12.5px;
  color: var(--text-faint);
  margin-bottom: 10px;
  letter-spacing: .03em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.diary-body { font-size: 14.5px; }
.diary-body > :first-child { margin-top: 0; }
.diary-body > :last-child  { margin-bottom: 0; }

/* ========== 歌词墙 ========== */
.lyrics-wall {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.lyrics-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lyric-card {
  padding: 20px 22px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-item);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color .15s, transform .15s;
}
.lyric-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.lyric-head {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: .01em;
}
.lyric-body {
  font-size: 14px;
  line-height: 1.9;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}
.lyric-foot {
  text-align: right;
  font-size: 11.5px;
  color: var(--text-faint);
  letter-spacing: .04em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  margin-top: auto;
}

@media (max-width: 560px) {
  .lyrics-wall { display: block; }
  .lyrics-col  { display: contents; }   /* 手机上不分列，卡片跟着父级块流动 */
}

@media (max-width: 560px) {
  .home-intro-wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .home-intro-icon {
    flex: none;
    width: 72px;
    height: 72px;
    align-self: flex-end;   /* 小图靠右，像落款 */
  }
}

/* ========== 雪花特效 ========== */
#snow-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

/* 关闭状态图标淡一点，开启时点亮 */
.snow-toggle { opacity: .55; transition: opacity .15s, background .15s, color .15s; }
.snow-toggle:hover { opacity: 1; }
.snow-toggle.on { opacity: 1; }

/* ========== 滚动条美化 ========== */

/* Chrome / Safari / Edge */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(249, 115, 22, .35);
  border-radius: 5px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(249, 115, 22, .65);
  background-clip: padding-box;
}

/* Firefox */
html {
  scrollbar-width: thin;
  scrollbar-color: rgba(249, 115, 22, .5) transparent;
}

/* 暗色模式下稍微亮一点 */
html[data-theme="dark"] {
  scrollbar-color: rgba(251, 146, 60, .55) transparent;
}
html[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: rgba(251, 146, 60, .4);
  background-clip: padding-box;
}
html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(251, 146, 60, .7);
  background-clip: padding-box;
}