/* ============================================================
   喵窝 Meowblog — 设计系统
   纸 · 墨 · 印章红 · 手绘笔触 · 弹簧动效
   ============================================================ */

/* ---------- 1. 设计令牌 ---------- */
:root {
  /* 纸与墨 */
  --paper: #f3ecdd;
  --paper-deep: #ebe2cd;
  --paper-card: #f8f3e7;
  --ink: #2e2820;
  --ink-soft: #6f6555;
  --ink-faint: #a39680;
  --line: rgba(46, 40, 32, .16);
  --line-strong: rgba(46, 40, 32, .34);

  /* 点睛 */
  --seal: #b23a2a;
  --seal-deep: #93301f;
  --moss: #6f7b64;
  --tea: #8a9a7b;

  /* 字体 */
  --font-hand: "LXGW WenKai", "LXGW WenKai Lite", "Kaiti SC", "STKaiti", "KaiTi", "DFKai-SB", serif;
  --font-serif: "LXGW WenKai", "Kaiti SC", "STKaiti", "KaiTi", "Noto Serif SC", serif;
  --font-latin: "EB Garamond", "Georgia", "Times New Roman", serif;
  --font-note: "Caveat", "Segoe Script", cursive;
  --font-mono: "JetBrains Mono", "Cascadia Code", ui-monospace, "Cascadia Mono", Consolas, monospace;

  /* 节奏 */
  --w-max: 1200px;
  --gutter: clamp(20px, 4vw, 56px);
  --ease-spring: cubic-bezier(.22, 1.2, .36, 1);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);

  --shadow-card: 0 1px 2px rgba(46, 40, 32, .08), 0 10px 28px -14px rgba(46, 40, 32, .28);
  --shadow-lift: 0 2px 4px rgba(46, 40, 32, .08), 0 24px 44px -18px rgba(46, 40, 32, .38);
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.9;
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  overflow-x: hidden;
  font-feature-settings: "halt";
}
img, svg, video { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { padding: 0; }
li { list-style: none; }
::selection { background: var(--seal); color: var(--paper); }
:focus-visible { outline: 2px dashed var(--seal); outline-offset: 4px; border-radius: 2px; }

/* 滚动条 —— 细墨条 */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb {
  background: var(--ink-faint);
  border: 3px solid var(--paper);
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover { background: var(--ink-soft); }

/* ---------- 3. 纸张肌理（全局覆盖层） ---------- */
.paper-grain {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 2000;
  opacity: .5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/><feComponentTransfer><feFuncA type='linear' slope='0.055'/></feComponentTransfer></filter><rect width='240' height='240' filter='url(%23n)'/></svg>");
  background-size: 240px 240px;
}
.paper-vignette {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1999;
  background:
    radial-gradient(120% 90% at 50% 0%, transparent 60%, rgba(46, 40, 32, .05) 100%),
    radial-gradient(100% 100% at 50% 100%, transparent 70%, rgba(46, 40, 32, .04) 100%);
}

/* ---------- 4. 排版 ---------- */
h1, h2, h3 { font-family: var(--font-hand); font-weight: 700; line-height: 1.3; }

.display-mega {
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: clamp(96px, 20vw, 260px);
  line-height: .95;
  letter-spacing: -.02em;
}

.vertical-text {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: .35em;
}

.latin { font-family: var(--font-latin); }
.latin-note { font-family: var(--font-note); font-weight: 500; }

.muted { color: var(--ink-soft); }
.faint { color: var(--ink-faint); }
.accent { color: var(--seal); }

/* ---------- 5. 布局 ---------- */
.wrap {
  width: min(var(--w-max), 100% - var(--gutter) * 2);
  margin-inline: auto;
}
.section { padding-block: clamp(64px, 9vw, 120px); position: relative; }

/* 节标题：手写大字 + 手绘下划线 */
.sec-head { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; margin-bottom: clamp(32px, 5vw, 56px); }
.sec-title {
  font-size: clamp(30px, 4.4vw, 52px);
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
}
.sec-title::after {
  content: "";
  position: absolute; left: 2%; right: 0; bottom: 0;
  height: 9px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 8' preserveAspectRatio='none'><path d='M2 5 C 20 2.5, 38 6.5, 58 4.2 S 98 3.2, 118 4.8' fill='none' stroke='%23b23a2a' stroke-width='2.2' stroke-linecap='round' opacity='.85'/></svg>") no-repeat;
  background-size: 100% 100%;
}
.sec-sub {
  font-size: 14px;
  color: var(--ink-soft);
  letter-spacing: .2em;
  font-family: var(--font-latin);
  font-style: italic;
}

/* ---------- 6. 页头 ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(243, 236, 221, .86);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: box-shadow .5s var(--ease-out);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.site-header .hd-line {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 7px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 7' preserveAspectRatio='none'><path d='M0 3.5 C 150 2, 300 5, 450 3.4 S 750 2.2, 900 4 S 1120 3, 1200 3.6' fill='none' stroke='rgba(46,40,32,.28)' stroke-width='1.2'/></svg>") repeat-x;
  background-size: auto 100%;
  opacity: 0;
  transition: opacity .5s var(--ease-out);
}
.site-header.is-scrolled .hd-line { opacity: 1; }
.site-header.is-scrolled { box-shadow: 0 12px 32px -20px rgba(46, 40, 32, .25); }

.brand { display: flex; align-items: center; gap: 12px; }
.brand .brand-word {
  font-family: var(--font-hand);
  font-size: 22px; font-weight: 700;
  letter-spacing: .08em;
}
.brand .brand-sub {
  font-family: var(--font-note);
  font-size: 14px;
  color: var(--ink-faint);
  transform: rotate(-3deg) translateY(2px);
  letter-spacing: .04em;
}

.main-nav { display: flex; align-items: center; gap: clamp(16px, 2.6vw, 34px); }
.main-nav a.nav-link {
  font-family: var(--font-hand);
  font-size: 17px;
  position: relative;
  padding: 4px 2px;
  transition: color .35s var(--ease-out), transform .35s var(--ease-spring);
  display: inline-block;
}
.main-nav a.nav-link::after {
  content: "";
  position: absolute; left: -2%; right: -2%; bottom: -3px;
  height: 7px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 8' preserveAspectRatio='none'><path d='M2 5 C 22 2.5, 40 6.5, 60 4.2 S 96 3.2, 118 4.8' fill='none' stroke='%232e2820' stroke-width='2' stroke-linecap='round' opacity='.75'/></svg>") no-repeat;
  background-size: 100% 100%;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .5s var(--ease-spring);
}
.main-nav a.nav-link:hover::after,
.main-nav a.nav-link[aria-current="page"]::after { transform: scaleX(1); }
.main-nav a.nav-link:hover { transform: translateY(-1px) rotate(-1deg); }
.main-nav .nav-dot { width: 4px; height: 4px; background: var(--ink-faint); border-radius: 50%; }
.main-nav a.nav-icon {
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 48% 52% 50% 50% / 55% 45% 55% 45%;
  color: var(--ink-soft);
  transition: all .4s var(--ease-spring);
}
.main-nav a.nav-icon:hover {
  color: var(--seal);
  border-color: var(--seal);
  transform: rotate(-8deg) scale(1.06);
}
.main-nav a.nav-icon svg { width: 16px; height: 16px; }

/* ---------- 7. 印章 ---------- */
.seal {
  --seal-size: 56px;
  width: var(--seal-size); height: var(--seal-size);
  background: var(--seal);
  color: #f6efe2;
  display: grid; place-items: center;
  font-family: var(--font-hand);
  font-weight: 700;
  border-radius: 14% 15% 13% 16% / 15% 13% 16% 14%;
  box-shadow: inset 0 0 0 2.5px rgba(246, 239, 226, .92), inset 0 0 0 5px var(--seal), inset 0 0 14px rgba(0,0,0,.18);
  transform: rotate(-5deg);
  position: relative;
  user-select: none;
  line-height: 1;
}
.seal::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: radial-gradient(90% 90% at 30% 25%, transparent 55%, rgba(0, 0, 0, .12) 100%);
  mix-blend-mode: multiply;
}
.seal.sm { --seal-size: 36px; font-size: 20px; border-radius: 22%; }
.seal.lg { --seal-size: 84px; font-size: 44px; }

/* ---------- 8. 标签（手绘椭圆） ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px;
  padding: 3px 14px 4px;
  border: 1.4px solid var(--line-strong);
  border-radius: 48% 52% 50% 50% / 58% 42% 58% 42%;
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
  font-family: var(--font-hand);
  letter-spacing: .08em;
  transition: all .4s var(--ease-spring);
  white-space: nowrap;
}
.tag:hover, .tag.is-active {
  border-color: var(--seal);
  color: var(--seal);
  background: rgba(178, 58, 42, .06);
  transform: rotate(-2deg) scale(1.04);
}
.tag .tag-hash { color: var(--ink-faint); font-family: var(--font-latin); font-size: 12px; }
.tag.is-active .tag-hash, .tag:hover .tag-hash { color: var(--seal); }

.tag-static {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px;
  color: var(--ink-soft);
  letter-spacing: .1em;
}

/* ---------- 9. 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-hand);
  font-size: 16px;
  letter-spacing: .12em;
  padding: 11px 26px;
  border: 1.6px solid var(--ink);
  border-radius: 46% 54% 48% 52% / 62% 48% 60% 40%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: all .45s var(--ease-spring);
  position: relative;
}
.btn:hover {
  background: var(--ink);
  color: var(--paper);
  transform: rotate(-1.5deg) translateY(-2px);
  box-shadow: 0 10px 22px -10px rgba(46, 40, 32, .45);
}
.btn.btn-seal { border-color: var(--seal); color: var(--seal); }
.btn.btn-seal:hover { background: var(--seal); color: #f6efe2; box-shadow: 0 10px 22px -10px rgba(178, 58, 42, .55); }
.btn svg { width: 16px; height: 16px; }

/* 文字链接：手绘箭头 */
.link-arrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-hand);
  font-size: 15px;
  letter-spacing: .1em;
  color: var(--seal);
  position: relative;
}
.link-arrow .arr { display: inline-block; transition: transform .45s var(--ease-spring); }
.link-arrow:hover .arr { transform: translate(4px, -3px) rotate(-6deg); }
.link-arrow::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -4px; height: 6px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 8' preserveAspectRatio='none'><path d='M2 5 C 20 2.5, 38 6.5, 58 4.2 S 98 3.2, 118 4.8' fill='none' stroke='%23b23a2a' stroke-width='2' stroke-linecap='round' opacity='.7'/></svg>") no-repeat;
  background-size: 100% 100%;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s var(--ease-spring);
}
.link-arrow:hover::after { transform: scaleX(1); }

/* ---------- 10. 手绘线条 ---------- */
.rule { display: block; width: 100%; height: 12px; color: var(--line-strong); }
.rule svg { width: 100%; height: 100%; }
.rule .draw-path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.is-in .rule .draw-path,
.rule.is-in .draw-path { transition: stroke-dashoffset 1.6s var(--ease-out) .1s; stroke-dashoffset: 0; }

/* 波浪分隔（稍密） */
.rule.rule-tight { height: 8px; }

/* ---------- 11. 拍立得卡片 ---------- */
.polaroid {
  background: var(--paper-card);
  border: 1px solid rgba(46, 40, 32, .1);
  padding: 18px 18px 14px;
  box-shadow: var(--shadow-card);
  position: relative;
  transform: rotate(var(--tilt, 0deg));
  transition: transform .6s var(--ease-spring), box-shadow .6s var(--ease-out);
}
.polaroid::before, .polaroid::after {
  content: "";
  position: absolute;
  width: 74px; height: 22px;
  background: rgba(222, 205, 160, .68);
  box-shadow: 0 1px 3px rgba(46, 40, 32, .12);
  top: -10px;
  z-index: 2;
}
.polaroid::before { left: 12%; transform: rotate(-5deg); }
.polaroid::after { right: 12%; transform: rotate(4deg); }
.polaroid:hover { transform: rotate(0deg) translateY(-8px); box-shadow: var(--shadow-lift); }

.polaroid .po-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.polaroid .po-date {
  font-family: var(--font-latin);
  font-style: italic;
  font-size: 13.5px;
  color: var(--ink-faint);
  letter-spacing: .06em;
}
.polaroid .po-title {
  font-family: var(--font-hand);
  font-size: clamp(19px, 2vw, 23px);
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 10px;
}
.polaroid .po-title a:hover { color: var(--seal); }
.polaroid .po-excerpt {
  font-size: 14.5px;
  line-height: 1.95;
  color: var(--ink-soft);
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.polaroid .po-foot {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px dashed var(--line);
  padding-top: 12px;
}
.polaroid .po-corners { position: absolute; inset: 0; pointer-events: none; }

/* ---------- 12. 跑马灯 ---------- */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-block: 16px;
  background: rgba(235, 226, 205, .45);
  position: relative;
}
.marquee-track {
  display: flex; align-items: center;
  gap: 0;
  width: max-content;
  will-change: transform;
}
.marquee-item {
  display: inline-flex; align-items: center; gap: 26px;
  padding-inline: 26px;
  font-family: var(--font-hand);
  font-size: clamp(16px, 1.8vw, 21px);
  letter-spacing: .28em;
  color: var(--ink-soft);
  white-space: nowrap;
}
.marquee-item .sep { color: var(--seal); opacity: .7; display: grid; place-items: center; }
.marquee-item .sep svg { width: 15px; height: 15px; }

/* ---------- 13. 正在手账（now 卡片） ---------- */
.now-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2.4vw, 28px);
}
.now-card {
  border: 1.4px solid var(--line-strong);
  border-radius: 26% 74% 62% 38% / 42% 46% 54% 58%;
  padding: 26px 26px 22px;
  position: relative;
  background: var(--paper-card);
  transition: transform .55s var(--ease-spring), box-shadow .55s var(--ease-out);
}
.now-card:nth-child(2) { border-radius: 64% 36% 44% 56% / 52% 60% 40% 48%; }
.now-card:nth-child(3) { border-radius: 40% 60% 56% 44% / 48% 40% 60% 52%; }
.now-card:hover { transform: translateY(-6px) rotate(-.6deg); box-shadow: var(--shadow-card); }
.now-card .now-label {
  display: flex; align-items: center; gap: 9px;
  font-size: 13.5px;
  letter-spacing: .22em;
  color: var(--ink-faint);
  margin-bottom: 12px;
}
.now-card .now-label svg { width: 15px; height: 15px; color: var(--moss); }
.now-card .now-title { font-family: var(--font-hand); font-size: 19px; font-weight: 700; line-height: 1.6; }
.now-card .now-note { font-size: 13.5px; color: var(--ink-soft); margin-top: 6px; }
.now-card .now-breathe {
  position: absolute; top: 22px; right: 22px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--moss);
  animation: breathe 2.6s var(--ease-in-out) infinite;
}
@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: .55; }
  50% { transform: scale(1.5); opacity: 1; }
}

/* ---------- 14. 碎念（pencil notes） ---------- */
.note-list { display: grid; gap: 18px; }
.note-item {
  display: flex; gap: 16px; align-items: baseline;
  font-family: var(--font-hand);
  font-size: clamp(16px, 1.8vw, 19px);
  color: var(--ink);
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--line);
  position: relative;
  transition: transform .4s var(--ease-spring);
}
.note-item:hover { transform: translateX(6px); }
.note-item .note-date {
  font-family: var(--font-latin);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-faint);
  min-width: 86px;
  flex-shrink: 0;
}
.note-item .note-pen { color: var(--ink-faint); flex-shrink: 0; align-self: center; }
.note-item .note-pen svg { width: 13px; height: 13px; }

/* ---------- 15. 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: clamp(48px, 7vw, 96px);
  position: relative;
  background:
    radial-gradient(60% 120% at 85% 0%, rgba(178, 58, 42, .04), transparent 60%),
    rgba(235, 226, 205, .4);
  overflow: hidden;
}
.site-footer .ft-main {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 40px;
  padding-block: clamp(48px, 6vw, 80px) 36px;
  flex-wrap: wrap;
}
.ft-thanks {
  font-family: var(--font-hand);
  font-size: clamp(34px, 5vw, 62px);
  font-weight: 700;
  line-height: 1.25;
}
.ft-thanks .accent { display: inline-block; transform: rotate(-3deg); }
.ft-meta { font-size: 14px; color: var(--ink-soft); margin-top: 14px; letter-spacing: .1em; }
.ft-links { display: flex; gap: 14px; align-items: center; }
.ft-links a {
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border: 1.3px solid var(--line-strong);
  border-radius: 46% 54% 50% 50% / 58% 42% 58% 42%;
  color: var(--ink-soft);
  transition: all .4s var(--ease-spring);
}
.ft-links a:hover {
  color: var(--paper);
  background: var(--ink);
  border-color: var(--ink);
  transform: translateY(-4px) rotate(-6deg);
}
.ft-links a svg { width: 17px; height: 17px; }
.ft-bottom {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap;
  padding-block: 18px 22px;
  border-top: 1px dashed var(--line);
  font-size: 12.5px;
  color: var(--ink-faint);
  letter-spacing: .12em;
}
.ft-bottom .latin { font-style: italic; }
.ft-stamp-float {
  position: absolute;
  right: clamp(16px, 6vw, 90px);
  top: 38px;
  opacity: .9;
  transform: rotate(8deg);
}

/* ---------- 16. 滚动显现 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px) rotate(.4deg);
  transition:
    opacity 1s var(--ease-out),
    transform 1.1s var(--ease-spring);
  transition-delay: var(--rd, 0ms);
  will-change: opacity, transform;
}
[data-reveal="left"] { transform: translateX(-30px) rotate(-.5deg); }
[data-reveal="right"] { transform: translateX(30px) rotate(.5deg); }
[data-reveal="zoom"] { transform: scale(.92) translateY(14px); }
[data-reveal].is-in { opacity: 1; transform: none; }

/* SVG 描边生长 */
.draw-path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.is-in .draw-path, svg.is-in .draw-path {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.5s var(--ease-out) .15s;
}

/* ---------- 17. 光标 ---------- */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0;
  pointer-events: none;
  z-index: 3000;
  opacity: 0;
}
body.cursor-ready .cursor-dot, body.cursor-ready .cursor-ring { opacity: 1; }
.cursor-dot {
  width: 7px; height: 7px;
  background: var(--seal);
  border-radius: 46% 54% 52% 48% / 55% 45% 55% 45%;
  transform: translate(-50%, -50%);
}
.cursor-ring {
  width: 34px; height: 34px;
  border: 1.4px solid rgba(46, 40, 32, .55);
  border-radius: 52% 48% 55% 45% / 48% 55% 45% 52%;
  transform: translate(-50%, -50%);
  display: grid; place-items: center;
  transition: width .35s var(--ease-spring), height .35s var(--ease-spring),
    border-color .35s var(--ease-out), background-color .35s var(--ease-out);
}
.cursor-ring .cursor-label {
  font-family: var(--font-hand);
  font-size: 13px;
  color: var(--paper);
  opacity: 0;
  transform: scale(.5);
  transition: opacity .3s var(--ease-out), transform .4s var(--ease-spring);
  line-height: 1;
  user-select: none;
}
body.cursor-hover .cursor-ring {
  width: 52px; height: 52px;
  border-color: rgba(178, 58, 42, .75);
}
body.cursor-view .cursor-ring {
  width: 58px; height: 58px;
  background: rgba(178, 58, 42, .92);
  border-color: transparent;
}
body.cursor-view .cursor-ring .cursor-label { opacity: 1; transform: scale(1); }
body.cursor-down .cursor-ring { transform: translate(-50%, -50%) scale(.82); }
@media (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* ---------- 18. 翻页墨迹 ---------- */
.page-wipe {
  position: fixed; inset: 0;
  z-index: 2500;
  background: var(--paper);
  transform: translateY(101%);
  pointer-events: none;
}
.page-wipe::after {
  content: "";
  position: absolute; left: 0; right: 0; top: -18px;
  height: 20px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 20' preserveAspectRatio='none'><path d='M0 18 C 200 6, 340 16, 500 10 S 820 4, 1000 12 S 1160 8, 1200 14 L 1200 20 L 0 20 Z' fill='%23f3ecdd'/></svg>") repeat-x;
  background-size: 100% 20px;
}
.page-wipe .wipe-word {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--font-hand);
  font-size: 22px;
  letter-spacing: .5em;
  color: var(--ink-faint);
  opacity: 0;
  transition: opacity .3s var(--ease-out) .15s;
}
.page-wipe.is-wiping { transform: translateY(0); transition: transform .5s var(--ease-in-out); }
.page-wipe.is-wiping .wipe-word { opacity: 1; }
body.wipe-boot .page-wipe { transform: translateY(0); transition: none; }
body.wipe-reveal .page-wipe { transform: translateY(101%); transition: transform .7s var(--ease-out) .1s; }

/* ---------- 19. 文集列表行 ---------- */
.archive-group { margin-bottom: clamp(36px, 5vw, 60px); }
.archive-year {
  font-family: var(--font-latin);
  font-style: italic;
  font-size: clamp(22px, 2.6vw, 30px);
  color: var(--ink-faint);
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 16px;
}
.archive-year::after {
  content: "";
  flex: 1;
  height: 8px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 8' preserveAspectRatio='none'><path d='M0 4 C 80 2, 160 6, 260 3.6 S 440 3, 600 4.4' fill='none' stroke='rgba(46,40,32,.22)' stroke-width='1.1'/></svg>") no-repeat;
  background-size: 100% 100%;
}
.archive-row {
  display: grid;
  grid-template-columns: 108px 1fr auto;
  align-items: baseline;
  gap: 20px;
  padding: 20px 10px;
  border-bottom: 1px dashed var(--line);
  position: relative;
  transition: transform .45s var(--ease-spring), background-color .45s var(--ease-out);
}
.archive-row:hover { transform: translateX(8px); }
.archive-row .ar-date {
  font-family: var(--font-latin);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-faint);
  letter-spacing: .04em;
}
.archive-row .ar-title {
  font-family: var(--font-hand);
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 700;
  line-height: 1.55;
  display: inline;
  background-image: linear-gradient(transparent 62%, rgba(178, 58, 42, .18) 62%);
  background-size: 0% 100%;
  background-repeat: no-repeat;
  transition: background-size .6s var(--ease-out);
}
.archive-row:hover .ar-title { background-size: 100% 100%; }
.archive-row .ar-excerpt {
  font-size: 13.5px;
  color: var(--ink-soft);
  margin-top: 4px;
  display: none;
}
.archive-row .ar-tags { display: flex; gap: 8px; flex-shrink: 0; }
.archive-row .ar-paw {
  position: absolute; left: -26px; top: 50%;
  translate: 0 -50%;
  color: var(--seal);
  opacity: 0;
  transition: opacity .4s var(--ease-out), transform .5s var(--ease-spring);
  transform: scale(.4) rotate(-20deg);
}
.archive-row:hover .ar-paw { opacity: 1; transform: scale(1) rotate(-12deg); }
.archive-row .ar-paw svg { width: 15px; height: 15px; }
.archive-empty {
  text-align: center;
  color: var(--ink-faint);
  font-family: var(--font-hand);
  padding: 60px 0;
  letter-spacing: .2em;
}

/* ---------- 20. 文章页 ---------- */
.post-shell { max-width: 720px; margin-inline: auto; }
.post-hero { padding-top: clamp(120px, 16vh, 170px); }
.post-hero .ph-date {
  font-family: var(--font-latin);
  font-style: italic;
  color: var(--ink-faint);
  font-size: 15px;
  letter-spacing: .08em;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.post-hero .ph-date .dot { width: 3px; height: 3px; background: var(--ink-faint); border-radius: 50%; }
.post-title {
  font-size: clamp(30px, 5.4vw, 52px);
  line-height: 1.4;
  margin: 18px 0 22px;
}
.post-meta-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.post-body { margin-top: clamp(40px, 6vw, 64px); font-size: 17.5px; }
.post-body p { margin-bottom: 1.9em; text-align: justify; }
.post-body > p:first-of-type::first-letter {
  font-family: var(--font-hand);
  font-size: 3.1em;
  font-weight: 700;
  color: var(--seal);
  float: left;
  line-height: 1;
  padding: 6px 10px 0 0;
}
.post-body h2 {
  font-size: clamp(21px, 2.4vw, 26px);
  margin: 2.4em 0 1em;
  position: relative;
  padding-left: 18px;
}
.post-body h2::before {
  content: "";
  position: absolute; left: 0; top: 8%; bottom: 8%;
  width: 4px;
  background: var(--seal);
  border-radius: 60% 40% 50% 50% / 55% 45% 60% 40%;
  opacity: .85;
}
.post-body blockquote {
  margin: 2em 0;
  padding: 18px 26px;
  border-left: none;
  position: relative;
  color: var(--ink-soft);
  font-family: var(--font-hand);
  font-size: 16.5px;
  background:
    linear-gradient(rgba(235, 226, 205, .55), rgba(235, 226, 205, .55));
  border-radius: 4px 22px 6px 18px / 8px 16px 4px 20px;
}
.post-body blockquote::before {
  content: "「";
  position: absolute; top: -16px; left: 10px;
  font-family: var(--font-hand);
  font-size: 30px;
  color: var(--seal);
  opacity: .8;
}
.post-body ul { margin: 1.6em 0 1.9em; padding-left: 4px; }
.post-body ul li {
  padding-left: 24px;
  position: relative;
  margin-bottom: .7em;
}
.post-body ul li::before {
  content: "";
  position: absolute; left: 2px; top: .72em;
  width: 8px; height: 8px;
  border: 1.5px solid var(--seal);
  border-radius: 55% 45% 50% 50% / 50% 55% 45% 50%;
  opacity: .8;
}
.post-body strong { font-weight: 700; color: var(--ink); }
.post-body em { font-style: normal; color: var(--seal); }
.post-body code {
  font-family: var(--font-mono);
  font-size: .86em;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: 6px 10px 7px 9px;
  padding: 2px 7px;
}
.post-body hr {
  border: none; height: 14px; margin: 2.4em auto;
  width: 180px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 180 14' preserveAspectRatio='none'><path d='M2 7 C 30 3, 55 10, 90 6 S 150 4, 178 7.5' fill='none' stroke='rgba(46,40,32,.35)' stroke-width='1.2'/></svg>") no-repeat center;
}
.post-end {
  text-align: center;
  margin-top: 4em;
  color: var(--ink-faint);
  font-family: var(--font-hand);
  letter-spacing: .5em;
  font-size: 15px;
}

/* 阅读进度墨线 */
.read-progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 1500;
  pointer-events: none;
}
.read-progress .rp-track {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--seal), #d0643f);
  transform-origin: left;
  transform: scaleX(var(--progress, 0));
  border-radius: 0 3px 3px 0;
}
.read-progress .rp-paw {
  position: absolute;
  top: 4px;
  left: calc(var(--progress, 0) * 100%);
  translate: -50% 0;
  color: var(--seal);
  transition: opacity .3s;
  opacity: 0;
}
.read-progress.is-on .rp-paw { opacity: .85; }
.read-progress .rp-paw svg { width: 13px; height: 13px; transform: rotate(45deg); }

/* 上一篇 / 下一篇 */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: clamp(56px, 8vw, 90px);
}
.post-nav a.pn-card {
  border: 1.4px solid var(--line-strong);
  padding: 20px 22px;
  border-radius: 18px 26px 20px 28px / 24px 18px 28px 20px;
  display: block;
  transition: all .5s var(--ease-spring);
  background: var(--paper-card);
}
.post-nav a.pn-card:hover {
  transform: translateY(-5px) rotate(-.5deg);
  box-shadow: var(--shadow-card);
  border-color: var(--seal);
}
.post-nav .pn-label { font-size: 12px; color: var(--ink-faint); letter-spacing: .25em; margin-bottom: 8px; display: flex; align-items: center; gap: 7px; }
.post-nav .pn-label svg { width: 13px; height: 13px; }
.post-nav .pn-title { font-family: var(--font-hand); font-weight: 700; font-size: 16.5px; line-height: 1.6; }
.post-nav .pn-next { text-align: right; }

/* ---------- 21. 关于页 ---------- */
.letter {
  background: var(--paper-card);
  border: 1px solid rgba(46, 40, 32, .12);
  box-shadow: var(--shadow-card);
  padding: clamp(30px, 5vw, 60px);
  position: relative;
  transform: rotate(-.4deg);
}
.letter::before {
  content: "";
  position: absolute; top: -12px; left: 50%;
  translate: -50% 0;
  width: 110px; height: 26px;
  background: rgba(222, 205, 160, .7);
  box-shadow: 0 1px 3px rgba(46, 40, 32, .14);
  transform: rotate(-2deg);
}
.letter .letter-body p { margin-bottom: 1.6em; text-align: justify; }
.letter .letter-sign {
  display: flex; justify-content: flex-end; align-items: center; gap: 20px;
  margin-top: 2.4em;
  font-family: var(--font-hand);
  font-size: 20px;
}

.timeline { position: relative; padding-left: 30px; }
.timeline::before {
  content: "";
  position: absolute; left: 7px; top: 6px; bottom: 6px;
  width: 2px;
  background-image: linear-gradient(var(--line-strong) 55%, transparent 45%);
  background-size: 2px 12px;
}
.tl-item { position: relative; padding-bottom: clamp(26px, 3.4vw, 40px); }
.tl-item:last-child { padding-bottom: 0; }
.tl-item .tl-dot {
  position: absolute; left: -30px; top: 8px;
  width: 16px; height: 16px;
  border: 2px solid var(--seal);
  border-radius: 52% 48% 55% 45% / 48% 55% 45% 52%;
  background: var(--paper);
  display: grid; place-items: center;
}
.tl-item .tl-dot::after {
  content: "";
  width: 6px; height: 6px;
  background: var(--seal);
  border-radius: 50%;
  opacity: .85;
}
.tl-item .tl-year {
  font-family: var(--font-latin);
  font-style: italic;
  font-size: 14.5px;
  color: var(--ink-faint);
  letter-spacing: .1em;
}
.tl-item .tl-head { font-family: var(--font-hand); font-size: 18.5px; font-weight: 700; margin: 2px 0 6px; }
.tl-item .tl-text { font-size: 14.5px; color: var(--ink-soft); line-height: 1.85; }

/* ---------- 22. 猫（SVG 交互） ---------- */
.cat-bubble {
  position: absolute;
  background: var(--paper-card);
  border: 1.6px solid var(--ink);
  border-radius: 55% 45% 50% 50% / 48% 55% 45% 52%;
  padding: 8px 18px 9px;
  font-family: var(--font-hand);
  font-size: 15px;
  white-space: nowrap;
  opacity: 0;
  transform: scale(.6) rotate(-6deg);
  transform-origin: bottom left;
  transition: opacity .35s var(--ease-out), transform .5s var(--ease-spring);
  pointer-events: none;
  z-index: 50;
}
.cat-bubble::after {
  content: "";
  position: absolute; bottom: -8px; left: 22%;
  width: 12px; height: 12px;
  background: inherit;
  border-right: 1.6px solid var(--ink);
  border-bottom: 1.6px solid var(--ink);
  transform: rotate(55deg) skewX(15deg);
}
.cat-bubble.is-pop { opacity: 1; transform: scale(1) rotate(-2deg); }

/* ---------- 23. 响应式 ---------- */
@media (max-width: 960px) {
  .now-grid { grid-template-columns: 1fr; }
  .archive-row { grid-template-columns: 92px 1fr; }
  .archive-row .ar-tags { grid-column: 2; margin-top: 6px; }
  .post-nav { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .brand .brand-sub { display: none; }
  .brand .brand-word { font-size: 19px; }
  .main-nav { gap: 12px; }
  .main-nav .nav-dot { display: none; }
  .main-nav a.nav-link { font-size: 15px; white-space: nowrap; }
  .archive-row { grid-template-columns: 1fr; gap: 6px; }
  .archive-row .ar-paw { display: none; }
}

/* ---------- 24. 无障碍：减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .draw-path { stroke-dashoffset: 0; }
  .cursor-dot, .cursor-ring, .page-wipe { display: none; }
}

/* ============================================================
   Markdown 全量渲染样式（.post-body = 前台文章页，.md-body = 后台预览）
   覆盖 goldmark / marked 输出的全部元素，风格延续手绘纸面
   ============================================================ */
.md-body { font-size: 16.5px; line-height: 1.95; color: var(--ink); }
.md-body > *:first-child { margin-top: 0; }
.post-body h1, .md-body h1,
.post-body h3, .md-body h3,
.post-body h4, .md-body h4,
.post-body h5, .md-body h5,
.post-body h6, .md-body h6 {
  font-family: var(--font-hand);
  font-weight: 700;
  margin: 2em 0 .8em;
  line-height: 1.35;
}
.post-body h1, .md-body h1 { font-size: clamp(24px, 2.8vw, 30px); }
.post-body h3, .md-body h3 { font-size: clamp(19px, 2vw, 22px); }
.post-body h4, .md-body h4 { font-size: 18px; }
.post-body h5, .md-body h5 { font-size: 17px; }
.post-body h6, .md-body h6 { font-size: 16px; color: var(--ink-soft); }
.post-body ol, .md-body ol { margin: 1.4em 0 1.8em; padding-left: 26px; }
.post-body ol li, .md-body ol li { margin-bottom: .5em; }
.post-body a, .md-body a {
  color: var(--seal);
  text-decoration: none;
  border-bottom: 1.5px dashed rgba(178, 58, 42, .45);
  padding-bottom: 1px;
}
.post-body a:hover, .md-body a:hover { border-bottom-style: solid; }
.post-body img, .md-body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.8em auto;
  border: 1px solid var(--line);
  border-radius: 3px 14px 4px 12px / 6px 10px 3px 12px;
  padding: 8px;
  background: var(--paper-card);
  box-shadow: 2px 3px 0 rgba(46, 40, 32, .08);
}
.post-body code, .md-body code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: .86em;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: 4px 8px 4px 8px;
  padding: .1em .45em;
  color: var(--seal);
  word-break: break-word;
}
.post-body pre, .md-body pre {
  margin: 1.8em 0;
  padding: 18px 20px;
  background: #2e2820;
  border-radius: 4px 16px 6px 14px / 8px 12px 4px 16px;
  overflow-x: auto;
  box-shadow: 3px 4px 0 rgba(46, 40, 32, .12);
}
.post-body pre code, .md-body pre code {
  background: none;
  border: none;
  color: #f3ecdd;
  padding: 0;
  font-size: .88em;
  line-height: 1.7;
}
.post-body table, .md-body table {
  width: 100%;
  margin: 1.8em 0;
  border-collapse: collapse;
  font-size: .95em;
}
.post-body th, .md-body th,
.post-body td, .md-body td {
  border: 1.5px solid var(--line-strong);
  padding: .55em .9em;
  text-align: left;
}
.post-body th, .md-body th {
  font-family: var(--font-hand);
  background: var(--paper-deep);
  font-weight: 700;
}
.post-body tbody tr:nth-child(even), .md-body tbody tr:nth-child(even) { background: rgba(235, 226, 205, .4); }
.post-body del, .md-body del { color: var(--ink-faint); text-decoration-color: var(--seal); text-decoration-thickness: 2px; }
.post-body hr, .md-body hr {
  border: none;
  height: 14px;
  margin: 2.4em auto;
  background: repeating-linear-gradient(100deg, transparent, transparent 7px, var(--line-strong) 8px, transparent 10px, transparent 15px, var(--line) 16px, transparent 18px);
}
.post-body input[type="checkbox"], .md-body input[type="checkbox"] {
  appearance: none;
  width: 15px; height: 15px;
  border: 1.8px solid var(--line-strong);
  border-radius: 3px 6px 3px 6px;
  vertical-align: -2px;
  margin-right: .45em;
  position: relative;
  background: var(--paper-card);
}
.post-body input[type="checkbox"]:checked::after, .md-body input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute; inset: -3px 0 0 1px;
  color: var(--seal);
  font-size: 14px;
  font-weight: 700;
}
.md-body ul.contains-task-list, .post-body ul.contains-task-list { list-style: none; padding-left: 6px; }
.md-body blockquote { margin: 1.8em 0; padding: 14px 22px; background: linear-gradient(rgba(235, 226, 205, .55), rgba(235, 226, 205, .55)); border-radius: 4px 22px 6px 18px / 8px 16px 4px 20px; color: var(--ink-soft); }
.md-body p { margin-bottom: 1.5em; }

/* ============================================================
   评论区 .cm-*（文章页底部 · 留言便签墙 + 胶带信纸表单）
   选择器统一挂在 .cm-section 下：admin/comments.html 后台页
   自身也有一套 .cm-*（cm-card/cm-author 等），避免互相污染
   ============================================================ */
.cm-section {
  margin-top: clamp(56px, 8vw, 90px);
  scroll-margin-top: 90px;
}

/* 区头：手写标题 + 印红手绘下划线 + 淡墨小注 */
.cm-section .cm-head { margin-bottom: clamp(28px, 4.5vw, 46px); }
.cm-section .cm-title {
  font-size: clamp(24px, 3vw, 32px);
  position: relative;
  display: inline-block;
  padding-bottom: 9px;
}
.cm-section .cm-title::after {
  content: "";
  position: absolute; left: 2%; right: 0; bottom: 0;
  height: 8px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 8' preserveAspectRatio='none'><path d='M2 5 C 20 2.5, 38 6.5, 58 4.2 S 98 3.2, 118 4.8' fill='none' stroke='%23b23a2a' stroke-width='2.2' stroke-linecap='round' opacity='.8'/></svg>") no-repeat;
  background-size: 100% 100%;
}
.cm-section .cm-count {
  display: inline-block;
  margin-left: 12px;
  font-family: var(--font-hand);
  font-size: 15px;
  font-weight: 400;
  color: var(--seal);
  letter-spacing: .08em;
  opacity: .85;
  transform: rotate(-2.5deg) translateY(-6px);
}
.cm-section .cm-sub {
  margin-top: 10px;
  font-family: var(--font-hand);
  font-size: 13.5px;
  color: var(--ink-faint);
  letter-spacing: .22em;
}

/* 便签墙：宽两列窄单列，各自高度独立，像随手贴上墙的纸条 */
.cm-section .cm-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: clamp(20px, 2.8vw, 32px);
  align-items: start;
}
.cm-section .cm-note {
  position: relative;
  background: var(--paper-card);
  border: 1px solid rgba(46, 40, 32, .12);
  border-radius: 4px 18px 6px 16px / 10px 6px 14px 8px;
  box-shadow: 0 1px 2px rgba(46, 40, 32, .07), 0 14px 26px -18px rgba(46, 40, 32, .3);
  padding: 26px 20px 18px;
  transform: rotate(var(--tilt, .4deg));
  /* opacity 段沿用 data-reveal 的 --rd 交错延迟；transform/阴影即时响应 hover */
  transition:
    opacity 1s var(--ease-out) var(--rd, 0ms),
    transform .55s var(--ease-spring),
    box-shadow .55s var(--ease-out);
}
/* 顶部胶带（做法同 .polaroid / .letter） */
.cm-section .cm-note::before {
  content: "";
  position: absolute;
  top: -9px; left: 50%;
  translate: -50% 0;
  width: 66px; height: 19px;
  background: rgba(222, 205, 160, .68);
  box-shadow: 0 1px 3px rgba(46, 40, 32, .14);
  transform: rotate(-3deg);
  z-index: 2;
}
/* 随手贴：三种倾角与胶带角度；元素自带 --tilt 时优先用 --tilt */
.cm-section .cm-note:nth-child(3n+1) { transform: rotate(var(--tilt, -.8deg)); }
.cm-section .cm-note:nth-child(3n+1)::before { transform: rotate(4deg) translateX(-8px); }
.cm-section .cm-note:nth-child(3n+2) { transform: rotate(var(--tilt, .9deg)); }
.cm-section .cm-note:nth-child(3n+2)::before { transform: rotate(-6deg) translateX(-14px); }
.cm-section .cm-note:nth-child(3n) { transform: rotate(var(--tilt, -.35deg)); }
.cm-section .cm-note:nth-child(3n)::before { transform: rotate(2deg) translateX(15px); }
.cm-section .cm-note:hover {
  transform: rotate(var(--tilt, 0deg)) translateY(-5px);
  box-shadow: var(--shadow-card);
}
.cm-section .cm-note-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 8px;
  margin-bottom: 12px;
  border-bottom: 1px dashed var(--line);
}
.cm-section .cm-note-author {
  font-family: var(--font-hand);
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: .06em;
}
.cm-section .cm-note-author::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  margin-right: 8px;
  border-radius: 55% 45% 50% 50% / 50% 55% 45% 50%;
  background: var(--seal);
  opacity: .7;
}
.cm-section .cm-note-date {
  font-family: var(--font-latin);
  font-style: italic;
  font-size: 12.5px;
  color: var(--ink-faint);
  letter-spacing: .04em;
  flex-shrink: 0;
}
.cm-section .cm-note-content {
  font-size: 14.5px;
  line-height: 1.95;
  color: var(--ink);
  word-break: break-word;
}

/* 空态 / 关闭态：像铅笔轻写的字 */
.cm-section .cm-empty,
.cm-section .cm-closed {
  text-align: center;
  padding: clamp(44px, 6vw, 68px) 20px;
  font-family: var(--font-hand);
  font-size: 15px;
  color: var(--ink-faint);
  letter-spacing: .28em;
}

/* 留言表单：一张贴着胶带的小信纸（做法同 .letter） */
.cm-section .cm-form {
  position: relative;
  margin-top: clamp(40px, 6vw, 64px);
  background: var(--paper-card);
  border: 1px solid rgba(46, 40, 32, .12);
  border-radius: 4px 22px 6px 18px / 8px 16px 4px 20px;
  box-shadow: var(--shadow-card);
  padding: clamp(24px, 3.6vw, 36px);
  transform: rotate(-.3deg);
}
.cm-section .cm-form::before {
  content: "";
  position: absolute;
  top: -12px; left: 50%;
  translate: -50% 0;
  width: 104px; height: 24px;
  background: rgba(222, 205, 160, .7);
  box-shadow: 0 1px 3px rgba(46, 40, 32, .14);
  transform: rotate(-2deg);
}
/* 称呼：一条虚线书写线 */
.cm-section .cm-author {
  display: block;
  width: 100%;
  font-family: var(--font-hand);
  font-size: 16px;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1.5px dashed var(--line-strong);
  border-radius: 0;
  padding: 6px 2px 10px;
  transition: border-color .35s var(--ease-out);
}
/* 内容：格纸横线，行高与线距对齐；local 让线跟着内容滚动 */
.cm-section .cm-content {
  display: block;
  width: 100%;
  min-height: 182px;
  margin-top: 20px;
  padding: 9px 16px;
  font-family: var(--font-hand);
  font-size: 16px;
  line-height: 32px;
  color: var(--ink);
  background-color: var(--paper-card);
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 31px, var(--line) 31px, var(--line) 32px);
  background-attachment: local;
  border: 1.4px solid var(--line-strong);
  border-radius: 6px 14px 6px 14px / 12px 8px 14px 8px;
  resize: vertical;
  transition: border-color .35s var(--ease-out), box-shadow .35s var(--ease-out);
}
.cm-section .cm-author::placeholder,
.cm-section .cm-content::placeholder { color: var(--ink-faint); opacity: 1; }
.cm-section .cm-author:focus,
.cm-section .cm-content:focus { border-color: var(--seal); }
.cm-section .cm-content:focus { box-shadow: 2px 3px 0 rgba(178, 58, 42, .14); }

.cm-section .cm-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 18px;
}
.cm-section .cm-hint {
  font-family: var(--font-hand);
  font-size: 12.5px;
  color: var(--ink-faint);
  letter-spacing: .1em;
}
/* 提交：印章实心钮（呼应 .btn-seal 手感） */
.cm-section .cm-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-hand);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .18em;
  padding: 10px 26px 11px;
  color: #f6efe2;
  background: var(--seal);
  border: 1.6px solid var(--seal);
  border-radius: 46% 54% 48% 52% / 62% 48% 60% 40%;
  box-shadow: inset 0 0 0 2px rgba(246, 239, 226, .32), 0 8px 18px -8px rgba(178, 58, 42, .5);
  cursor: pointer;
  transform: rotate(-1.2deg);
  transition: all .45s var(--ease-spring);
}
.cm-section .cm-submit:hover {
  background: var(--seal-deep);
  border-color: var(--seal-deep);
  transform: rotate(1deg) translateY(-2px);
  box-shadow: inset 0 0 0 2px rgba(246, 239, 226, .32), 0 12px 24px -10px rgba(178, 58, 42, .6);
}
.cm-section .cm-submit:active { transform: translateY(0) scale(.95); }
.cm-section .cm-submit:disabled { opacity: .55; cursor: wait; transform: none; }

/* 结果提示：约定 .cm-msg.ok（苔绿=成功）/ .cm-msg.err（印红=失败）；空时不占位 */
.cm-section .cm-msg {
  margin-top: 12px;
  font-family: var(--font-hand);
  font-size: 14px;
  letter-spacing: .1em;
  color: var(--ink-soft);
}
.cm-section .cm-msg:empty { display: none; }
.cm-section .cm-msg.ok { color: var(--moss); }
.cm-section .cm-msg.err { color: var(--seal); }

@media (max-width: 640px) {
  .cm-section .cm-list { grid-template-columns: 1fr; gap: 22px; }
  .cm-section .cm-note { padding: 24px 16px 15px; }
  .cm-section .cm-note-content { font-size: 14px; }
  .cm-section .cm-title { font-size: 22px; }
  .cm-section .cm-sub { letter-spacing: .14em; }
  .cm-section .cm-form { padding: 22px 16px 20px; }
  .cm-section .cm-content {
    font-size: 15px;
    line-height: 30px;
    min-height: 168px;
    background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 29px, var(--line) 29px, var(--line) 30px);
  }
  .cm-section .cm-foot { flex-direction: column-reverse; align-items: stretch; }
  .cm-section .cm-hint { text-align: center; }
  .cm-section .cm-submit { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .cm-section .cm-note,
  .cm-section .cm-form,
  .cm-section .cm-submit { transition: none; }
  .cm-section .cm-note:hover { transform: rotate(var(--tilt, 0deg)); }
}

/* ============================================================
   25. 后台「推开门」入场 —— 双扉合门 / 推门（.door-*）
   overlay 全部由 JS 动态创建：login.html 登录成功播「合门」，
   admin.js boot 检测 mb-door-pending 播「推门」，两种动作共用本节。
   z-index 9000：盖过 .page-wipe(2500) / .paper-grain(2000) /
   toast / .modal-mask(300) / 光标层(3000)。
   ============================================================ */
/* 门开着期间锁住滚动，结束后由 JS 摘除 */
body.door-lock { overflow: hidden; }

/* 舞台：全屏左右双扉；perspective 给推门一点真透视；永不拦截点击 */
.door-stage {
  --door-dur-close: .45s;                            /* 合门时长（login） */
  --door-dur-open: .8s;                              /* 推门时长（admin boot，0.65~0.85s） */
  --door-ease-close: cubic-bezier(.55, .06, .35, 1); /* 合门：缓入，双扉撞上中缝 */
  --door-ease-push: cubic-bezier(.6, .05, .62, .4);  /* 推门：先慢后快的“推”感 */
  position: fixed; inset: 0;
  z-index: 9000;
  display: flex;
  perspective: 1200px;
  pointer-events: none;
}

/* 单扇门：深一档的手调纸色门板 + 淡横纹；默认合拢盖住屏幕 */
.door-leaf {
  position: relative;
  width: 50%; height: 100%;
  background-color: #e6d9bd;
  background-image:
    linear-gradient(to bottom, rgba(246, 239, 226, .55), rgba(246, 239, 226, 0) 16%),
    repeating-linear-gradient(to bottom, rgba(46, 40, 32, .05) 0, rgba(46, 40, 32, .05) 1px, transparent 1px, transparent 36px);
  transform: translateX(0) rotateY(0deg);
  transition: transform var(--door-dur-close) var(--door-ease-close);
  will-change: transform;
}
/* 内缘手抖边线即中缝墨线； box-shadow 往中缝加深，像门缝背光 */
.door-leaf--l {
  transform-origin: left center;
  border-right: 2px solid var(--line-strong);
  border-radius: 0 10px 0 16px / 0 12px 0 12px;
  box-shadow: inset -16px 0 26px -20px rgba(46, 40, 32, .55);
}
.door-leaf--r {
  transform-origin: right center;
  border-left: 2px solid var(--line-strong);
  border-radius: 14px 0 12px 0 / 12px 0 14px 0;
  box-shadow: inset 16px 0 26px -20px rgba(46, 40, 32, .55);
}
/* 右扉锁孔位：一枚印红「喵」章（呼应 .seal 配方），克制只此一处 */
.door-leaf--r::after {
  content: "喵";
  position: absolute;
  top: 50%; right: clamp(16px, 4vw, 42px);
  transform: translateY(-50%) rotate(6deg);
  width: 52px; height: 52px;
  display: grid; place-items: center;
  font-family: var(--font-hand);
  font-size: 28px; font-weight: 700;
  color: #f6efe2;
  background: var(--seal);
  border-radius: 46% 54% 48% 52% / 62% 48% 60% 40%;
  box-shadow: inset 0 0 0 2.5px rgba(246, 239, 226, .92), inset 0 0 0 5px var(--seal), inset 0 0 14px rgba(0, 0, 0, .18);
  opacity: .92;
}
/* 推开：左扉向左、右扉向右各滑出，外缘为轴微旋，像真被推开 */
.door-stage.is-open .door-leaf--l { transform: translateX(-104%) rotateY(-7deg); transition: transform var(--door-dur-open) var(--door-ease-push); }
.door-stage.is-open .door-leaf--r { transform: translateX(104%) rotateY(7deg); transition: transform var(--door-dur-open) var(--door-ease-push); }

/* 减动效：不演门（JS 侧同样跳过），此处为 CSS 层兜底 */
@media (prefers-reduced-motion: reduce) {
  .door-stage { display: none; }
  .door-leaf,
  .door-stage.is-open .door-leaf--l,
  .door-stage.is-open .door-leaf--r { transition: none; }
}
