/* ============================================================
   德州二中校友网 · 全站样式（朴素归档风）
   设计取向：模仿官网红色配色，但去掉金色分割线、圆角、渐变与
             悬浮动画等"华而不实"特效，采用早期校园站常见的
             直角、纯色块、细实线边框的朴素版式。
   ============================================================ */

:root {
  --red:        #9c020c;   /* 顶部横幅主色 */
  --red-dark:   #600909;   /* 深红 */
  --red-mid:    #a3000a;   /* 菜单红 */
  --red-bright: #dc0f1e;   /* 高亮红（当前项） */
  --cream:      #fffbee;   /* 页面米白底 */
  --paper:      #ffffff;
  --line:       #cfc6b6;   /* 朴素边框线（灰褐） */
  --line-soft:  #e3ddd2;
  --gray-bg:    #f2f0ea;
  --text:       #333333;
  --text-2:     #666666;
  --text-3:     #999999;
  --link:       #1267c4;
  --maxw:       1100px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: "SimSun", "宋体", "NSimSun", "Microsoft YaHei", serif;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
  background: var(--cream);
  -webkit-text-size-adjust: 100%;
}

/* 标题类用黑体/雅黑，正文与文章用宋体（早期站点常见搭配） */
.brand-text .name, .sec-head .tag, .home-title, .article-title,
.article-body h1, .article-body h2, .article-body h3,
.hero h1, .side-box .hd, .footer-col h4 {
  font-family: "Microsoft YaHei", "微软雅黑", "SimHei", "黑体", sans-serif;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--red-bright); text-decoration: underline; }
img { max-width: 100%; display: block; border: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 12px;
}

/* ============ 顶部横幅（纯深枣红，无渐变无金线）============ */
.site-header {
  background: var(--red);
  color: #fff;
  border-bottom: 1px solid var(--red-dark);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 96px;
  gap: 16px;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand:hover { text-decoration: none; }

.brand-text .name {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 3px;
  line-height: 1.15;
}
.brand-text .slogan {
  font-size: 13px;
  color: #f2d9d9;
  letter-spacing: 2px;
  margin-top: 4px;
}

.header-search { display: flex; align-items: center; gap: 6px; }
.header-search input {
  border: 1px solid var(--red-dark);
  outline: none;
  padding: 6px 10px;
  width: 190px;
  font-size: 13px;
  background: #fff;
  color: var(--text);
}
.header-search button {
  border: 1px solid var(--red-dark);
  cursor: pointer;
  padding: 6px 16px;
  background: #e9d9d9;
  color: var(--red-dark);
  font-size: 13px;
}

/* ============ 主导航（红底白字 + 下拉，纯直角）============ */
.site-nav {
  background: var(--red-mid);
  border-bottom: 1px solid var(--red-dark);
}

.nav-toggle {
  display: none;
  width: 100%;
  text-align: left;
  background: var(--red-mid);
  color: #fff;
  border: 0;
  border-bottom: 1px solid var(--red-dark);
  padding: 11px 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.nav-toggle .bar { float: right; }

.menu {
  display: flex;
  align-items: stretch;
}
.menu > li { position: relative; }
.menu > li > a {
  display: block;
  padding: 0 24px;
  line-height: 42px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  border-right: 1px solid var(--red-dark);
}
.menu > li > a:hover { background: var(--red-bright); color: #fff; text-decoration: none; }
.menu > li.active > a { background: var(--red-dark); }
.menu > li.is-highlight > a { color: #ffe14d; }

.menu .sub {
  position: absolute;
  top: 100%; left: 0;
  min-width: 160px;
  background: #fff;
  border: 1px solid var(--red-dark);
  display: none;
  z-index: 950;
}
.menu li:hover > .sub { display: block; }
.menu .sub a {
  display: block;
  padding: 8px 16px;
  color: var(--text);
  font-size: 13px;
  border-bottom: 1px solid var(--line-soft);
  white-space: nowrap;
}
.menu .sub a:last-child { border-bottom: 0; }
.menu .sub a:hover { background: var(--gray-bg); color: var(--red-bright); text-decoration: none; }

/* ============ 面包屑 ============ */
.crumb {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--text-2);
}
.crumb .wrap { padding-top: 8px; padding-bottom: 8px; }
.crumb a { color: var(--text-2); }
.crumb b { color: var(--red); font-weight: 700; }
.crumb .sep { margin: 0 6px; color: var(--text-3); }

/* ============ 首页横幅区 ============ */
.hero {
  background: var(--red);
  color: #fff;
  padding: 20px 0;
  border-bottom: 1px solid var(--red-dark);
}
.hero h1 { margin: 0 0 6px; font-size: 22px; letter-spacing: 2px; font-weight: 700; }
.hero p { margin: 0; color: #f2d9d9; letter-spacing: 1px; font-size: 14px; }

/* ============ 首页轮播图（朴素：直角、纯红、细边框、无阴影/渐变）============ */
.carousel-sec { padding: 14px 0 0; }
.carousel {
  position: relative;
  height: var(--carousel-h, 320px);
  background: var(--gray-bg);
  border: 1px solid var(--line);
  overflow: hidden;
}
.carousel-track {
  position: relative;
  width: 100%;
  height: 100%;
}
.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s;
}
.carousel-slide.active { opacity: 1; visibility: visible; }
.carousel-slide a { display: block; height: 100%; }
.carousel-slide a:hover { text-decoration: none; }
.carousel-slide .carousel-zoom { cursor: zoom-in; }
.carousel-slide img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.carousel-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: var(--red);
  color: #fff;
  font-size: 14px;
  padding: 6px 12px;
  border-top: 1px solid var(--red-dark);
}
.carousel-prev, .carousel-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 32px; height: 48px;
  background: var(--red-dark); color: #fff;
  border: 1px solid #fff;
  font-size: 16px; cursor: pointer;
}
.carousel-prev { left: 0; }
.carousel-next { right: 0; }
.carousel-prev:hover, .carousel-next:hover { background: var(--red); }
.carousel-dots {
  position: absolute; right: 10px; bottom: 40px;
  display: flex; gap: 4px;
}
.carousel-dot {
  min-width: 22px; height: 22px;
  background: var(--gray-bg); color: var(--red-dark);
  border: 1px solid var(--red-dark);
  font-size: 12px; cursor: pointer;
}
.carousel-dot:hover { background: #fff; }
.carousel-dot.active { background: var(--red); color: #fff; border-color: var(--red); }

/* ============ 栏目区块通用（红色实块标题，无金线）============ */
.section { padding: 20px 0 6px; }
.sec-head {
  display: flex;
  align-items: center;
  border-bottom: 2px solid var(--red);
  margin-bottom: 14px;
}
.sec-head .tag {
  background: var(--red);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  padding: 6px 16px;
  letter-spacing: 1px;
}
.sec-head .more { margin-left: auto; font-size: 13px; color: var(--text-2); }
.sec-head .more a { color: var(--red); }
.sec-head .more a:hover { text-decoration: underline; }

/* ============ 风采缩略（首页顶部，直角实边框）============ */
.feature-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.feature-card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  overflow: hidden;
}
.feature-card:hover { text-decoration: none; border-color: var(--red); }
.feature-card .thumb { height: 130px; background: var(--gray-bg); overflow: hidden; }
.feature-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.feature-card .thumb video { width: 100%; height: 100%; object-fit: cover; background: #1a1a1a; display: block; }
.feature-card .cap {
  padding: 6px 8px;
  font-size: 13px;
  color: var(--text);
  border-top: 1px solid var(--line-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.feature-card .badge {
  position: absolute; top: 0; left: 0;
  background: var(--red); color: #fff;
  font-size: 12px; padding: 1px 8px;
}
.feature-card .badge.video { background: var(--red-bright); }

/* ============ 首页两栏 ============ */
.home-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 22px;
  align-items: start;
}
.home-title {
  font-size: 18px; font-weight: 700; color: var(--red-dark);
  background: var(--gray-bg);
  border-left: 4px solid var(--red);
  padding: 6px 10px; margin: 0 0 12px;
}

/* ============ 文章列表 ============ */
.article-list li {
  display: flex;
  gap: 14px;
  padding: 12px 4px;
  border-bottom: 1px dashed var(--line);
}
.article-list li:hover { background: #fff; }
.article-list .date {
  flex: 0 0 64px;
  text-align: center;
  color: var(--red);
  border-right: 1px solid var(--line);
  padding-right: 12px;
}
.article-list .date .d { font-size: 22px; font-weight: 700; line-height: 1.1; }
.article-list .date .ym { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.article-list .body { flex: 1; min-width: 0; }
.article-list .body h3 {
  margin: 2px 0 6px; font-size: 16px; font-weight: 700; line-height: 1.4;
}
.article-list .body h3 a { color: var(--text); }
.article-list .body h3 a:hover { color: var(--red-bright); text-decoration: underline; }
.article-list .body .sum {
  margin: 0 0 6px; color: var(--text-2); font-size: 13px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.article-list .meta { font-size: 12px; color: var(--text-3); }
.article-list .meta .cat {
  display: inline-block; color: var(--red);
  border: 1px solid var(--line); padding: 0 6px; margin-right: 8px;
}

/* 侧栏 */
.side-box { background: var(--paper); border: 1px solid var(--line); margin-bottom: 16px; }
.side-box .hd { background: var(--red); color: #fff; font-weight: 700; padding: 8px 12px; letter-spacing: 1px; }
.side-box .in { padding: 6px 12px; }
.rank-list li { display: flex; gap: 8px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.rank-list li:last-child { border-bottom: 0; }
.rank-list .no { flex: 0 0 18px; height: 18px; line-height: 18px; text-align: center; background: var(--text-3); color: #fff; font-size: 12px; }
.rank-list li:nth-child(1) .no { background: var(--red-bright); }
.rank-list li:nth-child(2) .no { background: var(--red); }
.rank-list li:nth-child(3) .no { background: var(--red); }
.rank-list a { color: var(--text); }
.rank-list a:hover { color: var(--red-bright); text-decoration: underline; }
.cat-list li { border-bottom: 1px dashed var(--line); }
.cat-list li:last-child { border-bottom: 0; }
.cat-list a { display: block; padding: 8px 0; color: var(--text); }
.cat-list a::before { content: "[ ] "; color: var(--red); }
.cat-list a:hover { color: var(--red-bright); text-decoration: underline; }

/* ============ 分页 ============ */
.pager { display: flex; gap: 4px; justify-content: center; padding: 18px 0; flex-wrap: wrap; }
.pager a, .pager span {
  min-width: 34px; padding: 6px 10px; text-align: center;
  border: 1px solid var(--line); background: var(--paper); font-size: 13px;
}
.pager a:hover { border-color: var(--red); color: var(--red); text-decoration: none; }
.pager .current { background: var(--red); color: #fff; border-color: var(--red); }
.pager .disabled { color: var(--text-3); }

/* ============ 文章详情 ============ */
.article { background: var(--paper); border: 1px solid var(--line); padding: 24px 30px 30px; }
.article-title { font-size: 24px; line-height: 1.4; color: var(--red-dark); margin: 0 0 10px; text-align: center; font-weight: 700; }
.article-sub { text-align: center; color: var(--text-3); font-size: 13px; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.article-sub b { color: var(--red); font-weight: 700; }
.article-sub .dot { margin: 0 8px; }
.article-body { font-size: 16px; line-height: 2; color: #222; font-family: "SimSun", "宋体", "NSimSun", serif; }
.article-body p { margin: 0 0 16px; text-indent: 2em; }
.article-body h2, .article-body h3 { color: var(--red-dark); border-left: 4px solid var(--red); padding-left: 10px; margin: 24px 0 12px; line-height: 1.4; }
.article-body h2 { font-size: 19px; }
.article-body h3 { font-size: 17px; border-left-width: 3px; }
.article-body img { margin: 6px auto 4px; border: 1px solid var(--line); }
.article-body .img-cap { display: block; text-align: center; color: var(--text-3); font-size: 13px; text-indent: 0; margin: 0 0 18px; }
.article-body blockquote { margin: 16px 0; padding: 10px 16px; background: var(--gray-bg); border-left: 3px solid var(--red); color: var(--text-2); }
/* PDF.js 页内翻阅（pdf-viewer.js） */
.pdf-viewer { margin: 0 0 16px; }
.pdf-viewer .pdf-page { margin: 0 0 12px; border: 1px solid var(--line); background: var(--paper); }
.pdf-viewer .pdf-page canvas { display: block; width: 100%; height: auto; }
.pdf-viewer .pdf-page-cap { text-align: center; font-size: 13px; color: var(--text-3); border-top: 1px dashed var(--line); padding: 3px 0; }
.pdf-viewer .pdf-viewer-note { border: 1px dashed var(--line); background: var(--gray-bg); color: var(--text-2); text-align: center; padding: 28px 16px; line-height: 1.9; text-indent: 0; }
.pdf-viewer .pv-tip { font-size: 12px; color: var(--text-3); }
/* 页内文章视频（西瓜播放器 xgplayer，main.js 自动实例化） */
.xg-player { margin: 6px 0 16px; max-width: 100%; }
/* 外层 .xg-holder 作为唯一 16:9 响应式盒子（随正文栏宽度缩放） */
.xg-player .xg-holder { display: block; position: relative; width: 100% !important; max-width: 100%; height: auto !important; aspect-ratio: 16 / 9; border: 1px solid var(--line); background: #1a1a1a; overflow: hidden; }
/* xgplayer 会给内层根节点写内联固定尺寸 600×337.5，移动端会顶出屏幕；强制填满容器随正文栏自适应 */
.xg-player .xg-holder xg-player,
.xg-player .xg-holder .xgplayer,
.xg-player .xg-holder video,
.xg-player .xg-holder canvas { width: 100% !important; height: 100% !important; max-width: 100% !important; }
.article-body ul, .article-body ol { margin: 0 0 16px; padding-left: 2.2em; }
.article-body li { list-style: disc; margin-bottom: 6px; }
.article-body ol li { list-style: decimal; }
.article-body a { color: var(--link); text-decoration: underline; }
.article-body hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
.article-body pre { background: #eee; border: 1px solid var(--line); color: #222; padding: 12px; overflow: auto; text-indent: 0; }
.article-body code { font-family: Consolas, "Courier New", monospace; }

.article-tags { margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-3); }
.article-tags span { display: inline-block; background: var(--gray-bg); color: var(--text-2); padding: 1px 8px; margin-right: 6px; }
.article-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.article-nav a { flex: 1; min-width: 220px; background: var(--paper); border: 1px solid var(--line); padding: 10px 14px; font-size: 13px; color: var(--text-2); }
.article-nav a:hover { border-color: var(--red); color: var(--red); text-decoration: none; }
.article-nav a .k { color: var(--text-3); font-size: 12px; }
.article-nav a.next { text-align: right; }

/* ============ 风采展示页（网盘式媒体墙）============ */
.gallery-toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--paper); border: 1px solid var(--line);
  padding: 10px 14px; margin-bottom: 16px;
}
.gallery-toolbar .filters { display: flex; gap: 6px; flex-wrap: wrap; }
.gallery-toolbar .chip {
  padding: 5px 14px; border: 1px solid var(--line);
  background: var(--gray-bg); color: var(--text-2); font-size: 13px; cursor: pointer;
}
.gallery-toolbar .chip:hover { border-color: var(--red); color: var(--red); }
.gallery-toolbar .chip.active { background: var(--red); color: #fff; border-color: var(--red); }
.gallery-toolbar .count { margin-left: auto; font-size: 13px; color: var(--text-3); }

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
/* 分批翻页：启用 JS 分页后，未激活项隐藏（无 JS 时全部可见） */
.media-grid.js-paging .media-item { display: none; }
.media-grid.js-paging .media-item.shown { display: block; }
/* 加载更多提示（朴素：纯色块、细边框、无阴影） */
.load-more { text-align: center; padding: 18px 0 6px; }
.load-more .lm-text {
  display: inline-block; font-size: 14px; color: var(--text-2);
  background: var(--gray-bg); border: 1px solid var(--line); padding: 6px 20px; cursor: pointer;
}
.load-more[data-state="done"] .lm-text { cursor: default; color: var(--text-3); }
/* 风采页置顶告示 */
.pin-notice {
  background: #fdf6e3; border: 1px solid #d4a017; padding: 10px 16px;
  margin: 0 0 14px; font-size: 14px; color: #5c3d00;
}
.pin-notice b { color: var(--red); }
.pin-notice a { color: var(--red); text-decoration: underline; margin-left: 8px; }
.media-item {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
}
.media-item .cover { position: relative; height: 150px; background: var(--gray-bg); cursor: zoom-in; overflow: hidden; }
.media-item .cover img { width: 100%; height: 100%; object-fit: cover; }
.media-item .cover video { width: 100%; height: 100%; object-fit: cover; background: #1a1a1a; display: block; }
.media-item .cover:hover { border-color: var(--red); }
.media-item .cover .play {
  position: absolute; top: 6px; left: 6px;
  width: 28px; height: 28px;
  background: var(--red-dark); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
  border: 1px solid #fff;
}
.media-item .type-flag { position: absolute; top: 6px; right: 6px; font-size: 12px; padding: 1px 8px; color: #fff; background: var(--red); }
.media-item .type-flag.video { background: var(--red-bright); }
.media-item .info { padding: 8px 10px; border-top: 1px solid var(--line-soft); }
.media-item .info .t { font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-item .info .m { font-size: 12px; color: var(--text-3); margin-top: 4px; display: flex; justify-content: space-between; }
.media-item .actions { display: flex; border-top: 1px solid var(--line); }
.media-item .actions button {
  flex: 1; border: 0; background: var(--gray-bg); color: var(--text-2); cursor: pointer;
  padding: 7px 0; font-size: 13px;
}
.media-item .actions button:hover { background: var(--red); color: #fff; }
.media-item .actions button + button { border-left: 1px solid var(--line); }

/* ============ 灯箱（放大预览 / 视频播放）============ */
.lightbox {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,.92);
  display: none;
  align-items: center; justify-content: center;
  padding: 40px 20px;
}
.lightbox.open { display: flex; }
.lightbox .stage { max-width: 92vw; max-height: 84vh; text-align: center; }
.lightbox img, .lightbox video { max-width: 92vw; max-height: 76vh; border: 1px solid #555; }
/* 西瓜播放器容器（直角、细边框，与朴素风一致）*/
.lightbox .xgplayer-holder { width: min(92vw, 900px); aspect-ratio: 16 / 9; max-height: 76vh; margin: 0 auto; background: #000; border: 1px solid #555; }
.lightbox .xgplayer-holder .xgplayer { width: 100%; height: 100%; }
.lightbox .lb-cap { color: #fff; margin-top: 12px; font-size: 15px; }
.lightbox .lb-cap .lb-sub { color: #ccc; font-size: 13px; margin-top: 4px; }
.lightbox .lb-tools { margin-top: 12px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.lightbox .lb-tools a, .lightbox .lb-tools button {
  border: 1px solid #777; cursor: pointer; font-size: 14px; padding: 6px 16px;
  background: var(--red); color: #fff;
}
.lightbox .lb-tools .ghost { background: #333; color: #fff; }
.lightbox .lb-close { position: absolute; top: 16px; right: 22px; font-size: 30px; color: #fff; background: none; border: 0; cursor: pointer; line-height: 1; }
.lightbox .lb-prev, .lightbox .lb-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-size: 34px; color: #fff; background: #333; border: 1px solid #555; cursor: pointer;
  width: 46px; height: 78px;
}
.lightbox .lb-prev { left: 12px; }
.lightbox .lb-next { right: 12px; }
.lightbox .lb-prev:hover, .lightbox .lb-next:hover { background: var(--red); }

/* ============ 关于页 ============ */
.about-card { background: var(--paper); border: 1px solid var(--line); padding: 22px 28px 28px; }
.about-card h2 { color: var(--red-dark); border-left: 4px solid var(--red); padding-left: 10px; font-size: 19px; }
.about-card p { line-height: 1.9; }
.about-card code { font-family: Consolas, "Courier New", monospace; background: var(--gray-bg); border: 1px solid var(--line-soft); padding: 0 4px; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 6px 16px; margin: 16px 0; }
.kv dt { color: var(--red); font-weight: 700; }
.kv dd { margin: 0; color: var(--text-2); }

/* ============ 404 页面未找到 ============ */
.nf-card { background: var(--paper); border: 1px solid var(--line); padding: 30px 28px 34px; text-align: center; }
.nf-code { font-size: 88px; line-height: 1; font-weight: 800; color: var(--red); letter-spacing: 6px; font-family: Consolas, "Courier New", monospace; }
.nf-card h1 { font-size: 22px; color: var(--red-dark); margin: 10px 0 8px; }
.nf-card > p { line-height: 1.9; color: var(--text-2); max-width: 640px; margin: 0 auto 6px; }
.nf-card .search-page-form { max-width: 520px; margin: 18px auto; }
.nf-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 8px 0 4px; }
.nf-links a { display: inline-block; padding: 8px 18px; border: 1px solid var(--red-dark); background: var(--gray-bg); color: var(--red-dark); font-size: 14px; }
.nf-links a:hover { background: var(--red); color: #fff; text-decoration: none; }
.nf-cats { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--text-3); }
.nf-cats .nf-k { margin-right: 6px; }
.nf-cats a { display: inline-block; margin: 3px 4px; padding: 2px 10px; border: 1px solid var(--line); color: var(--link); }
.nf-cats a:hover { border-color: var(--red); color: var(--red); text-decoration: none; }

/* ============ 页脚（纯色块，无金线）============ */
.site-footer {
  margin-top: 30px;
  background: var(--red-dark);
  color: #e9d9d9;
  border-top: 1px solid var(--red);
  font-size: 13px;
}
.site-footer .wrap { padding-top: 20px; padding-bottom: 20px; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 30px; justify-content: space-between; }
.footer-col h4 { color: #fff; margin: 0 0 10px; font-size: 15px; letter-spacing: 1px; }
.footer-col a { display: block; color: #e9d9d9; padding: 3px 0; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-about { max-width: 420px; line-height: 1.9; }
.footer-bottom { border-top: 1px solid #7a4b4b; margin-top: 16px; padding-top: 14px; text-align: center; color: #c9a9a9; }
.footer-bottom .links { margin-bottom: 6px; }
.footer-bottom a { color: #c9a9a9; margin: 0 8px; }
.footer-bottom .friend-links { margin: 6px 0; }
.footer-bottom .disclaimer { margin: 8px auto; max-width: 760px; font-size: 13px; color: #d8bcbc; line-height: 1.7; }

.back-top {
  position: fixed; right: 14px; bottom: 20px; z-index: 900;
  width: 40px; height: 40px;
  background: var(--red); color: #fff; border: 1px solid var(--red-dark); cursor: pointer;
  font-size: 18px; display: none;
}
.back-top.show { display: block; }

/* ============ 响应式 ============ */
@media (max-width: 900px) {
  .home-grid { grid-template-columns: 1fr; }
  .feature-strip { grid-template-columns: repeat(2, 1fr); }
  .article { padding: 16px 14px 22px; }
  .article-title { font-size: 20px; }
}

@media (max-width: 760px) {
  .header-inner { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 0; min-height: 0; }
  .brand-text .name { font-size: 20px; letter-spacing: 1px; }
  .header-search { width: 100%; }
  .header-search input { flex: 1; width: auto; }

  .nav-toggle { display: block; }
  .menu {
    display: none;
    flex-direction: column;
    background: var(--red-mid);
  }
  .menu.open { display: flex; }
  .menu > li > a { border-right: 0; border-bottom: 1px solid var(--red-dark); line-height: 44px; }
  .menu .sub {
    position: static; display: none;
    border: 0; background: #8a0008;
  }
  .menu .sub a { display: block; border: 0; color: #fff; padding: 8px 0 8px 28px; border-bottom: 1px solid #94000b; }
  .menu .sub a:hover { color: #ffe14d; }
  .menu li.open > .sub { display: block; }

  .media-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .carousel { --carousel-h: 200px !important; }
  .carousel-cap { font-size: 13px; }
  .hero h1 { font-size: 18px; }
  .hero p { font-size: 13px; }
  .article-list .date { flex-basis: 54px; }
  .article-list .date .d { font-size: 18px; }
  .lightbox .lb-prev, .lightbox .lb-next { width: 34px; font-size: 24px; }
}

@media (max-width: 420px) {
  .feature-strip { grid-template-columns: 1fr 1fr; }
  .media-grid { grid-template-columns: 1fr 1fr; }
  .kv { grid-template-columns: 1fr; }
}

/* ---------- 站内搜索（纯前端，无后端依赖） ---------- */
.search-page-form { display: flex; gap: 8px; margin: 6px 0 18px; }
.search-page-form .q-input { flex: 1; padding: 9px 12px; border: 1px solid var(--red-dark); background: #fff; font-size: 15px; font-family: inherit; color: var(--text-1); }
.search-page-form .q-input:focus { outline: 2px solid var(--red); outline-offset: -2px; }
.search-page-form button { padding: 9px 22px; border: 1px solid var(--red-dark); background: var(--red); color: #fff; cursor: pointer; font-family: inherit; font-size: 15px; letter-spacing: 2px; }
.search-page-form button:hover { background: var(--red-bright); }
.search-results .se-count { font-size: 13px; color: var(--text-3); margin: 0 0 10px; }
.search-results .se-empty { text-align: center; color: var(--text-3); padding: 40px 16px; border: 1px dashed var(--line); background: var(--gray-bg); line-height: 2; }
.search-results .se-empty code { background: #eee; padding: 1px 6px; border: 1px solid var(--line); font-family: Consolas, "Courier New", monospace; }
.search-results .article-list .sum mark,
.search-results .article-list h3 a mark { background: #ffe58f; color: inherit; padding: 0 2px; font-weight: 700; border-radius: 0; }
