/* ============================================================
   铁锤小站 · 页面级样式（动漫少年风）
   ============================================================ */

main { position: relative; z-index: 1; }

/* ---------- 首页 Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(180deg, var(--sky1) 0%, var(--sky2) 100%);
  padding-top: 58px;
  overflow: hidden;
}
/* 挂在天边的太阳光晕（暗色主题里变成月亮光） */
.hero::before {
  content: "";
  position: absolute;
  top: -72px; right: 7%;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff9e0 0%, #ffe79a 46%, rgba(255, 231, 154, 0) 72%);
  pointer-events: none;
}
[data-theme="dark"] .hero::before {
  background: radial-gradient(circle, #e8ecff 0%, #aeb6e8 40%, rgba(174, 182, 232, 0) 70%);
  opacity: 0.5;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 34px;
  align-items: center;
  padding-bottom: 40px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 5px 16px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 3px 3px 0 var(--shadow-c);
}
.hero-title {
  font-family: var(--font-display);
  font-weight: normal;
  font-size: clamp(36px, 5.2vw, 56px);
  line-height: 1.3;
  margin: 20px 0 8px;
}
.hero-name {
  position: relative;
  display: inline-block;
  color: var(--blue-deep);
  padding: 0 4px;
}
[data-theme="dark"] .hero-name { color: var(--blue); }
.hero-name .squiggle {
  position: absolute;
  left: 0; bottom: -6px;
  width: 100%; height: 14px;
  overflow: visible;
}
.hero-sub {
  font-size: 16.5px;
  color: var(--ink-soft);
  max-width: 520px;
  line-height: 2;
}
.hero-sub b { color: var(--ink); }
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero-socials { display: flex; gap: 10px; margin-top: 24px; }
.social-dot {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--card);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  text-decoration: none;
  box-shadow: 2px 2px 0 var(--shadow-c);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.social-dot:hover { transform: translate(-2px, -3px) rotate(-6deg); box-shadow: 4px 5px 0 var(--shadow-c); }

.hero-art { position: relative; display: flex; justify-content: center; padding: 10px 0 30px; }
.hero-blob {
  width: min(330px, 78%);
  aspect-ratio: 1;
  background: var(--blob-bg);
  border: 3px solid var(--ink);
  border-radius: 46% 54% 52% 48% / 50% 46% 54% 50%;
  box-shadow: 9px 9px 0 var(--shadow-c);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: blobFloat 5.5s ease-in-out infinite;
}
.mascot-lg { width: 74%; display: block; }
.mascot-lg svg { width: 100%; height: auto; }
.float-emoji {
  position: absolute;
  font-size: 30px;
  animation: floaty 5s ease-in-out infinite;
  filter: drop-shadow(2px 3px 0 rgba(0, 0, 0, 0.1));
  z-index: 2;
}
.float-emoji.e1 { top: -4px; right: 8%; animation-delay: 0.2s; }
.float-emoji.e2 { top: 34%; left: 0; animation-delay: 1s; }
.float-emoji.e3 { bottom: 10%; right: -4px; animation-delay: 1.6s; }
.float-emoji.e4 { bottom: -6px; left: 16%; font-size: 24px; animation-delay: 0.6s; }
.float-emoji.e5 { top: -18px; left: 24%; font-size: 26px; animation-delay: 1.3s; }

.hero-wave { display: block; width: 100%; height: 64px; }
.hero-wave path { fill: var(--bg); }

@keyframes blobFloat {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50%      { transform: translateY(-14px) rotate(1.5deg); }
}

/* 少年挥锤的手臂（握着小铁锤一起挥手） */
.mascot .paw {
  transform-box: view-box;
  transform-origin: 168px 186px;
  animation: wave 2.4s ease-in-out infinite;
}
@keyframes wave {
  0%, 100% { transform: rotate(4deg); }
  50%      { transform: rotate(-14deg); }
}

/* ---------- 统计条 ---------- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 34px;
}
.stat-pill {
  display: flex;
  align-items: center;
  gap: 13px;
  background: var(--card);
  border: 2.5px solid var(--ink);
  border-radius: 18px;
  box-shadow: 5px 5px 0 var(--shadow-c);
  padding: 14px 18px;
}
.stat-icon {
  width: 46px; height: 46px;
  border-radius: 14px;
  border: 2px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  flex-shrink: 0;
}
.stat-pill:nth-child(1) .stat-icon { background: var(--blue-soft); }
.stat-pill:nth-child(2) .stat-icon { background: var(--yellow-soft); }
.stat-pill:nth-child(3) .stat-icon { background: var(--mint-soft); }
.stat-pill:nth-child(4) .stat-icon { background: var(--orange-soft); }
.stat-num { font-family: var(--font-display); font-size: 25px; line-height: 1.2; }
.stat-label { font-size: 12.5px; color: var(--ink-soft); }

/* ---------- 区块标题 ---------- */
.section { padding: 36px 0 6px; }
.section-head {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 22px;
}
.section-ico {
  width: 44px; height: 44px;
  border-radius: 14px;
  background: var(--yellow-soft);
  border: 2.5px solid var(--ink);
  box-shadow: 3px 3px 0 var(--shadow-c);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transform: rotate(-6deg);
  flex-shrink: 0;
}
.section-head h2 { font-family: var(--font-display); font-weight: normal; font-size: 28px; }
.section-head .more {
  margin-left: auto;
  font-size: 14px;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 2px dashed transparent;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.section-head .more:hover { color: var(--blue-deep); border-bottom-color: var(--blue-deep); }

/* ---------- 文章卡片 ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}
.post-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 2.5px solid var(--ink);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 6px 6px 0 var(--shadow-c);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.post-card:hover {
  transform: translate(-4px, -5px) rotate(-0.4deg);
  box-shadow: 11px 12px 0 var(--shadow-c);
}
.post-cover {
  position: relative;
  height: 138px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.post-cover .cover-emoji {
  font-size: 56px;
  filter: drop-shadow(0 5px 0 rgba(0, 0, 0, 0.12));
  transition: transform 0.3s ease;
}
.post-card:hover .cover-emoji { transform: scale(1.18) rotate(-8deg); }
.post-cover::before, .post-cover::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
}
.post-cover::before { width: 46px; height: 46px; left: 10%; top: -12px; }
.post-cover::after { width: 30px; height: 30px; right: 12%; bottom: -8px; }
.cover-chip { position: absolute; top: 12px; left: 12px; }
.featured-badge {
  position: absolute;
  top: 12px; right: 12px;
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 2px 11px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.14);
}
.post-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.post-title {
  font-family: var(--font-display);
  font-weight: normal;
  font-size: 19.5px;
  line-height: 1.5;
}
.post-excerpt {
  font-size: 13.8px;
  color: var(--ink-soft);
  line-height: 1.85;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 13px;
  font-size: 12.5px;
  color: var(--ink-soft);
}
.post-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }

/* ---------- 分类卡片 ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}
.cat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 2.5px solid var(--ink);
  border-radius: 20px;
  padding: 18px 20px;
  text-decoration: none;
  color: var(--ink);
  box-shadow: 5px 5px 0 var(--shadow-c);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.cat-card:hover { transform: translate(-3px, -4px); box-shadow: 9px 9px 0 var(--shadow-c); }
.cat-card .cat-emoji { font-size: 30px; filter: drop-shadow(1px 2px 0 rgba(0,0,0,.12)); }
.cat-name { display: block; font-family: var(--font-display); font-size: 18px; line-height: 1.4; }
.cat-desc { display: block; font-size: 12.5px; color: var(--ink-soft); }
.cat-count {
  margin-left: auto;
  font-family: var(--font-display);
  font-size: 20px;
  opacity: 0.75;
  flex-shrink: 0;
}
.cat-card.c-blue   { background: var(--blue-soft); }
.cat-card.c-mint   { background: var(--mint-soft); }
.cat-card.c-orange { background: var(--orange-soft); }
.cat-card.c-pink   { background: var(--pink-soft); }
.cat-card.c-purple { background: var(--purple-soft); }

/* ---------- 每日一句 ---------- */
.quote-card {
  position: relative;
  background: var(--card);
  border: 2.5px solid var(--ink);
  border-radius: 24px;
  padding: 30px 56px 26px;
  text-align: center;
  box-shadow: var(--inset-top), 6px 6px 0 var(--shadow-c);
}
/* 便利贴胶带 */
.quote-card::before {
  content: "";
  position: absolute;
  top: -11px; left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  width: 132px; height: 24px;
  background: var(--blue-soft);
  border: 2px solid var(--ink);
  border-radius: 6px;
  box-shadow: 2px 2px 0 var(--shadow-c);
  pointer-events: none;
}
.quote-mark { font-family: var(--font-display); font-size: 30px; color: var(--blue); line-height: 1; }
.quote-text { font-family: var(--font-display); font-size: 20px; line-height: 1.9; margin-top: 4px; }
.quote-from { margin-top: 10px; font-size: 13px; color: var(--ink-soft); }
.quote-refresh { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; font-size: 16px; }

/* ---------- 子页面头部 ---------- */
.page-hero {
  text-align: center;
  padding: 46px 0 26px;
  background:
    radial-gradient(var(--pix) 1.6px, transparent 1.7px),
    linear-gradient(180deg, var(--sky1) 0%, var(--sky2) 100%);
  background-size: 28px 28px, auto;
  border-bottom: 2.5px solid var(--ink);
  position: relative;
  overflow: hidden;
}
/* 动漫式闪光星（キラッ☆） */
.page-hero::before,
.page-hero::after {
  content: "";
  position: absolute;
  width: 24px; height: 24px;
  background: var(--yellow);
  clip-path: polygon(50% 0%, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0% 50%, 40% 40%);
  filter: drop-shadow(0 0 6px rgba(255, 198, 46, 0.5));
  animation: twinkle 2.8s ease-in-out infinite;
  pointer-events: none;
}
.page-hero::before { right: 13%; top: 18px; }
.page-hero::after { left: 10%; bottom: 22px; animation-delay: -1.4s; }
.page-hero h1 {
  font-family: var(--font-display);
  font-weight: normal;
  font-size: 34px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-shadow: var(--title-pop);
  position: relative;
}
.page-hero h1 .ph-ico {
  display: inline-flex;
  width: 46px; height: 46px;
  border-radius: 14px;
  background: var(--card);
  border: 2.5px solid var(--ink);
  box-shadow: 3px 3px 0 var(--shadow-c);
  align-items: center;
  justify-content: center;
  font-size: 22px;
  transform: rotate(-6deg);
}
.page-hero p { color: var(--ink-soft); font-size: 14.5px; margin-top: 10px; }

/* ---------- 博客列表页 ---------- */
.toolbar { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin: 30px 0 18px; }
.search-box { position: relative; flex: 1; min-width: 240px; }
.search-box .input { border-radius: 999px; padding-left: 44px; height: 46px; }
.search-ico {
  position: absolute;
  left: 16px; top: 50%;
  transform: translateY(-50%);
  font-size: 17px;
  pointer-events: none;
}
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.filter-chip {
  padding: 6px 17px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: var(--card);
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 600;
  transition: all 0.18s ease;
}
.filter-chip:hover { border-color: var(--ink); color: var(--ink); transform: translateY(-2px); }
.filter-chip.active {
  background: var(--blue);
  border-color: var(--ink);
  color: #fff;
  box-shadow: 2px 2px 0 var(--shadow-c);
}
[data-theme="dark"] .filter-chip.active { color: #0e2148; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 26px; }
.tag-cloud .tag-mini { cursor: pointer; font-size: 13px; padding: 3px 13px; }
.tag-cloud .tag-mini.active {
  background: var(--yellow-soft);
  border-color: var(--ink);
  color: var(--ink);
  font-weight: 700;
}
.result-count { font-size: 13.5px; color: var(--ink-soft); margin-bottom: 16px; }
.result-count b { color: var(--blue-deep); font-size: 15px; }
[data-theme="dark"] .result-count b { color: var(--blue); }
.empty-state { text-align: center; padding: 70px 20px; color: var(--ink-soft); }
.empty-state .big { font-size: 70px; display: inline-block; animation: floaty 3s ease-in-out infinite; }
.empty-state h3 { font-family: var(--font-display); font-weight: normal; font-size: 22px; color: var(--ink); margin-bottom: 6px; }

/* ---------- 文章详情页 ---------- */
.post-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 252px;
  gap: 26px;
  align-items: start;
  margin-top: 30px;
}
.article-card {
  background: var(--card);
  border: 2.5px solid var(--ink);
  border-radius: 24px;
  box-shadow: 7px 7px 0 var(--shadow-c);
  overflow: hidden;
}
.article-banner {
  height: 148px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.article-banner .cover-emoji {
  font-size: 62px;
  filter: drop-shadow(0 6px 0 rgba(0, 0, 0, 0.13));
  animation: floaty 4.5s ease-in-out infinite;
}
.article-banner .cover-chip { top: 16px; left: 16px; }
.article-banner .banner-date {
  position: absolute;
  right: 16px; bottom: 12px;
  font-size: 12.5px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.75);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 2px 12px;
  font-weight: 600;
}
[data-theme="dark"] .article-banner .banner-date { background: rgba(24, 30, 58, 0.72); color: var(--ink); }
.article-head { padding: 26px 32px 6px; }
.article-head h1 {
  font-family: var(--font-display);
  font-weight: normal;
  font-size: 29px;
  line-height: 1.5;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin: 14px 0 6px;
  font-size: 13px;
  color: var(--ink-soft);
}
.article-meta .meta-item { display: inline-flex; align-items: center; gap: 5px; }
.article-body { padding: 12px 32px 26px; font-size: 16px; line-height: 2; }
.article-body p { margin: 14px 0; }
.article-body h2 {
  font-family: var(--font-display);
  font-weight: normal;
  font-size: 24px;
  margin: 34px 0 16px;
  position: relative;
  padding-bottom: 8px;
  scroll-margin-top: 90px;
}
.article-body h2::after {
  content: "";
  position: absolute;
  left: 2px; bottom: 0;
  width: 62px; height: 9px;
  border-radius: 4px;
  border: 1.5px solid var(--ink);
  background: linear-gradient(90deg, var(--blue), var(--yellow), var(--orange));
}
.article-body h3 {
  font-family: var(--font-display);
  font-weight: normal;
  font-size: 19px;
  margin: 26px 0 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  scroll-margin-top: 90px;
}
.article-body h3::before {
  content: "";
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--blue);
  border: 2px solid var(--ink);
  flex-shrink: 0;
}
.article-body a {
  color: var(--blue-deep);
  text-decoration: none;
  border-bottom: 2px dashed var(--blue);
}
[data-theme="dark"] .article-body a { color: var(--blue); }
.article-body a:hover { border-bottom-style: solid; }
.article-body blockquote {
  margin: 20px 0;
  padding: 14px 22px;
  background: var(--quote-bg);
  border-left: 5px solid var(--yellow);
  border-radius: 6px 18px 18px 6px;
}
.article-body blockquote p { margin: 6px 0; }
.article-body code {
  background: var(--code-inline-bg);
  color: var(--blue-deep);
  padding: 2px 9px;
  border-radius: 8px;
  font-size: 0.86em;
  font-family: Consolas, "JetBrains Mono", "Courier New", monospace;
  word-break: break-word;
}
[data-theme="dark"] .article-body code { color: var(--blue); }
.article-body pre {
  background: linear-gradient(180deg, #232b52 0%, #1a2040 100%);
  color: #e8edff;
  padding: 18px 22px;
  border-radius: 16px;
  border: 2.5px solid var(--ink);
  box-shadow: 4px 4px 0 var(--shadow-c);
  overflow: auto;
  margin: 20px 0;
  font-size: 13.8px;
  line-height: 1.8;
}
[data-theme="dark"] .article-body pre {
  background: linear-gradient(180deg, #1c2342 0%, #141933 100%);
}
.article-body pre code {
  background: none;
  color: inherit;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}
.tok-k { color: #8fbaff; }
.tok-s { color: #9ff0c4; }
.tok-c { color: #8b93bd; font-style: italic; }
.tok-n { color: #ffd98a; }
.article-body ul, .article-body ol { padding-left: 26px; margin: 14px 0; }
.article-body li { margin: 7px 0; }
.article-body li::marker { color: var(--blue-deep); font-weight: 700; }
.article-body li.task { list-style: none; margin-left: -24px; display: flex; gap: 9px; align-items: flex-start; }
.article-body li.task .cb {
  width: 19px; height: 19px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--card);
  flex-shrink: 0;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #1c8a6a;
  font-weight: 900;
}
.article-body li.task.done .cb { background: var(--mint); }
.article-body li.task.done span { color: var(--ink-soft); text-decoration: line-through; text-decoration-color: var(--pink); }
.article-body table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 20px 0;
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  overflow: hidden;
  font-size: 14.3px;
  line-height: 1.7;
}
.article-body th {
  background: var(--blue-soft);
  font-family: var(--font-display);
  font-weight: normal;
  text-align: left;
  font-size: 15px;
}
.article-body th, .article-body td { padding: 10px 15px; border-bottom: 2px solid var(--line); }
.article-body tr:last-child td { border-bottom: none; }
.article-body tbody tr:hover td { background: var(--bg-soft); }
.article-body hr { border: none; border-top: 2.5px dashed var(--line); margin: 30px 0; }
.article-body img { border-radius: 14px; border: 2px solid var(--ink); margin: 8px 0; }

.article-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 18px 32px;
  border-top: 2px dashed var(--line);
}
.article-bar .post-tags { margin: 0; }
.bar-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  border-radius: 999px;
  border: 2.5px solid var(--ink);
  background: var(--pink-soft);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 16px;
  box-shadow: 3px 3px 0 var(--shadow-c);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.like-btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--shadow-c); }
.like-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--shadow-c); }
.like-btn.liked {
  background: linear-gradient(180deg, #ff8ba0 0%, #f04a68 100%);
  color: #fff;
  text-shadow: 0 1px 0 rgba(170, 20, 50, 0.3);
  animation: pop 0.45s ease;
}
[data-theme="dark"] .like-btn.liked { color: #45101d; text-shadow: none; }
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 2.5px solid var(--ink);
  background: var(--card);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 3px 3px 0 var(--shadow-c);
  transition: transform 0.18s ease;
}
.share-btn:hover { transform: translate(-2px, -2px); }

.author-card {
  margin: 0 32px 28px;
  padding: 18px 22px;
  border: 2.5px dashed var(--line);
  border-radius: 18px;
  background: var(--bg-soft);
  display: flex;
  gap: 16px;
  align-items: center;
}
.author-avatar {
  width: 62px; height: 62px;
  border-radius: 50%;
  border: 2.5px solid var(--ink);
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 3px 3px 0 var(--shadow-c);
}
.author-avatar svg { width: 50px; height: auto; }
.author-name { font-family: var(--font-display); font-size: 18px; }
.author-bio { font-size: 13px; color: var(--ink-soft); line-height: 1.7; }

/* 目录 TOC */
.toc {
  position: sticky;
  top: 92px;
  background: var(--card);
  border: 2.5px solid var(--ink);
  border-radius: 20px;
  padding: 16px 14px;
  box-shadow: 5px 5px 0 var(--shadow-c);
  max-height: calc(100vh - 120px);
  overflow: auto;
}
.toc h3 {
  font-family: var(--font-display);
  font-weight: normal;
  font-size: 16.5px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 8px 10px;
  border-bottom: 2px dashed var(--line);
  margin-bottom: 10px;
}
.toc a {
  display: block;
  font-size: 13.3px;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 10px;
  border-left: 3px solid transparent;
  line-height: 1.55;
  transition: all 0.18s ease;
}
.toc a.lv3 { padding-left: 22px; font-size: 12.8px; }
.toc a:hover { color: var(--ink); background: var(--bg-soft); }
.toc a.active {
  background: var(--blue-soft);
  color: var(--ink);
  font-weight: 700;
  border-left-color: var(--blue-deep);
}

/* 评论区 */
.comments { padding: 4px 32px 30px; border-top: 2px dashed var(--line); }
.comments-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 24px 0 16px;
  font-family: var(--font-display);
  font-weight: normal;
  font-size: 22px;
}
.comments-count {
  font-family: var(--font-body);
  font-size: 12.5px;
  background: var(--blue-soft);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 1px 11px;
  font-weight: 700;
}
.comment-form {
  background: var(--bg-soft);
  border: 2px dashed var(--line);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.form-row { display: flex; gap: 10px; flex-wrap: wrap; }
.form-row .input { flex: 1; min-width: 150px; max-width: 230px; }
.emoji-pick { display: flex; gap: 7px; flex-wrap: wrap; }
.emoji-opt {
  width: 37px; height: 37px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--card);
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.emoji-opt:hover { transform: scale(1.12); }
.emoji-opt.active {
  border-color: var(--ink);
  background: var(--yellow-soft);
  box-shadow: 2px 2px 0 var(--shadow-c);
  transform: scale(1.12);
}
.comment-list { margin-top: 22px; display: flex; flex-direction: column; gap: 16px; }
.comment { display: flex; gap: 13px; }
.comment-avatar {
  width: 45px; height: 45px;
  border-radius: 50%;
  border: 2.5px solid var(--ink);
  background: var(--blue-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  flex-shrink: 0;
  box-shadow: 2px 2px 0 var(--shadow-c);
}
.comment-bubble {
  flex: 1;
  min-width: 0;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 4px 18px 18px 18px;
  padding: 12px 17px;
  box-shadow: 3px 3px 0 var(--shadow-c);
}
.comment-head { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-soft); }
.comment-name { font-weight: 700; color: var(--ink); font-size: 14.5px; }
.comment-del {
  margin-left: auto;
  border: none;
  background: none;
  font-size: 14px;
  opacity: 0.45;
  transition: opacity 0.15s ease;
}
.comment-del:hover { opacity: 1; }
.comment-text { margin-top: 5px; font-size: 14.3px; line-height: 1.85; word-break: break-word; }

/* 上一篇/下一篇 */
.pn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 26px; }
.pn-card {
  background: var(--card);
  border: 2.5px solid var(--ink);
  border-radius: 18px;
  padding: 15px 19px;
  text-decoration: none;
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--shadow-c);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-width: 0;
}
.pn-card:hover { transform: translate(-2px, -4px); box-shadow: 7px 7px 0 var(--shadow-c); }
.pn-card.next { text-align: right; }
.pn-card .pn-label { font-size: 12px; color: var(--ink-soft); display: block; margin-bottom: 4px; }
.pn-card .pn-title {
  font-family: var(--font-display);
  font-size: 15.5px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pn-card.disabled { opacity: 0.4; pointer-events: none; }

/* 404 状态 */
.notfound { text-align: center; padding: 80px 20px 90px; }
.notfound .big { font-size: 70px; display: inline-block; animation: floaty 3s ease-in-out infinite; }
.notfound h2 { font-family: var(--font-display); font-weight: normal; font-size: 26px; margin: 18px 0 8px; }
.notfound p { color: var(--ink-soft); margin-bottom: 24px; }

/* ---------- 归档时间轴 ---------- */
.archive-wrap { max-width: 820px; margin: 34px auto 0; }
.year-block { margin-bottom: 34px; }
.year-head {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: normal;
  font-size: 25px;
  background: var(--card);
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  padding: 5px 26px;
  box-shadow: 4px 4px 0 var(--shadow-c);
  margin-bottom: 20px;
}
.year-head .y-count { font-family: var(--font-body); font-size: 13px; color: var(--ink-soft); }
.tl-list {
  border-left: 3px dashed var(--line);
  margin-left: 16px;
  padding-left: 34px;
}
.tl-item { position: relative; padding: 11px 0; }
.tl-item::before {
  content: attr(data-emoji);
  position: absolute;
  left: -50px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px; height: 34px;
  background: var(--card);
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  box-shadow: 2px 2px 0 var(--shadow-c);
  transition: transform 0.2s ease;
}
.tl-item:hover::before { transform: translateY(-50%) scale(1.2) rotate(-10deg); }
.tl-line { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.tl-date { font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.tl-title {
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  border-bottom: 2px dashed transparent;
  transition: all 0.18s ease;
}
.tl-title:hover { color: var(--blue-deep); border-bottom-color: var(--blue-deep); }
.tl-cat { margin-left: auto; }

/* ---------- 关于我 ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 296px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin-top: 30px;
}
.panel {
  background: var(--card);
  border: 2.5px solid var(--ink);
  border-radius: 22px;
  box-shadow: 6px 6px 0 var(--shadow-c);
  padding: 26px;
}
.profile-card { position: sticky; top: 92px; text-align: center; }
.profile-avatar {
  width: 118px; height: 118px;
  border-radius: 50%;
  border: 3px solid var(--ink);
  background: var(--blob-bg);
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 5px 5px 0 var(--shadow-c);
}
.profile-avatar svg { width: 82%; height: auto; }
.profile-name { font-family: var(--font-display); font-size: 24px; }
.profile-motto { font-size: 13px; color: var(--ink-soft); margin: 4px 0 14px; }
.profile-badges { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; }
.contact-list { margin-top: 20px; display: flex; flex-direction: column; gap: 9px; }
.contact-item {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 13.8px;
  color: var(--ink);
  text-decoration: none;
  padding: 10px 14px;
  border: 2px solid var(--line);
  border-radius: 13px;
  transition: all 0.18s ease;
}
.contact-item:hover { border-color: var(--ink); background: var(--blue-soft); transform: translateX(4px); }
.contact-item .ci-ico { font-size: 17px; }
.contact-item .ci-label { font-weight: 700; }
.contact-item .ci-val { color: var(--ink-soft); font-size: 12.5px; margin-left: auto; }

.skills .skill { margin: 17px 0; }
.skill-top { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 7px; }
.skill-top b { font-weight: 700; }
.skill-top .skill-pct { color: var(--ink-soft); font-size: 13px; }
.skill-bar {
  height: 17px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--card);
  overflow: hidden;
}
.skill-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background-color: var(--sk, var(--blue));
  background-image: repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.4) 0 7px, transparent 7px 14px);
  transition: width 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

.mini-timeline { border-left: 3px dashed var(--line); margin-left: 8px; padding-left: 26px; }
.mini-tl-item { position: relative; padding: 8px 0 14px; }
.mini-tl-item::before {
  content: "";
  position: absolute;
  left: -36.5px;
  top: 16px;
  width: 15px; height: 15px;
  border-radius: 50%;
  border: 2.5px solid var(--ink);
  background: var(--blue);
  box-shadow: 0 0 0 3px var(--bg);
}
.mini-tl-item .mt-year { font-family: var(--font-display); font-size: 17px; margin-right: 8px; }
.mini-tl-item .mt-text { font-size: 14px; color: var(--ink-soft); }

.facts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-top: 16px; }
.fact-card {
  background: var(--bg-soft);
  border: 2px solid var(--ink);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  gap: 11px;
  align-items: center;
  box-shadow: 3px 3px 0 var(--shadow-c);
}
.fact-card .f-ico { font-size: 24px; }
.fact-card .f-title { font-size: 13px; color: var(--ink-soft); display: block; }
.fact-card .f-val { font-family: var(--font-display); font-size: 17px; }

/* ---------- 留言板 ---------- */
.gb-form-panel { margin-top: 30px; }
.gb-form { display: flex; flex-direction: column; gap: 13px; }
.gb-form .form-row .input { max-width: 240px; }
.gb-form .form-row { align-items: center; }
.emoji-pick-label { font-size: 13.5px; color: var(--ink-soft); font-weight: 600; }
.gb-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 18px;
  margin-top: 26px;
}
.gb-card {
  background: var(--card);
  border: 2.5px solid var(--ink);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 5px 5px 0 var(--shadow-c);
  position: relative;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  transform: rotate(-0.6deg);
}
.gb-card:nth-child(even) { transform: rotate(0.6deg); }
.gb-card:hover { transform: rotate(0) translate(-2px, -4px); box-shadow: 9px 9px 0 var(--shadow-c); }
.gb-head { display: flex; align-items: center; gap: 11px; }
.gb-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 2.5px solid var(--ink);
  background: var(--blue-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.gb-name { font-weight: 700; font-size: 14.5px; }
.gb-time { font-size: 12px; color: var(--ink-soft); }
.gb-floor {
  position: absolute;
  top: 14px; right: 44px;
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 700;
}
.gb-del {
  position: absolute;
  top: 10px; right: 10px;
  border: none;
  background: none;
  font-size: 14px;
  opacity: 0.4;
}
.gb-del:hover { opacity: 1; }
.gb-text { margin-top: 11px; font-size: 14.2px; line-height: 1.85; color: var(--ink); word-break: break-word; }
.gb-card.sticker { background: var(--blue-soft); }
.gb-card.sticker:nth-child(3n) { background: var(--yellow-soft); }
.gb-card.sticker:nth-child(4n) { background: var(--mint-soft); }
[data-theme="dark"] .gb-card.sticker { background: var(--blue-soft); }
[data-theme="dark"] .gb-card.sticker:nth-child(3n) { background: var(--yellow-soft); }
[data-theme="dark"] .gb-card.sticker:nth-child(4n) { background: var(--mint-soft); }

/* ---------- 赛璐璐受光：扁平面板顶部微光 ---------- */
.post-card, .stat-pill, .cat-card, .article-card, .panel, .gb-card, .pn-card,
.fact-card, .year-head, .toc, .admin-card, .login-card, .admin-side {
  box-shadow: var(--inset-top), 5px 5px 0 var(--shadow-c);
}
.post-card:hover, .cat-card:hover, .gb-card:hover, .pn-card:hover {
  box-shadow: var(--inset-top), 9px 9px 0 var(--shadow-c);
}

/* ---------- 响应式 ---------- */
@media (max-width: 1000px) {
  .post-wrap { grid-template-columns: 1fr; }
  .toc { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .profile-card { position: static; }
}
@media (max-width: 880px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; padding-bottom: 10px; }
  .hero-sub { margin: 0 auto; }
  .hero-btns, .hero-socials { justify-content: center; }
  .hero-art { order: -1; padding-bottom: 0; }
  .hero-blob { width: min(240px, 64%); }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .quote-card { padding: 26px 22px; }
  .quote-refresh { position: static; margin-top: 12px; }
  .article-head, .article-body, .comments, .article-bar { padding-left: 20px; padding-right: 20px; }
  .author-card { margin-left: 20px; margin-right: 20px; }
  .pn-grid { grid-template-columns: 1fr; }
  .pn-card.next { text-align: left; }
  .tl-item::before { left: -46px; }
  .page-hero h1 { font-size: 27px; }
}
@media (max-width: 560px) {
  .card-grid { grid-template-columns: 1fr; }
  .stats-row { gap: 10px; }
  .stat-pill { padding: 11px 13px; }
  .stat-icon { width: 40px; height: 40px; font-size: 18px; }
  .stat-num { font-size: 21px; }
  .article-head h1 { font-size: 23px; }
  .article-body { font-size: 15px; }
  .article-body pre { font-size: 12.5px; padding: 14px 16px; }
  .gb-list { grid-template-columns: 1fr; }
  .hero-title { font-size: 34px; }
}
