/* ============================================================
   快乐万事屋 · 温馨杂货铺风
   奶油纸底 + 柿子橙点缀 + 和纸胶带手帐卡片 + 木质挂牌
   ============================================================ */

:root {
  --paper:        #FAF3E7;
  --paper-deep:   #F1E4CC;
  --card:         #FFFDF7;
  --kraft:        #F6E7C9;
  --ink:          #4A3B2C;
  --ink-soft:     #8A7562;
  --ink-faint:    rgba(74, 59, 44, .55);
  --accent:       #E07A2F;
  --accent-deep:  #C05F17;
  --green:        #7E9B6E;
  --pink:         #E8A09A;
  --blue:         #9DB8C4;
  --wood-1:       #C09060;
  --wood-2:       #9C6B3F;
  --wood-3:       #7E5330;
  --footer-bg:    #463826;
  --cream:        #FFEBCC;
  --shadow-card:  0 2px 0 rgba(74, 59, 44, .08), 0 10px 24px -12px rgba(74, 59, 44, .28);
  --shadow-pop:   0 4px 0 rgba(74, 59, 44, .08), 0 18px 34px -14px rgba(74, 59, 44, .38);

  --font-display: 'ZCOOL KuaiLe', 'Kaiti SC', 'STKaiti', 'KaiTi', 'Noto Serif SC', serif;
  --font-body:    'Noto Serif SC', 'Songti SC', 'SimSun', serif;
  --font-hand:    'Caveat', 'Segoe Script', 'Kaiti SC', 'KaiTi', cursive;
}
/* 字体说明：不再加载 Google Fonts（大陆不可达 + CSP 收紧），全部走本地字体栈。
 * 如需恢复 Web 字体：下载 woff2 到 css/fonts/ 并用 @font-face 自托管。 */

* { margin: 0; padding: 0; box-sizing: border-box; }

[hidden] { display: none !important; } /* 防止显式 display 规则压过 hidden 属性（如 .load-more-btn / .notes-more） */

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(rgba(74, 59, 44, .055) 1px, transparent 1.2px);
  background-size: 22px 22px;
  line-height: 1.75;
  overflow-x: hidden;
}

section { scroll-margin-top: 84px; }

::selection { background: var(--accent); color: #fff; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--paper-deep); }
::-webkit-scrollbar-thumb { background: var(--wood-2); border-radius: 6px; border: 2px solid var(--paper-deep); }

img, svg { display: block; }
a { color: inherit; }

/* ============ 顶部招牌导航 ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px clamp(16px, 5vw, 48px);
  background: rgba(250, 243, 231, .92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 2px dashed rgba(74, 59, 44, .18);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-badge {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  font-size: 22px;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 12px;
  box-shadow: 2px 2px 0 var(--ink);
  transform: rotate(-6deg);
  transition: transform .3s ease;
}

.logo:hover .logo-badge { transform: rotate(6deg) scale(1.06); }

.logo-text {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 1px;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  white-space: nowrap;
}

.logo-en {
  font-family: var(--font-hand);
  font-size: 13px;
  letter-spacing: 3px;
  color: var(--accent);
}

.site-nav { display: flex; gap: clamp(10px, 2.5vw, 28px); }

.site-nav a {
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  color: var(--ink-soft);
  padding: 4px 2px;
  border-bottom: 2px dashed transparent;
  transition: color .25s ease, border-color .25s ease;
  white-space: nowrap;
}

.site-nav a:hover {
  color: var(--accent-deep);
  border-bottom-color: var(--accent);
}

/* ============ Hero 欢迎区 ============ */
.hero {
  position: relative;
  padding: clamp(64px, 10vw, 120px) 24px clamp(72px, 9vw, 110px);
  text-align: center;
}

.hero-watermark {
  position: absolute;
  top: 34px;
  left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  font-family: var(--font-hand);
  font-size: clamp(80px, 16vw, 190px);
  color: rgba(224, 122, 47, .07);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

.doodle {
  position: absolute;
  color: var(--accent);
  opacity: .8;
  pointer-events: none;
}

.doodle-sun {
  width: 74px;
  top: 12%;
  left: 8%;
  color: #E9A23B;
}

.sun-rays { transform-origin: 50px 50px; animation: spin 26s linear infinite; }

@keyframes spin { to { transform: rotate(360deg); } }

.doodle-cloud {
  width: 110px;
  top: 54%;
  left: 6%;
  color: var(--blue);
  animation: float 6s ease-in-out infinite;
}

.doodle-spark {
  width: 26px;
  bottom: 18%;
  left: 13%;
  color: var(--pink);
  animation: twinkle 3.2s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

@keyframes twinkle {
  0%, 100% { opacity: .25; transform: scale(.85) rotate(0deg); }
  50%      { opacity: .9;  transform: scale(1.1) rotate(18deg); }
}

/* 悬挂的「快乐开放中」木牌 */
.open-sign {
  position: absolute;
  top: 6%;
  right: 9%;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-origin: top center;
  animation: sway 4.5s ease-in-out infinite alternate;
}

@keyframes sway {
  from { transform: rotate(2.4deg); }
  to   { transform: rotate(-2.4deg); }
}

.open-string {
  width: 2px;
  height: 58px;
  background: linear-gradient(var(--wood-3), var(--wood-2));
}

.open-plank {
  padding: 12px 20px 10px;
  background: linear-gradient(160deg, var(--wood-1), var(--wood-2));
  border: 3px solid var(--wood-3);
  border-radius: 10px;
  box-shadow: 0 10px 20px -10px rgba(74, 59, 44, .5), inset 0 0 0 2px rgba(255, 235, 204, .25);
  transform: rotate(-3deg);
}

.open-plank b {
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 4px;
  color: var(--cream);
  text-shadow: 0 2px 0 rgba(0, 0, 0, .18);
}

.open-plank small {
  font-family: var(--font-hand);
  font-size: 11px;
  letter-spacing: 1.5px;
  color: rgba(255, 235, 204, .85);
}

.hero-inner { position: relative; max-width: 760px; margin: 0 auto; }

.hero-kicker {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--card);
  border: 1.5px dashed rgba(74, 59, 44, .3);
  border-radius: 999px;
  padding: 6px 18px;
  box-shadow: var(--shadow-card);
}

.hero h1 {
  margin: 26px 0 18px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.6rem, 7.5vw, 4.4rem);
  line-height: 1.25;
  letter-spacing: 2px;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent-deep);
  display: inline-block;
  position: relative;
  transform: rotate(-1.5deg);
  text-shadow: 4px 4px 0 rgba(224, 122, 47, .18);
}

.hero-slogan {
  font-size: clamp(15px, 2.2vw, 17px);
  color: var(--ink-soft);
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

.badge {
  font-size: 13.5px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1.5px solid rgba(74, 59, 44, .14);
  box-shadow: var(--shadow-card);
  transition: transform .25s ease;
}

.badge:hover { transform: rotate(-2deg) scale(1.05); }
.badge.b1 { background: #FDEBD3; transform: rotate(-2deg); }
.badge.b2 { background: #EAF1E0; transform: rotate(1.4deg); }
.badge.b3 { background: #FBE4E1; transform: rotate(-1deg); }

.hero-cta {
  display: inline-block;
  margin-top: 34px;
  padding: 13px 34px;
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: 2px;
  text-decoration: none;
  color: var(--cream);
  background: linear-gradient(160deg, var(--accent), var(--accent-deep));
  border: 2px solid var(--accent-deep);
  border-radius: 16px;
  box-shadow: 0 4px 0 var(--accent-deep), 0 14px 24px -12px rgba(192, 95, 23, .6);
  transition: transform .2s ease, box-shadow .2s ease;
}

.hero-cta:hover {
  transform: translateY(-3px) rotate(-1deg);
  box-shadow: 0 7px 0 var(--accent-deep), 0 20px 30px -12px rgba(192, 95, 23, .65);
}

.hero-cta:active { transform: translateY(1px); box-shadow: 0 2px 0 var(--accent-deep); }

.quote-card {
  position: relative;
  max-width: 460px;
  margin: 40px auto 0;
  padding: 18px 24px 14px;
  background: var(--card);
  border-radius: 4px 18px 4px 18px;
  box-shadow: var(--shadow-card);
  font-size: 15px;
  color: var(--ink-soft);
}

.quote-card::before {
  content: '';
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  width: 86px;
  height: 22px;
  border-radius: 2px;
  background: repeating-linear-gradient(45deg, rgba(126, 155, 110, .8) 0 6px, rgba(126, 155, 110, .55) 6px 12px);
  box-shadow: 0 2px 4px rgba(74, 59, 44, .2);
}

.quote-mark {
  font-family: var(--font-display);
  color: var(--accent);
  font-size: 18px;
}

.quote-card small {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-faint);
}

/* ============ 通用小节标题 ============ */
.section-head { text-align: center; margin-bottom: 44px; }

.section-head h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.9rem, 4.5vw, 2.6rem);
  letter-spacing: 3px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 14px;
}

.section-en {
  font-family: var(--font-hand);
  font-size: clamp(15px, 2vw, 19px);
  letter-spacing: 2px;
  color: var(--accent);
}

.squiggle {
  width: 170px;
  height: 12px;
  margin: 6px auto 0;
  color: var(--accent);
}

.section-sub {
  margin-top: 10px;
  font-size: 14.5px;
  color: var(--ink-soft);
}

/* ============ 随笔手帐 ============ */
.notes {
  position: relative;
  padding: clamp(56px, 8vw, 96px) clamp(18px, 5vw, 48px);
  background: linear-gradient(rgba(250, 243, 231, 0), rgba(241, 228, 204, .35));
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(22px, 3.5vw, 38px);
  max-width: 1120px;
  margin: 0 auto;
}

.note-card {
  position: relative;
  background: var(--card);
  border: 1.5px solid rgba(74, 59, 44, .1);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  overflow: visible;
  transform: rotate(var(--tilt, 0deg));
  transition: transform .35s ease, box-shadow .35s ease;
}

.note-card:nth-child(3n+1), .note-card-link:nth-child(3n+1) .note-card { --tilt: -1.1deg; }
.note-card:nth-child(3n+2), .note-card-link:nth-child(3n+2) .note-card { --tilt:  .9deg; }
.note-card:nth-child(3n),   .note-card-link:nth-child(3n)   .note-card { --tilt: -.5deg; }

.note-card:hover {
  transform: rotate(0deg) translateY(-7px);
  box-shadow: var(--shadow-pop);
}

/* 和纸胶带 */
.note-card::before {
  content: '';
  position: absolute;
  top: -13px;
  left: 50%;
  z-index: 2;
  width: 96px;
  height: 26px;
  border-radius: 2px;
  transform: translateX(-50%) rotate(var(--tape-rot, -3deg));
  background: repeating-linear-gradient(45deg, var(--tape, rgba(232, 160, 154, .78)) 0 6px, var(--tape, rgba(232, 160, 154, .58)) 6px 12px);
  box-shadow: 0 2px 5px rgba(74, 59, 44, .22);
}

.note-card:nth-child(3n+1), .note-card-link:nth-child(3n+1) .note-card { --tape: rgba(224, 122, 47, .62);  --tape-rot: -3deg; }
.note-card:nth-child(3n+2), .note-card-link:nth-child(3n+2) .note-card { --tape: rgba(126, 155, 110, .62); --tape-rot:  2.5deg; }
.note-card:nth-child(3n),   .note-card-link:nth-child(3n)   .note-card { --tape: rgba(157, 184, 196, .62); --tape-rot: -2deg; }

.note-cover {
  display: grid;
  place-items: center;
  height: 128px;
  border-radius: 14.5px 14.5px 0 0;
  background-image:
    radial-gradient(rgba(255, 255, 255, .5) 2px, transparent 2.4px),
    var(--cover, linear-gradient(135deg, #FFE3C2, #FFC69B));
  background-size: 20px 20px, cover;
}

.note-cover span {
  font-size: 52px;
  filter: drop-shadow(0 4px 6px rgba(74, 59, 44, .25));
  transition: transform .35s ease;
}

.note-card:hover .note-cover span { transform: scale(1.15) rotate(-6deg); }

.note-cover.c1 { --cover: linear-gradient(135deg, #FFE3C2, #FFC69B); }
.note-cover.c2 { --cover: linear-gradient(135deg, #E9EFDA, #C9D8B2); }
.note-cover.c3 { --cover: linear-gradient(135deg, #FFF6C9, #FFDF85); }
.note-cover.c4 { --cover: linear-gradient(135deg, #FFDCC9, #FFB096); }
.note-cover.c5 { --cover: linear-gradient(135deg, #F3E6D8, #DFC5AC); }
.note-cover.c6 { --cover: linear-gradient(135deg, #FFE8D5, #FFC9AB); }
.note-cover.c7 { --cover: linear-gradient(135deg, #E2F4EC, #BFE5D4); }
.note-cover.c8 { --cover: linear-gradient(135deg, #E4F1FB, #BFDCF2); }
.note-cover.c9 { --cover: linear-gradient(135deg, #ECE6F7, #D4C7EE); }
.note-cover.c10 { --cover: linear-gradient(135deg, #FFE3DA, #FFBCA6); }
.note-cover.c11 { --cover: linear-gradient(135deg, #E8F2D8, #CBE3A9); }
.note-cover.c12 { --cover: linear-gradient(135deg, #F5E3C9, #E6C795); }
.note-cover.c13 { --cover: linear-gradient(135deg, #FDE9EF, #F8C8D6); }
.note-cover.c14 { --cover: linear-gradient(135deg, #E2F1F1, #BFE2E0); }
.note-cover.c15 { --cover: linear-gradient(135deg, #FFEBDB, #FFCEA2); }
.note-cover.c16 { --cover: linear-gradient(135deg, #EDE2F2, #D6C2E6); }
.note-cover.c17 { --cover: linear-gradient(135deg, #F0F6DB, #DAE9AC); }
.note-cover.c18 { --cover: linear-gradient(135deg, #F2E7D7, #DEC9AC); }
.note-cover.c19 { --cover: linear-gradient(135deg, #F6E5DC, #E6C5BE); }
.note-cover.c20 { --cover: linear-gradient(135deg, #E4ECF4, #C5D6E6); }

.note-body {
  position: relative;
  padding: 20px 20px 18px;
}

.note-body h3 {
  font-size: 18.5px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 8px;
  padding-right: 50px;
}

.note-body p {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.85;
  padding-right: 50px;
}

/* 邮戳日期 */
.postmark {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 56px;
  height: 56px;
  display: grid;
  place-content: center;
  text-align: center;
  border: 1.6px dashed rgba(192, 95, 23, .65);
  border-radius: 50%;
  color: rgba(192, 95, 23, .8);
  transform: rotate(10deg);
  background: rgba(255, 253, 247, .6);
}

.postmark b { display: block; font-size: 13.5px; letter-spacing: 1px; line-height: 1.2; }
.postmark i { display: block; font-style: normal; font-size: 9px; font-family: var(--font-hand); letter-spacing: 2px; }

.note-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1.5px dashed rgba(74, 59, 44, .15);
}

.tag {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent-deep);
  background: rgba(224, 122, 47, .1);
  padding: 3px 12px;
  border-radius: 999px;
}

/* 可点标签（详情页 / 卡片）：沿用 .tag 外观，补交互反馈 */
a.tag {
  text-decoration: none;
  display: inline-block;
  transition: background .18s ease, transform .18s ease;
}

a.tag:hover,
a.tag:focus-visible {
  background: rgba(224, 122, 47, .2);
  transform: translateY(-1px);
}

.read { font-size: 12px; color: var(--ink-faint); }

/* ============ 关于小站 ============ */
.about {
  position: relative;
  padding: clamp(64px, 9vw, 110px) clamp(18px, 5vw, 48px);
  background: var(--paper-deep);
}

/* 纸边扇形花边 */
.about::before,
.site-footer::before {
  content: '';
  position: absolute;
  top: -13px;
  left: 0;
  right: 0;
  height: 14px;
  background: radial-gradient(circle at 12px 0, var(--paper) 11px, transparent 12px) repeat-x;
  background-size: 24px 14px;
}

.site-footer::before {
  background: radial-gradient(circle at 12px 0, var(--paper-deep) 11px, transparent 12px) repeat-x;
}

.about-card {
  position: relative;
  max-width: 680px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 46px) clamp(24px, 5vw, 52px);
  background: var(--kraft);
  border: 1.5px solid rgba(74, 59, 44, .16);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
}

.about-card::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 44px;
  width: 110px;
  height: 28px;
  border-radius: 2px;
  transform: rotate(-4deg);
  background: repeating-linear-gradient(45deg, rgba(224, 122, 47, .6) 0 6px, rgba(224, 122, 47, .42) 6px 12px);
  box-shadow: 0 2px 5px rgba(74, 59, 44, .22);
}

.about-list { list-style: none; margin-top: 6px; }

.about-list li {
  position: relative;
  padding: 10px 0 10px 30px;
  font-size: 15px;
  color: var(--ink-soft);
  border-bottom: 1.5px dashed rgba(74, 59, 44, .14);
}

.about-list li:last-child { border-bottom: none; }

.about-list li::before {
  content: '✦';
  position: absolute;
  left: 4px;
  color: var(--accent);
  font-size: 15px;
}

.about-list b {
  color: var(--ink);
  margin-right: 10px;
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 1px;
}

.about-stamp {
  position: absolute;
  right: 26px;
  bottom: 22px;
  width: 76px;
  height: 76px;
  display: grid;
  place-content: center;
  text-align: center;
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 1.35;
  letter-spacing: 2px;
  color: rgba(192, 60, 60, .75);
  border: 2.5px solid rgba(192, 60, 60, .55);
  border-radius: 50%;
  transform: rotate(12deg);
  background: rgba(255, 253, 247, .35);
}

/* ============ 页脚 · 来访统计 ============ */
.site-footer {
  position: relative;
  padding: clamp(70px, 9vw, 110px) 24px 34px;
  background: var(--footer-bg);
  text-align: center;
  color: var(--cream);
}

.stats-sign {
  position: relative;
  max-width: 680px;
  margin: 0 auto;
  padding-top: 34px;
  animation: sway 5s ease-in-out infinite alternate;
  transform-origin: top center;
}

.sign-rope {
  position: absolute;
  top: -6px;
  width: 3px;
  height: 52px;
  background: linear-gradient(var(--cream), var(--wood-1));
  border-radius: 3px;
}

.rope-l { left: 22%; transform: rotate(9deg); }
.rope-r { right: 22%; transform: rotate(-9deg); }

.sign-board {
  position: relative;
  padding: 26px clamp(20px, 4vw, 44px) 20px;
  background: linear-gradient(165deg, var(--wood-1), var(--wood-2) 55%, var(--wood-3));
  border: 3px solid var(--wood-3);
  border-radius: 18px;
  box-shadow:
    0 18px 36px -14px rgba(0, 0, 0, .5),
    inset 0 0 0 2px rgba(255, 235, 204, .22),
    inset 0 0 40px rgba(60, 38, 18, .25);
}

.sign-title {
  font-family: var(--font-display);
  font-size: clamp(17px, 2.6vw, 21px);
  letter-spacing: 3px;
  color: var(--cream);
  text-shadow: 0 2px 0 rgba(0, 0, 0, .2);
  margin-bottom: 18px;
}

.sign-nail {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #5A4226, #2E1F0F);
  vertical-align: 2px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.stat {
  padding: 12px 6px 10px;
  background: rgba(60, 38, 18, .28);
  border: 1.5px solid rgba(255, 235, 204, .25);
  border-radius: 12px;
  transition: transform .25s ease, background .25s ease;
}

.stat:hover { transform: translateY(-3px); background: rgba(60, 38, 18, .42); }

.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.6vw, 2.1rem);
  line-height: 1.2;
  color: #FFD9A0;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .22);
}

.stat-label {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  letter-spacing: 2px;
  color: rgba(255, 235, 204, .85);
}

.footer-slogan {
  margin-top: 44px;
  font-family: var(--font-display);
  font-size: clamp(16px, 2.6vw, 20px);
  letter-spacing: 4px;
  color: rgba(255, 235, 204, .92);
}

.footer-copy {
  margin-top: 10px;
  font-size: 12.5px;
  letter-spacing: 1px;
  color: rgba(255, 235, 204, .45);
  /* 连点暗门用（js/secret-gate.js）：手机快速连点会被当成"双击选词"，
     选中文本后部分浏览器不再派发 click，手势就失灵。
     这一行只是版权文字，禁掉选中不影响任何正常使用。 */
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.footer-beian {
  margin-top: 8px;
  font-size: 12px;
  letter-spacing: .5px;
}

.footer-beian a {
  color: rgba(255, 235, 204, .45);
  text-decoration: none;
  transition: color .25s ease;
}

.footer-beian a:hover {
  color: rgba(255, 235, 204, .8);
  text-decoration: underline;
}

/* ============ 进场动画 ============ */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s ease, transform .7s ease;
}

.reveal.in { opacity: 1; transform: translateY(0); }

/* ============ 动态随笔卡片 & 归档分页 ============ */
.note-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.notes-more {
  display: block;
  width: max-content;
  margin: 44px auto 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--accent-deep);
  text-decoration: none;
  padding: 10px 26px;
  background: var(--card);
  border: 1.5px solid rgba(224, 122, 47, .4);
  border-radius: 999px;
  box-shadow: var(--shadow-card);
  transition: transform .25s ease, box-shadow .25s ease;
}

.notes-more:hover { transform: translateY(-3px) rotate(-1deg); box-shadow: var(--shadow-pop); }

.notes-count {
  text-align: center;
  font-size: 13.5px;
  color: var(--ink-faint);
  margin: -26px 0 30px;
  letter-spacing: 1px;
}

.load-more-wrap { text-align: center; margin-top: 40px; }

.load-more-btn {
  display: inline-block;
  padding: 12px 36px;
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: 2px;
  color: var(--cream);
  background: linear-gradient(160deg, var(--accent), var(--accent-deep));
  border: 2px solid var(--accent-deep);
  border-radius: 14px;
  box-shadow: 0 4px 0 var(--accent-deep), 0 12px 22px -12px rgba(192, 95, 23, .55);
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}

.load-more-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--accent-deep), 0 16px 26px -12px rgba(192, 95, 23, .6); }
.load-more-btn:disabled { opacity: .55; cursor: default; transform: none; }

.notes-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--ink-soft);
  padding: 60px 0;
  font-size: 15px;
}

/* ============ 相关文章 ============ */
.post-related {
  margin-top: 42px;
  padding-top: 26px;
  border-top: 1.5px dashed rgba(74, 59, 44, .22);
}

.related-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-soft);
  margin: 0 0 14px;
  letter-spacing: .04em;
}

.related-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.related-list a {
  color: var(--ink);
  font-size: 14.5px;
  text-decoration: none;
  border-bottom: 1.5px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}

.related-list a:hover { color: var(--accent-deep); border-bottom-color: var(--accent); }

/* ============ 正文目录（TOC） ============ */
.post-toc { margin: 18px 0 6px; }

.toc {
  background: rgba(255, 253, 247, .7);
  border: 1.5px dashed rgba(74, 59, 44, .22);
  border-radius: 14px;
  padding: 12px 16px;
}

.toc-title {
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-soft);
  letter-spacing: .04em;
  list-style: none;
}
.toc-title::-webkit-details-marker { display: none; }

.toc-list {
  margin: 10px 0 2px;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.toc-item { font-size: 14px; line-height: 1.7; }
.toc-item.toc-h3 { margin-left: 16px; font-size: 13.5px; }

.toc-item a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1.5px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}

.toc-item a:hover,
.toc-item a.active { color: var(--accent-deep); border-bottom-color: var(--accent); }
.toc-item a.active { font-weight: 600; }

/* 长目录在移动端占位太多：限高可滚动 */
@media (max-width: 640px) {
  .toc-list { max-height: 40vh; overflow: auto; }
}

/* ============ 上一篇 / 下一篇 ============ */
.post-adjacent {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 34px;
}

.adj-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  text-decoration: none;
  background: var(--card);
  border: 1.5px dashed rgba(74, 59, 44, .22);
  border-radius: 12px;
  transition: border-color .2s ease, transform .2s ease;
}

.adj-link:hover { border-color: var(--accent); transform: translateY(-2px); }
.adj-empty { border: none; background: none; pointer-events: none; }

.adj-label { font-size: 12px; color: var(--ink-faint); }
.adj-title { font-size: 14.5px; font-weight: 600; color: var(--ink); line-height: 1.5; }
.adj-next { text-align: right; }

@media (max-width: 560px) {
  .post-adjacent { grid-template-columns: 1fr; }
  .adj-next { text-align: left; }
}

/* ============ 手帐架搜索框 ============ */
.search-bar {
  position: relative;
  max-width: 440px;
  margin: -18px auto 30px;
}

.search-bar input {
  width: 100%;
  padding: 12px 46px 12px 22px;
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--ink);
  background: var(--card);
  border: 1.5px dashed rgba(74, 59, 44, .3);
  border-radius: 999px;
  box-shadow: var(--shadow-card);
  transition: border-color .25s ease, box-shadow .25s ease;
}

.search-bar input:focus {
  outline: none;
  border-color: var(--accent);
  border-style: solid;
  box-shadow: var(--shadow-pop);
}

.search-bar input::placeholder { color: var(--ink-faint); }

/* ============ 标签云与标签筛选 ============ */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  justify-content: center;
  max-width: 720px;
  margin: -14px auto 28px;
}

.tag-cloud .tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: background .18s ease, transform .18s ease;
}

.tag-cloud .tag:hover,
.tag-cloud .tag:focus-visible {
  background: rgba(224, 122, 47, .2);
  transform: translateY(-1px);
}

.tag-cloud .tag small {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-faint);
  background: rgba(255, 255, 255, .7);
  border-radius: 999px;
  padding: 0 6px;
}

.tag-filter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: -12px auto 26px;
  font-size: 14px;
  color: var(--ink-soft);
}

.tag-filter-clear {
  border: 1.5px dashed rgba(74, 59, 44, .3);
  background: var(--card);
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 12.5px;
  padding: 4px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease;
}

.tag-filter-clear:hover { border-color: var(--accent); color: var(--accent-deep); }

/* ============ 按年月浏览 ============ */
.month-archive { max-width: 720px; margin: -16px auto 28px; }

.month-box {
  background: rgba(255, 253, 247, .7);
  border: 1.5px dashed rgba(74, 59, 44, .22);
  border-radius: 14px;
  padding: 12px 16px;
}

.month-title {
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-soft);
  letter-spacing: .04em;
  list-style: none;
}
.month-title::-webkit-details-marker { display: none; }

.month-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-top: 12px;
}

.month-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  background: rgba(224, 122, 47, .08);
  border-radius: 999px;
  padding: 5px 14px;
  transition: background .18s ease, transform .18s ease;
}

.month-item:hover { background: rgba(224, 122, 47, .2); transform: translateY(-1px); }

.month-item small {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-faint);
  background: rgba(255, 255, 255, .75);
  border-radius: 999px;
  padding: 0 6px;
}

.search-bar button {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  font-size: 15px;
  color: var(--ink-faint);
  cursor: pointer;
  padding: 4px;
  transition: color .2s ease;
}

.search-bar button:hover { color: var(--accent-deep); }

/* ============ 详情页（post.html） ============ */
.post-page {
  position: relative;
  padding: clamp(48px, 7vw, 80px) clamp(18px, 5vw, 48px);
}

.post-card {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 48px) clamp(22px, 5vw, 52px) clamp(26px, 4vw, 40px);
  background: var(--card);
  border: 1.5px solid rgba(74, 59, 44, .1);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
}

.post-card::before {
  content: '';
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%) rotate(-2.5deg);
  width: 110px;
  height: 27px;
  border-radius: 2px;
  background: repeating-linear-gradient(45deg, rgba(224, 122, 47, .62) 0 6px, rgba(224, 122, 47, .44) 6px 12px);
  box-shadow: 0 2px 5px rgba(74, 59, 44, .22);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--ink-faint);
}

.post-emoji {
  font-size: 44px;
  line-height: 1;
  filter: drop-shadow(0 4px 6px rgba(74, 59, 44, .25));
}

.post-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.7rem, 4.5vw, 2.4rem);
  letter-spacing: 1px;
  line-height: 1.45;
  margin-bottom: 6px;
}

.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }

.post-content { margin-top: 18px; font-size: 15.5px; line-height: 2; color: #574737; }

.post-content h2, .post-content h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 1px;
  color: var(--ink);
  margin: 26px 0 10px;
}

.post-content h2 { font-size: 21px; }
.post-content h3 { font-size: 18px; }

.post-content p { margin: 12px 0; }

.post-content blockquote {
  margin: 16px 0;
  padding: 12px 18px;
  background: var(--kraft);
  border-left: 3.5px solid var(--accent);
  border-radius: 0 12px 12px 0;
  color: var(--ink-soft);
}

.post-content blockquote p { margin: 4px 0; }

.post-content ul, .post-content ol { margin: 12px 0; padding-left: 24px; }
.post-content li { margin: 6px 0; }

.post-content img { max-width: 100%; border-radius: 12px; margin: 8px 0; box-shadow: var(--shadow-card); }

.post-content code {
  background: var(--paper-deep);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 13.5px;
}

.post-content a { color: var(--accent-deep); }

.post-content hr { border: none; border-top: 1.5px dashed rgba(74, 59, 44, .25); margin: 22px 0; }

.post-nav {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1.5px dashed rgba(74, 59, 44, .15);
}

.post-nav a {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 8px 20px;
  border-radius: 999px;
  border: 1.5px dashed rgba(74, 59, 44, .25);
  transition: color .25s ease, border-color .25s ease, transform .25s ease;
}

.post-nav a:hover { color: var(--accent-deep); border-color: var(--accent); transform: translateY(-2px); }

.post-loading, .post-missing {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  padding: 70px 20px;
  color: var(--ink-soft);
  font-size: 15px;
}

.post-missing b { display: block; font-family: var(--font-display); font-size: 26px; font-weight: 400; color: var(--ink); margin-bottom: 10px; }

@media (max-width: 620px) {
  .editor-grid { grid-template-columns: 1fr; }
}

/* ============ 响应式 ============ */
@media (max-width: 980px) {
  .notes-grid { grid-template-columns: repeat(2, 1fr); }
  .open-sign { top: 2%; right: 4%; transform: scale(.85); }
  .doodle-cloud { left: auto; right: 5%; top: 46%; }
}

@media (max-width: 760px) {
  .site-header { padding: 10px 16px; }
  .logo-text { font-size: 19px; }
  .site-nav { gap: 12px; }
  .site-nav a { font-size: 13.5px; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .rope-l { left: 16%; }
  .rope-r { right: 16%; }
}

@media (max-width: 620px) {
  .notes-grid { grid-template-columns: 1fr; max-width: 420px; }
  .logo-text { font-size: 17px; }
  .logo-en { font-size: 11px; }
  .logo-badge { width: 34px; height: 34px; font-size: 18px; border-radius: 10px; }
  .site-nav a { font-size: 12.5px; }
  .site-nav a:last-child { display: none; } /* 窄屏收起"来访统计"入口，页脚一步即达 */
  .doodle-sun { width: 52px; left: 4%; top: 8%; }
  .doodle-cloud { width: 74px; right: 3%; left: auto; top: 10%; }
  .doodle-spark { display: none; }
  .open-sign { position: static; margin: 0 auto 26px; width: max-content; }
  .hero-watermark { top: 10px; }
  .about-stamp { right: 14px; bottom: 14px; width: 64px; height: 64px; font-size: 12px; }
}

/* ============ 无障碍：减少动效 ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
