/* ============================================================
   《廿四节气 · 时序之美》样式
   宣纸底 · 水墨墨色 · 四季插值 accent(JS 每帧写入 --accent 等)
   ============================================================ */

:root {
  --paper: #f4efe3;
  --paper-card: #fbf7ec;
  --ink: #2e2a24;
  --ink-soft: #6f6757;
  --ink-faint: #a49b88;
  --seal: #a63a2b;
  --seal-deep: #8c2f23;
  --accent: #4a7c59;          /* JS 滚动插值覆盖 */
  --accent2: #6b9d78;
  --tint: #eef3ea;
  --serif: 'Noto Serif SC', 'Songti SC', 'STSong', 'SimSun', serif;
  --brush: 'Ma Shan Zheng', 'Kaiti SC', 'STKaiti', 'KaiTi', 'DFKai-SB', serif;
  --shadow-soft: 0 10px 40px rgba(46, 42, 36, .10), 0 2px 8px rgba(46, 42, 36, .06);
  --shadow-lift: 0 22px 60px rgba(46, 42, 36, .16), 0 6px 18px rgba(46, 42, 36, .10);
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--serif);
  color: var(--ink);
  background:
    radial-gradient(120vw 60vh at 85% -10%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%),
    linear-gradient(180deg, var(--tint) 0%, var(--paper) 34%, var(--paper) 100%);
  line-height: 1.9;
  overflow-x: hidden;
  transition: none;
}

/* 宣纸颗粒(覆盖全站,含弹层) */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  background-image: var(--noise);
  background-size: 220px 220px;
  opacity: .5;
  mix-blend-mode: multiply;
}

::selection { background: color-mix(in srgb, var(--seal) 78%, transparent); color: #fff; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--ink-faint) 70%, transparent); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-faint); }

button { font-family: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ---------------- 开屏水墨 ---------------- */
.ink-boot {
  position: fixed; inset: 0; z-index: 99999;
  display: grid; place-items: center;
  background: var(--paper);
  transition: opacity .65s ease .05s;
}
.ink-boot.done { opacity: 0; pointer-events: none; }
.ink-boot.gone { display: none; }
.ink-blot {
  width: 148vmax; height: 148vmax;
  border-radius: 42% 58% 55% 45% / 46% 41% 59% 54%;
  background: radial-gradient(circle,
    #26221c 0%, #2e2a24 58%,
    rgba(46, 42, 36, .95) 66%,
    rgba(46, 42, 36, 0) 71%);
  transform: scale(0);
  animation: blotGrow 1.05s cubic-bezier(.45, .05, .28, .99) forwards;
}
@keyframes blotGrow {
  0% { transform: scale(0) rotate(0deg); }
  70% { transform: scale(1) rotate(28deg); }
  100% { transform: scale(1.08) rotate(40deg); }
}

/* ---------------- 顶部进度条 / 粒子画布 ---------------- */
.progress-brush {
  position: fixed; top: 0; left: 0; z-index: 960;
  height: 3px; width: 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 70%, transparent), var(--accent));
  border-radius: 0 3px 3px 0;
  box-shadow: 0 1px 6px color-mix(in srgb, var(--accent) 45%, transparent);
}
.fx-canvas { position: fixed; inset: 0; z-index: 1; pointer-events: none; }

/* ---------------- 顶栏 ---------------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 950;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 44px);
  transition: background .35s ease, box-shadow .35s ease, padding .35s ease;
}
.topbar.scrolled {
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(46, 42, 36, .08), 0 8px 30px rgba(46, 42, 36, .06);
  padding-block: 10px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-seal {
  width: 38px; height: 38px; display: grid; place-items: center;
  background: var(--seal); color: #f6efe0;
  font-family: var(--brush); font-size: 22px; line-height: 1;
  border-radius: 6px; box-shadow: inset 0 0 0 2px rgba(246, 239, 224, .55), 0 3px 10px rgba(140, 47, 35, .35);
  transform: rotate(-2deg);
}
.brand-text { font-family: var(--brush); font-size: 20px; letter-spacing: 3px; display: flex; flex-direction: column; line-height: 1.15; }
.brand-text i { font-style: normal; font-family: var(--serif); font-size: 10px; letter-spacing: 5px; color: var(--ink-soft); }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.today-chip {
  font-size: 13px; letter-spacing: 2px; color: var(--ink-soft);
  border: 1px solid color-mix(in srgb, var(--ink-faint) 55%, transparent);
  padding: 7px 14px; border-radius: 999px;
  transition: color .3s, border-color .3s, box-shadow .3s;
}
.today-chip b { font-family: var(--brush); font-size: 16px; color: var(--accent); margin-left: 2px; }
.today-chip:hover { color: var(--ink); border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.menu-btn {
  font-size: 13px; letter-spacing: 3px; padding: 8px 16px; border-radius: 999px;
  color: #f6efe0; background: var(--ink);
  transition: transform .25s, box-shadow .25s, background .3s;
}
.menu-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(46, 42, 36, .25); }

/* ---------------- Hero ---------------- */
.hero {
  position: relative; min-height: 100svh; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.hero-sky { position: absolute; inset: 0; z-index: 0; }
.hero-mtns { position: absolute; inset: auto 0 0 0; width: 100%; height: 52%; }
.hero-mtns .mtn { transform-origin: center; }
.hero-mtns .far { fill: color-mix(in srgb, var(--ink) 13%, transparent); }
.hero-mtns .mid { fill: color-mix(in srgb, var(--ink) 24%, transparent); }
.hero-mtns .near { fill: color-mix(in srgb, var(--ink) 42%, transparent); }
.mtn-sun {
  fill: color-mix(in srgb, var(--seal) 55%, transparent);
  filter: blur(0px);
  animation: sunFloat 9s ease-in-out infinite alternate;
}
.mtn-mist { fill: var(--paper); opacity: .8; }
.mtn-mist.m1 { animation: mistDrift 14s ease-in-out infinite alternate; }
.mtn-mist.m2 { animation: mistDrift 18s ease-in-out infinite alternate-reverse; }
@keyframes sunFloat { from { transform: translateY(0); } to { transform: translateY(14px); } }
@keyframes mistDrift { from { transform: translateX(-36px); } to { transform: translateX(36px); } }
.hero-birds { position: absolute; top: 18%; right: 14%; width: 180px; opacity: .65; }
.hero-birds .bird { fill: none; stroke: color-mix(in srgb, var(--ink) 62%, transparent); stroke-width: 3; stroke-linecap: round; }
.b1 { animation: birdFly 16s ease-in-out infinite alternate; }
.b2 { animation: birdFly 20s ease-in-out infinite alternate-reverse; }
.b3 { animation: birdFly 24s ease-in-out 2s infinite alternate; }
@keyframes birdFly {
  0% { transform: translate(0, 0); }
  50% { transform: translate(-46px, -12px); }
  100% { transform: translate(-110px, 6px); }
}

.hero-inner { position: relative; z-index: 2; text-align: center; padding: 110px 20px 90px; }
.hero-kicker {
  font-size: clamp(13px, 1.6vw, 16px); letter-spacing: clamp(6px, 1.2vw, 12px);
  color: var(--ink-soft); text-indent: clamp(6px, 1.2vw, 12px);
  margin-bottom: clamp(18px, 3vh, 30px);
}
.hero-title { display: flex; justify-content: center; gap: clamp(6px, 2vw, 26px); font-weight: 400; }
.ht-ch {
  font-family: var(--brush); font-weight: 400;
  font-size: clamp(78px, 15vw, 168px); line-height: 1.08;
  color: var(--ink);
  text-shadow: 0 4px 24px rgba(46, 42, 36, .18);
  opacity: 0;
  animation: charIn .85s cubic-bezier(.2, .75, .3, 1) forwards;
  animation-delay: calc(var(--i) * .16s + .25s);
}
.ht-ch:nth-child(odd) { transform-origin: bottom center; }
@keyframes charIn {
  from { opacity: 0; transform: translateY(38px) rotate(5deg) scale(.94); filter: blur(8px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}
.hero-song { margin-top: clamp(18px, 3vh, 30px); color: var(--ink-soft); font-size: clamp(13px, 1.7vw, 16px); }
.hero-song p { letter-spacing: clamp(5px, 1vw, 9px); line-height: 2.15; }

.brush-in { opacity: 0; animation: fadeUp .9s ease forwards; animation-delay: var(--d, .9s); }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}

/* 今日节气印章 */
.today-seal-wrap { margin-top: clamp(26px, 4.5vh, 46px); }
.today-hint { margin-bottom: 16px; font-size: 12px; letter-spacing: 3px; color: var(--ink-faint); }
.today-seal {
  position: relative; display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  width: clamp(120px, 15vw, 148px); aspect-ratio: 1;
  background: radial-gradient(120% 120% at 30% 22%, #b8503c, var(--seal) 58%, var(--seal-deep));
  color: #f6efe0; border-radius: 10px;
  box-shadow: inset 0 0 0 3px rgba(246, 239, 224, .5), inset 0 0 22px rgba(0, 0, 0, .22), 0 14px 34px rgba(140, 47, 35, .38);
  transform: rotate(-3deg);
  transition: transform .35s cubic-bezier(.3, 1.4, .4, 1), box-shadow .35s;
}
.today-seal:hover { transform: rotate(0deg) scale(1.05); box-shadow: inset 0 0 0 3px rgba(246, 239, 224, .6), inset 0 0 22px rgba(0, 0, 0, .22), 0 20px 44px rgba(140, 47, 35, .5); }
.today-seal:active { transform: rotate(0deg) scale(.97); }
.seal-cap { font-style: normal; font-size: 12px; letter-spacing: 4px; text-indent: 4px; opacity: .92; }
.seal-name { font-family: var(--brush); font-weight: 400; font-size: clamp(40px, 6vw, 56px); line-height: 1.25; text-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.seal-date { font-style: normal; font-size: 11px; letter-spacing: 1px; opacity: .85; }

.scroll-hint {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; letter-spacing: 4px;
  color: rgba(244, 239, 227, .85);
  text-shadow: 0 1px 6px rgba(38, 34, 28, .5);
  white-space: nowrap;
}
.scroll-wheel {
  width: 18px; height: 30px; border: 1.5px solid rgba(244, 239, 227, .75); border-radius: 10px;
  display: grid; justify-content: center; padding-top: 5px;
}
.scroll-wheel i { width: 2px; height: 7px; background: rgba(244, 239, 227, .9); border-radius: 2px; animation: wheelMove 1.6s ease-in-out infinite; }
@keyframes wheelMove {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(9px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ---------------- 四季长卷 ---------------- */
.story { position: relative; z-index: 2; }
.season-section { position: relative; padding: clamp(70px, 12vh, 130px) 0 clamp(60px, 10vh, 110px); }
.season-wm {
  position: absolute; top: 2%; right: -2%; z-index: 0;
  font-family: var(--brush); font-size: clamp(220px, 44vw, 560px); line-height: 1;
  color: color-mix(in srgb, var(--season-accent, var(--accent)) 12%, transparent);
  pointer-events: none; user-select: none;
}
.season-inner { position: relative; z-index: 1; width: min(1080px, 92vw); margin: 0 auto; }
.season-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: clamp(18px, 3vw, 40px); margin-bottom: clamp(44px, 7vh, 76px); }
.season-badge {
  flex: none; width: clamp(84px, 10vw, 112px); aspect-ratio: 1;
  display: grid; place-items: center;
  color: var(--season-accent, var(--accent));
}
.season-badge svg { width: 100%; height: 100%; filter: drop-shadow(0 6px 16px color-mix(in srgb, var(--season-accent, var(--accent)) 30%, transparent)); }
.season-heading { flex: 1 1 300px; min-width: 260px; }
.season-tagline {
  display: flex; align-items: baseline; gap: 16px;
  font-family: var(--brush); font-size: clamp(44px, 6vw, 66px); line-height: 1.2;
  color: var(--season-accent, var(--accent));
}
.season-tagline em {
  font-style: normal; font-family: var(--serif); font-size: clamp(12px, 1.4vw, 14px);
  letter-spacing: 6px; color: var(--ink-faint);
}
.season-intro { max-width: 36em; margin-top: 10px; color: var(--ink-soft); font-size: clamp(14px, 1.7vw, 16px); text-align: justify; }

/* 时间线 + 节气卡片 */
.season-line { position: relative; padding: 10px 0; }
.season-line::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: 50%;
  width: 2px; transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--season-accent, var(--accent)) 45%, transparent) 8%, color-mix(in srgb, var(--season-accent, var(--accent)) 45%, transparent) 92%, transparent);
}
.term-row { position: relative; display: flex; margin: clamp(26px, 4vh, 40px) 0; }
.term-row::before {
  content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--paper-card);
  border: 3px solid var(--season-accent, var(--accent));
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--season-accent, var(--accent)) 16%, transparent);
  z-index: 1;
}
.term-row.alt { justify-content: flex-start; }
.term-row:not(.alt) { justify-content: flex-end; }

.term-card {
  position: relative; width: min(430px, 44%); z-index: 1;
  background: var(--paper-card);
  border: 1px solid color-mix(in srgb, var(--ink) 9%, transparent);
  border-radius: 14px;
  padding: 26px 30px 22px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: transform .4s cubic-bezier(.2, .8, .3, 1), box-shadow .4s;
}
.term-row:not(.alt) .term-card { border-top-right-radius: 4px; }
.term-row.alt .term-card { border-top-left-radius: 4px; }
.term-card:hover { transform: translateY(-7px); box-shadow: var(--shadow-lift); }
.term-card::after {  /* 悬停印章 */
  content: attr(data-seal);
  position: absolute; right: 14px; top: 12px; z-index: 2;
  width: 64px; height: 64px; display: grid; place-items: center;
  font-family: var(--brush); font-size: 26px; color: #f6efe0; line-height: 1;
  background: radial-gradient(115% 115% at 32% 25%, #b8503c, var(--seal) 60%, var(--seal-deep));
  border-radius: 8px;
  box-shadow: inset 0 0 0 2px rgba(246, 239, 224, .5), 0 8px 18px rgba(140, 47, 35, .35);
  opacity: 0; transform: scale(1.7) rotate(-18deg); pointer-events: none;
}
.term-card:hover::after { animation: stampIn .45s cubic-bezier(.3, 1.3, .4, 1) forwards; }
@keyframes stampIn {
  0% { opacity: 0; transform: scale(1.7) rotate(-18deg); }
  62% { opacity: 1; transform: scale(.94) rotate(-8deg); }
  100% { opacity: 1; transform: scale(1) rotate(-8deg); }
}
.tc-glyph {
  position: absolute; right: -14px; bottom: -18px; width: 108px; height: 108px;
  color: var(--season-accent, var(--accent)); opacity: .13; pointer-events: none;
  transition: opacity .4s, transform .5s;
}
.term-card:hover .tc-glyph { opacity: .24; transform: rotate(-6deg) scale(1.06); }
.tc-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: 2px; color: var(--ink-faint); }
.tc-meta b { color: var(--season-accent, var(--accent)); font-weight: 600; }
.tc-name {
  font-family: var(--brush); font-weight: 400;
  font-size: clamp(40px, 5vw, 54px); line-height: 1.25; margin: 4px 0 0;
}
.tc-pinyin { font-size: 12px; letter-spacing: 4px; color: var(--ink-faint); margin-bottom: 10px; }
.tc-proverb {
  font-size: 14px; color: var(--ink-soft); letter-spacing: 1px;
  padding-top: 10px; border-top: 1px dashed color-mix(in srgb, var(--ink-faint) 45%, transparent);
}
.tc-proverb::before { content: '「'; color: var(--season-accent, var(--accent)); }
.tc-proverb::after { content: '」'; color: var(--season-accent, var(--accent)); }

/* 渐显动效 */
.reveal, .term-card { opacity: 0; transform: translateY(30px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .8, .3, 1); }
.reveal.in, .term-card.in { opacity: 1; transform: none; }
.reveal.in { transition-delay: var(--rd, 0s); }

/* ---------------- 分类 ---------------- */
.cats { position: relative; z-index: 2; width: min(1080px, 92vw); margin: 0 auto; padding: clamp(70px, 11vh, 120px) 0 clamp(40px, 6vh, 70px); }
.cats-head { text-align: center; margin-bottom: clamp(36px, 6vh, 56px); }
.sec-title { font-family: var(--brush); font-weight: 400; font-size: clamp(34px, 4.6vw, 50px); letter-spacing: 6px; }
.sec-sub { margin-top: 8px; color: var(--ink-faint); font-size: 13px; letter-spacing: 3px; }
.cats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.cat-card {
  position: relative; background: var(--paper-card);
  border: 1px solid color-mix(in srgb, var(--ink) 9%, transparent);
  border-radius: 14px; padding: 24px 22px 20px; box-shadow: var(--shadow-soft);
  transition: transform .4s, box-shadow .4s;
}
.cat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); }
.cat-card::before {
  content: ''; position: absolute; top: 0; left: 22px; right: 22px; height: 3px;
  border-radius: 0 0 3px 3px; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 20%, transparent));
}
.cat-name { font-family: var(--brush); font-size: 26px; letter-spacing: 3px; color: var(--accent); }
.cat-sub { font-size: 12px; letter-spacing: 3px; color: var(--ink-faint); margin: 2px 0 12px; }
.cat-terms { display: flex; flex-wrap: wrap; gap: 8px; }
.term-chip {
  font-size: 13px; letter-spacing: 1px; padding: 5px 12px; border-radius: 999px;
  color: var(--ink-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  transition: background .3s, color .3s, transform .25s, box-shadow .3s;
}
.term-chip:hover {
  color: #fff; background: var(--accent); transform: translateY(-2px);
  box-shadow: 0 6px 14px color-mix(in srgb, var(--accent) 35%, transparent);
}
.cat-note { margin-top: 12px; font-size: 12px; color: var(--ink-faint); line-height: 1.8; }

/* ---------------- 卷尾 ---------------- */
.outro {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: center; gap: clamp(30px, 6vw, 80px);
  padding: clamp(80px, 14vh, 150px) 20px clamp(60px, 10vh, 110px);
}
.outro-song {
  display: flex; gap: clamp(14px, 2.4vw, 30px);
  writing-mode: vertical-rl; text-orientation: upright;
  font-family: var(--brush); font-size: clamp(20px, 3vw, 32px);
  letter-spacing: clamp(8px, 1.4vw, 14px); color: var(--ink-soft);
}
.outro-song p { height: min(52vh, 420px); }
.outro-song p:nth-child(2) { margin-top: 34px; }
.outro-song p:nth-child(4) { margin-top: 34px; }
.outro-seal {
  width: clamp(96px, 12vw, 128px); aspect-ratio: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: radial-gradient(120% 120% at 30% 22%, #b8503c, var(--seal) 58%, var(--seal-deep));
  border-radius: 10px; color: #f6efe0; transform: rotate(-2.5deg);
  font-family: var(--brush); font-size: clamp(20px, 2.6vw, 27px); letter-spacing: 2px; line-height: 1.3;
  box-shadow: inset 0 0 0 3px rgba(246, 239, 224, .5), inset 0 0 20px rgba(0, 0, 0, .22), 0 16px 36px rgba(140, 47, 35, .35);
}
.outro-seal span { font-family: var(--serif); font-size: 10px; letter-spacing: 4px; text-indent: 4px; opacity: .9; }

.footer { position: relative; z-index: 2; text-align: center; padding: 26px 16px 34px; color: var(--ink-faint); font-size: 12px; letter-spacing: 2px; }

/* ---------------- 卷轴目录 ---------------- */
.catalog {
  position: fixed; inset: 0; z-index: 8000;
  display: grid; place-items: center; padding: 18px;
  background: radial-gradient(90vw 90vh at 50% 45%, rgba(38, 34, 28, .30), rgba(24, 21, 17, .55));
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none; transition: opacity .35s ease;
}
.catalog.open { opacity: 1; pointer-events: auto; }
.catalog-paper {
  width: min(760px, 96vw); max-height: 86vh; overflow: auto;
  background: var(--paper-card); border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  box-shadow: var(--shadow-lift);
  padding: 26px clamp(18px, 3vw, 34px) 30px;
  transform: translateY(26px) scale(.97); transition: transform .35s cubic-bezier(.2, .8, .3, 1);
}
.catalog.open .catalog-paper { transform: none; }
.catalog-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.catalog-head h3 { font-family: var(--brush); font-weight: 400; font-size: 26px; letter-spacing: 4px; }
.catalog-close, .modal-close {
  width: 36px; height: 36px; border-radius: 50%; font-size: 15px; color: var(--ink-soft);
  border: 1px solid color-mix(in srgb, var(--ink-faint) 50%, transparent);
  transition: background .3s, color .3s, transform .3s;
}
.catalog-close:hover, .modal-close:hover { background: var(--ink); color: #f6efe0; transform: rotate(90deg); }
.catalog-group { margin-bottom: 16px; }
.cg-title { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-family: var(--brush); font-size: 20px; letter-spacing: 3px; }
.cg-title i { font-style: normal; font-size: 11px; letter-spacing: 3px; color: var(--ink-faint); font-family: var(--serif); }
.cg-title .dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; opacity: .8; }
.cg-terms { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------------- 详情弹层 ---------------- */
.modal { position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center; padding: 18px; visibility: hidden; }
.modal.open { visibility: visible; }
.modal-veil {
  position: absolute; inset: 0;
  background: radial-gradient(90vw 90vh at 50% 40%, rgba(38, 34, 28, .55), rgba(24, 21, 17, .8));
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  opacity: 0; transition: opacity .4s ease;
}
.modal.open .modal-veil { opacity: 1; }
.modal-paper {
  position: relative; width: min(920px, 96vw); max-height: 90vh; overflow: auto;
  background: var(--paper-card);
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  border-radius: 20px;
  box-shadow: 0 40px 110px rgba(16, 14, 11, .5), 0 8px 30px rgba(16, 14, 11, .3);
  padding: clamp(26px, 4vw, 46px) clamp(22px, 4vw, 50px) clamp(18px, 3vw, 26px);
  transform: translateY(30px) scale(.94); opacity: 0;
  transition: transform .45s cubic-bezier(.2, .9, .3, 1.05), opacity .35s ease;
}
.modal.open .modal-paper { transform: none; opacity: 1; }
.modal-close { position: absolute; top: 16px; right: 16px; z-index: 3; }

.modal-grid { display: grid; grid-template-columns: 250px 1fr; gap: clamp(24px, 4vw, 50px); }

/* 左栏 */
.m-left { position: relative; text-align: center; }
.m-season-stamp {
  display: inline-grid; place-items: center;
  width: 46px; height: 46px; margin-bottom: 14px;
  background: radial-gradient(115% 115% at 32% 25%, #b8503c, var(--seal) 60%, var(--seal-deep));
  color: #f6efe0; border-radius: 8px;
  font-family: var(--brush); font-size: 24px;
  box-shadow: inset 0 0 0 2px rgba(246, 239, 224, .5), 0 6px 16px rgba(140, 47, 35, .35);
  transform: rotate(-4deg);
}
.m-name-vert {
  writing-mode: vertical-rl; text-orientation: upright;
  font-family: var(--brush); font-weight: 400;
  font-size: clamp(64px, 9vw, 96px); line-height: 1.1;
  letter-spacing: 10px; color: var(--ink); margin: 0 auto 12px;
  text-shadow: 0 6px 26px rgba(46, 42, 36, .16);
}
.m-pinyin { font-size: 14px; letter-spacing: 5px; color: var(--accent); }
.m-en { font-size: 11px; letter-spacing: 2px; color: var(--ink-faint); margin-top: 2px; }
.m-lon-date { margin-top: 18px; display: grid; gap: 8px; justify-items: center; }
.m-lon {
  width: 92px; height: 92px; border-radius: 50%;
  display: grid; place-items: center; align-content: center;
  border: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  color: var(--accent); font-size: 12px; letter-spacing: 2px;
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}
.m-lon b { font-family: var(--brush); font-size: 22px; letter-spacing: 1px; }
.m-date { font-size: 13px; color: var(--ink-soft); letter-spacing: 2px; }
.m-date b { color: var(--ink); font-size: 15px; }
.m-glyph { position: absolute; left: -8px; bottom: -16px; width: 96px; height: 96px; color: var(--accent); opacity: .12; pointer-events: none; }

/* 右栏 */
.m-right { min-width: 0; }
.m-desc { font-size: 15px; color: var(--ink-soft); text-align: justify; letter-spacing: .5px; }
.m-block-title {
  display: flex; align-items: center; gap: 10px;
  margin: 22px 0 12px; font-family: var(--brush); font-size: 21px; letter-spacing: 3px; color: var(--ink);
}
.m-block-title::before { content: ''; width: 5px; height: 20px; border-radius: 3px; background: var(--accent); }
.m-block-title i { font-style: normal; font-size: 11px; letter-spacing: 3px; color: var(--ink-faint); font-family: var(--serif); }
.m-hou { display: grid; gap: 10px; }
.hou-item { display: flex; gap: 14px; align-items: flex-start; }
.hou-tag {
  flex: none; width: 56px; text-align: center;
  font-size: 11px; letter-spacing: 2px; color: #fff; padding: 4px 0; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 82%, transparent);
}
.hou-body { min-width: 0; }
.hou-name { font-family: var(--brush); font-size: 19px; letter-spacing: 2px; line-height: 1.5; }
.hou-desc { font-size: 13px; color: var(--ink-soft); line-height: 1.85; }

.m-poem {
  margin-top: 22px; padding: 14px 18px;
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  border-radius: 0 12px 12px 0;
}
.m-poem-line { font-family: var(--brush); font-size: clamp(19px, 2.4vw, 24px); letter-spacing: 2px; line-height: 1.7; }
.m-poem-src { margin-top: 4px; font-size: 12px; color: var(--ink-faint); letter-spacing: 2px; }
.m-customs { font-size: 14px; color: var(--ink-soft); text-align: justify; }
.m-proverb {
  margin-top: 16px; display: inline-block;
  font-family: var(--brush); font-size: 18px; letter-spacing: 2px;
  color: var(--accent);
  padding: 8px 16px; border: 1.5px dashed color-mix(in srgb, var(--accent) 55%, transparent); border-radius: 10px;
}

/* 页签(南昌农耕日历) */
.m-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 14px; }
.m-tabbtn {
  font-size: 13px; letter-spacing: 2px; padding: 7px 15px; border-radius: 999px;
  color: var(--ink-soft);
  border: 1px solid color-mix(in srgb, var(--ink-faint) 50%, transparent);
  transition: color .3s, background .3s, border-color .3s, transform .25s;
}
.m-tabbtn:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-1px); }
.m-tabbtn.on { color: #fff; background: var(--accent); border-color: var(--accent); }
.m-panel { display: none; }
.m-panel.on { display: block; animation: fadeUp .4s ease; }
.hou-tag.nc { font-family: var(--brush); font-size: 14px; letter-spacing: 0; }
.m-nc-src { margin-top: 12px; font-size: 11px; letter-spacing: 2px; color: var(--ink-faint); }
.m-recipe-name {
  font-family: var(--brush); font-weight: 400;
  font-size: clamp(28px, 3.4vw, 36px); line-height: 1.4; letter-spacing: 2px;
  color: var(--ink); margin-bottom: 6px;
}
.m-recipe-name::before { content: '食谱 · '; font-size: 15px; color: var(--accent); }
.m-recipe-src { margin-top: 12px; font-size: 12px; letter-spacing: 2px; color: var(--ink-faint); }
.m-farm-line {
  font-family: var(--brush); font-weight: 400;
  font-size: clamp(24px, 3vw, 32px); line-height: 1.8; letter-spacing: 2px;
  color: var(--accent); margin-bottom: 8px;
}

/* 弹层底部导航 */
.modal-nav { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: clamp(20px, 3vh, 30px); padding-top: 14px; border-top: 1px dashed color-mix(in srgb, var(--ink-faint) 45%, transparent); }
.mn-btn {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; letter-spacing: 2px; color: var(--ink-soft);
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--ink-faint) 50%, transparent);
  transition: color .3s, border-color .3s, background .3s, transform .25s;
}
.mn-btn span { font-size: 18px; line-height: 1; }
.mn-btn:hover { color: #fff; background: var(--ink); border-color: var(--ink); transform: translateY(-2px); }
.mn-dots { display: flex; flex-wrap: wrap; gap: 5px; max-width: 40%; justify-content: center; }
.mn-dots i { width: 6px; height: 6px; border-radius: 50%; background: color-mix(in srgb, var(--ink-faint) 55%, transparent); transition: background .3s, transform .3s; }
.mn-dots i.on { background: var(--accent); transform: scale(1.5); }

/* 弹层内容分层渐入 */
.modal.open .m-left > *, .modal.open .m-right > * {
  opacity: 0; animation: fadeUp .55s ease forwards;
}
.modal.open .m-right > *:nth-child(1) { animation-delay: .08s; }
.modal.open .m-right > *:nth-child(2) { animation-delay: .14s; }
.modal.open .m-right > *:nth-child(3) { animation-delay: .2s; }
.modal.open .m-right > *:nth-child(4) { animation-delay: .26s; }
.modal.open .m-right > *:nth-child(5) { animation-delay: .32s; }
.modal.open .m-right > *:nth-child(6) { animation-delay: .38s; }
.modal.open .m-right > *:nth-child(7) { animation-delay: .44s; }
.modal.open .m-left > * { animation-delay: .05s; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 860px) {
  .modal-grid { grid-template-columns: 1fr; }
  .m-left { display: flex; align-items: center; justify-content: center; gap: 18px; text-align: left; flex-wrap: wrap; }
  .m-name-vert { writing-mode: horizontal-tb; text-orientation: initial; font-size: clamp(56px, 14vw, 72px); letter-spacing: 8px; margin: 0; }
  .m-lon-date { margin-top: 0; grid-auto-flow: column; align-items: center; gap: 14px; }
  .m-lon { width: 74px; height: 74px; }
  .m-glyph { display: none; }
  .m-season-stamp { margin-bottom: 0; }
  .mn-dots { display: none; }
}

@media (max-width: 760px) {
  .brand-text i { display: none; }
  .today-chip { display: none; }
  .season-line::before { left: 12px; }
  .term-row, .term-row.alt { justify-content: flex-start; padding-left: 34px; }
  .term-row::before { left: 12px; }
  .term-card, .term-row.alt .term-card, .term-row:not(.alt) .term-card { width: 100%; border-radius: 14px; border-top-left-radius: 4px; }
  .hero-birds { width: 120px; right: 8%; }
  .outro { flex-direction: column; gap: 40px; }
  .outro-song { font-size: 19px; }
  .menu-btn { padding: 7px 12px; font-size: 12px; }
}

/* 弹层移动端全屏化 */
@media (max-width: 560px) {
  .modal { padding: 0; }
  .modal-paper { width: 100vw; max-height: 100svh; height: 100svh; border-radius: 0; }
}

/* 减少动态 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .reveal, .term-card { opacity: 1; transform: none; }
  .brush-in, .ht-ch { opacity: 1; }
  .ink-boot { display: none; }
}
