/* ===== 中心大事纪：横向年份时间轴 ===== */
.events{position:relative;overflow:hidden;padding-bottom:190px;background:var(--paper);border-top:1px solid rgba(124,20,23,.07);border-bottom:1px solid rgba(124,20,23,.07)}
/* 底部山峦：取自 .ai 素材的竖排线山水，两排山体前后叠压，每根排线从山脊起笔向下渐淡；按高度等比缩放、居中裁切，左右镜像拼接铺满。
   拆为两层视差：::before 后排远山、::after 前排近山，两张 SVG 坐标系一致，静止居中时叠成原图 */
.events::before,.events::after{
  content:"";position:absolute;left:0;right:0;bottom:0;height:168px;pointer-events:none;
  background:url(../img/ridge-front.svg) calc(50% + var(--ridge-x,0px)) bottom/auto 100% no-repeat;
  transition:background-position 1.4s cubic-bezier(.22,.61,.36,1)
}
/* timeline.js 按滚动进度写入 --ridge-x（±240px）：近山全幅、远山 0.4 倍且过渡更长，
   前后错速错时，翻页时两排山一快一慢地滑动、先后停稳，形成起伏流动感。
   图宽约 3110px、居中，1920 宽屏两侧各余约 590px，位移不会露出边缘 */
.events::before{
  background-image:url(../img/ridge-back.svg);
  background-position:calc(50% + var(--ridge-x,0px) * .4) bottom;
  transition-duration:2.2s
}
@media (prefers-reduced-motion:reduce){.events::before,.events::after{transition:none}}
.events > .wrap{position:relative;z-index:1}
.htl{position:relative}
.htl-viewport{
  overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scroll-behavior:smooth;
  scrollbar-width:none;outline:none;margin:0 -12px;padding:6px 0 4px
}
.htl-viewport::-webkit-scrollbar{display:none}
/* 滚动区获得键盘焦点时铺一层极浅的酒红底，不画外框 */
.htl-viewport{border-radius:var(--r-md);transition:background .3s}
.htl-viewport:focus-visible{background:rgba(124,20,23,.035)}
.htl-track{list-style:none;margin:0;padding:0;display:flex}
/* 卡片拉伸为同一高度，年份与轴线统一落在底部 */
.htl-col{flex:0 0 25%;min-width:250px;padding:0 12px;scroll-snap-align:start;display:flex;flex-direction:column}

.htl-card{
  flex:1;position:relative;background:var(--cream);border:1px solid rgba(124,20,23,.1);
  border-top:2px solid var(--gold);border-radius:0 0 var(--r-md) var(--r-md);padding:22px 22px 18px;
  transition:border-color .35s var(--ease),box-shadow .35s var(--ease),transform .35s var(--ease)
}
.htl-card::after{
  content:"";position:absolute;left:50%;bottom:-7px;width:12px;height:12px;margin-left:-6px;
  background:var(--cream);border-right:1px solid rgba(124,20,23,.1);border-bottom:1px solid rgba(124,20,23,.1);
  transform:rotate(45deg);transition:border-color .35s var(--ease)
}
.htl-col:hover .htl-card{border-color:rgba(195,160,99,.85);border-top-color:var(--gold);box-shadow:0 26px 50px -38px rgba(60,14,12,.55);transform:translateY(-4px)}
.htl-col:hover .htl-card::after{border-color:rgba(195,160,99,.85)}
/* 键盘聚焦到列内条目时整列呈现悬停态；:has 单独成规则，不支持的浏览器只丢这几条，不影响悬停 */
.htl-col:has(:focus-visible) .htl-card{border-color:rgba(195,160,99,.85);border-top-color:var(--gold);box-shadow:0 26px 50px -38px rgba(60,14,12,.55);transform:translateY(-4px)}
.htl-col:has(:focus-visible) .htl-card::after{border-color:rgba(195,160,99,.85)}
.htl-col:has(:focus-visible) .htl-year{color:var(--wine)}
.htl-col:has(:focus-visible) .htl-node{transform:scale(1.2)}
.htl-card-head{display:flex;align-items:baseline;justify-content:space-between;padding-bottom:12px;margin-bottom:6px;border-bottom:1px solid var(--line)}
.htl-card-head b{font-family:var(--serif);font-size:18px;color:var(--wine);letter-spacing:.06em}
.htl-card-head em{font-style:normal;font-size:14px;letter-spacing:.12em;color:var(--muted)}
/* 右下角淡金色弧纹：以卡片右下角为圆心的几道细弧，内容少时补足空白，内容多时被文字自然盖过 */
.htl-card::before{
  content:"";position:absolute;right:0;bottom:0;width:112px;height:112px;pointer-events:none;
  border-bottom-right-radius:var(--r-md);
  background:repeating-radial-gradient(circle at 100% 100%,transparent 0 15px,rgba(195,160,99,.4) 15px 16px);
  -webkit-mask-image:radial-gradient(circle at 100% 100%,#000 20%,transparent 100%);
  mask-image:radial-gradient(circle at 100% 100%,#000 20%,transparent 100%)
}
.htl-card-head,.htl-card ul{position:relative}
.htl-card ul{list-style:none;margin:0;padding:0}
.htl-card li a{
  display:grid;grid-template-columns:42px minmax(0,1fr);gap:10px;padding:10px 0;
  border-bottom:1px dashed rgba(124,20,23,.12);font-size:14px;line-height:1.65;color:var(--text);transition:color .3s
}
.htl-card li:last-child a{border-bottom:0}
.htl-card li a time{font-family:var(--serif);font-size:14px;color:var(--gold-deep);letter-spacing:.04em;padding-top:1px}
.htl-card li a span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.htl-card li a:hover,.htl-card li a:focus-visible{color:var(--wine)}
.htl-card li a:hover span,.htl-card li a:focus-visible span{text-decoration:underline;text-underline-offset:4px;text-decoration-color:rgba(195,160,99,.7)}

.htl-mark{position:relative;display:flex;flex-direction:column;align-items:center;padding-top:22px}
.htl-year{font-family:var(--serif);font-size:44px;line-height:1;font-weight:700;color:var(--gold);letter-spacing:.02em;transition:color .35s}
.htl-col:hover .htl-year{color:var(--wine)}
.htl-node{
  position:relative;z-index:1;margin-top:16px;width:12px;height:12px;border-radius:50%;
  background:var(--wine);box-shadow:0 0 0 4px rgba(124,20,23,.12);transition:transform .35s var(--ease)
}
.htl-col:hover .htl-node{transform:scale(1.2)}
/* 轴线（9px 高刻度带，主线在第 5px）中心与 12px 圆点中心对齐 */
.htl-mark::after{
  content:"";position:absolute;left:-12px;right:-12px;bottom:2px;height:9px;
  background:
    linear-gradient(90deg,rgba(124,20,23,.38) 50%,transparent 0) 0 4px/8px 1px repeat-x,
    linear-gradient(90deg,rgba(124,20,23,.28) 1px,transparent 0) 0 0/32px 9px repeat-x
}
.htl-ctrl{display:flex;gap:10px;flex:none}
/* 按钮位于标题行最右侧，与说明文字底边对齐 */
.section-head > .htl-ctrl{margin-left:auto}
.htl-btn{
  width:46px;height:46px;border-radius:50%;border:1px solid rgba(124,20,23,.3);background:transparent;
  color:var(--wine);display:grid;place-items:center;cursor:pointer;transition:all .3s var(--ease)
}
.htl-btn:first-child .i-arrow{transform:rotate(180deg)}
.htl-btn:hover:not(:disabled),.htl-btn:focus-visible:not(:disabled){background:var(--wine);border-color:var(--wine);color:#fff}
.htl-btn:disabled{opacity:.35;cursor:default}
