/* PIXHUB 图集站 前台样式
   还原参考站视觉：白底固定头部、频道胶囊、五列卡片、底部渐变红 */

:root {
  --brand: #ff2f4d;
  --brand-2: #fa7f81;
  --page-bg: #eef1f8;
  --text: #333;
  --text-2: #666;
  --text-3: #b7b7b7;
  --line: #f0f2f6;
  --card-bg: #fff;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input { font-family: inherit; }

.clearfix::after { content: ""; display: block; clear: both; }

/* ---------- 顶部 ---------- */
.index_header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 90px;
  background: #fff;
  box-shadow: 0 2px 20px rgba(0, 0, 0, .07);
  z-index: 900;
}

.header_inner {
  max-width: 1280px;
  height: 90px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
}

.logo { display: flex; align-items: center; flex: none; }
.logo-img { display: block; height: 32px; width: auto; max-width: 220px; object-fit: contain; }
.logo-mark {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #15171c;
  line-height: 50px;
}
.logo-sub {
  margin-left: 6px;
  font-size: 12px;
  color: #fff;
  background: linear-gradient(90deg, var(--brand) 10%, var(--brand-2) 90%);
  border-radius: 4px;
  padding: 2px 6px;
  line-height: 1.4;
}

.header_menu { margin-left: 34px; flex: 1 1 auto; min-width: 0; }
/* 导航单行不折行：分类多时横向滚动，别把 header 撑成两行 */
.header_menu ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.header_menu ul::-webkit-scrollbar { display: none; }
.header_menu li { margin: 0 14px; }
.header_menu a {
  font-size: 16px;
  color: #333;
  line-height: 90px;
  transition: color .2s;
}
.header_menu a:hover,
.header_menu li.current a { color: var(--brand); }

.header_search_bar {
  flex: none;
  display: flex;
  align-items: center;
  background: #f2f3f6;
  height: 40px;
  border-radius: 4px;
  padding: 0 8px;
  margin-left: 16px;
}
.header_search_bar form { display: flex; align-items: center; }
.search_bar_btn {
  border: 0;
  background: transparent;
  color: #888;
  padding: 0 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.search_bar_input {
  border: 0;
  background: transparent;
  outline: none;
  width: 130px;
  font-size: 13px;
  color: #333;
  transition: width .2s;
}
.search_bar_input:focus { width: 168px; }

.login_text { flex: none; margin-left: 18px; font-size: 13px; }
.login_text a:hover { color: var(--brand); }
.rlogin { display: flex; align-items: center; gap: 6px; color: #8c8c8c; }
.reg_btn {
  background: linear-gradient(90deg, var(--brand) 10%, #f85c5e 90%);
  color: #fff;
  padding: 4px 12px;
  border-radius: 14px;
}
.reg_btn:hover { color: #fff; opacity: .92; }
.user_box { display: flex; align-items: center; gap: 10px; color: #555; }
.user_name { font-weight: 600; }
.user_points {
  font-size: 12px; color: #7d838f; background: #f6f7f9; border-radius: 999px;
  padding: 3px 9px; line-height: 1.5; white-space: nowrap;
}
.user_points:hover { color: var(--brand); }
.user_admin { color: var(--brand); }
.mobie { display: none; margin-left: 14px; color: #666; }
.pc { display: flex; }

/* 移动抽屉 */
.mobile-drawer { display: none; }
.mobile-drawer.is-open { display: block; }
.drawer-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 1000; }
.drawer-panel {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 74%;
  max-width: 320px;
  background: #fff;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  animation: drawerIn .22s ease-out;
}
@keyframes drawerIn { from { transform: translateX(-100%); } to { transform: translateX(0); } }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--line); font-weight: 700;
}
.drawer-head a { font-size: 13px; color: #999; font-weight: 400; }
.drawer-menu { list-style: none; margin: 0; padding: 6px 0; overflow-y: auto; }
.drawer-menu li a { display: block; padding: 12px 18px; font-size: 15px; color: #444; }
.drawer-menu li a:hover { background: #f7f8fb; color: var(--brand); }

.mobile-search-panel {
  display: none;
  position: fixed; top: 50px; left: 0; right: 0;
  background: #fff; padding: 10px 16px; box-shadow: 0 6px 14px rgba(0,0,0,.06);
  z-index: 998;
}
.mobile-search-panel.is-open { display: block; }
.mobile-search-panel form { display: flex; gap: 8px; }
.mobile-search-panel input {
  flex: 1; height: 36px; border: 1px solid #e4e7ee; border-radius: 4px; padding: 0 10px; font-size: 15px;
}
.mobile-search-panel button {
  height: 36px; padding: 0 14px; border: 0; border-radius: 4px; color: #fff;
  background: linear-gradient(90deg, var(--brand), #f85c5e);
}

/* 公告 */
.notice-mask {
  position: fixed; inset: 0; background: rgba(15, 18, 26, .55);
  display: flex; align-items: center; justify-content: center; z-index: 3000; padding: 20px;
}
.notice-card {
  position: relative; width: 100%; max-width: 420px; background: #fff;
  border-radius: 12px; padding: 26px 24px 20px; box-shadow: 0 18px 50px rgba(0,0,0,.22);
}
.notice-close {
  position: absolute; top: 6px; right: 6px; width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border: 0; background: transparent; border-radius: 50%;
  font-size: 24px; line-height: 1; color: #b0b4bd; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.notice-close:hover { background: #f2f3f5; color: #666; }
.notice-tag {
  display: inline-block; font-size: 12px; color: var(--brand);
  background: #fff1f2; border-radius: 10px; padding: 1px 8px; margin-bottom: 8px;
}
.notice-card h2 { margin: 0 0 10px; font-size: 18px; color: #1f2329; }
.notice-card p { margin: 0 0 14px; font-size: 13px; color: #666; line-height: 1.8; }
.notice-tip { font-size: 12px; color: #a7abb4; border-top: 1px dashed var(--line); padding-top: 10px; }

/* ---------- 主体 ---------- */
.site-main { padding-top: 90px; min-height: 60vh; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* 频道胶囊 */
.channel-bar {
  max-width: 1280px;
  margin: 18px auto 0;
  background: #fff;
  border-radius: 20px;
  padding: 6px 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .04);
}
.channel-bar ul {
  margin: 0; padding: 0; list-style: none;
  display: flex; flex-wrap: wrap; align-items: center;
}
.channel-bar li { margin: 4px 5px; }
.channel-bar a {
  display: block; padding: 0 16px; line-height: 34px; border-radius: 20px;
  font-size: 13px; color: #555; background: #f4f5f8; transition: all .2s;
}
.channel-bar a:hover { color: var(--brand); background: #fff0f1; }
.channel-bar a.current {
  color: #fff;
  background: linear-gradient(90deg, var(--brand) 10%, var(--brand-2) 100%);
}

/* 区块标题 */
.section-head {
  max-width: 1280px; margin: 26px auto 14px; display: flex;
  align-items: center; justify-content: space-between; gap: 10px; padding: 0 20px;
}
.section-head h2 { margin: 0; font-size: 20px; color: #22262e; }
/* 区块标题可以挂链接（后台可配）：默认同色，hover 变品牌红，外链带小箭头 */
.section-head h2 a { color: inherit; text-decoration: none; transition: color .2s; }
.section-head h2 a:hover { color: var(--brand); }
.section-head h2 a .ext-ico { width: 12px; height: 12px; margin-left: 3px; vertical-align: -1px; opacity: .55; }
/* 首页自定义区块（后台可贴 HTML 替换「最新图集」那块） */
.home-custom { max-width: 1280px; margin: 26px auto 14px; padding: 0 20px; }
.home-custom img { max-width: 100%; height: auto; display: block; }
.home-custom a { color: var(--brand); text-decoration: none; }
.home-custom a:hover { text-decoration: underline; }
/* 页码做成小胶囊，不再是一行孤零零的灰字 */
.section-head .sub {
  flex: 0 0 auto; font-size: 12px; color: #6f7683;
  background: #fff; border: 1px solid #e8ebf1; border-radius: 999px;
  padding: 4px 11px; line-height: 1;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 1px 2px rgba(17, 24, 39, .04);
}
.section-head .sub b { color: #22262e; font-weight: 600; }
.section-head .more { font-size: 13px; color: #999; }
.section-head .more:hover { color: var(--brand); }

/* 卡片网格 */
.grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 10px rgba(20, 26, 40, .05);
  transition: transform .22s ease, box-shadow .22s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(20, 26, 40, .12); }
.card-cover {
  position: relative;
  flex: none;
  padding-top: 137%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
  border-radius: 6px 6px 0 0;
}
.card-badge {
  position: absolute; top: 8px; right: 8px; z-index: 6;
  background: rgba(255, 47, 77, .92); color: #fff;
  font-size: 11px; padding: 1px 7px; border-radius: 3px;
}
/* 封面左上角分类标：彩色渐变底 + 白字，贴左上角，只在右下做 18px 大圆角 */
.card-cover .cat-flag {
  position: absolute; top: 0; left: 0; z-index: 6;
  max-width: 74%; height: 42px;
  display: flex; align-items: center;
  padding: 0 24px 0 14px;
  font-size: 13px; line-height: 1; font-weight: 600;
  letter-spacing: .14em; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border-radius: 0 0 18px 0;
  background: linear-gradient(100deg, var(--cf1), var(--cf2) 34%, var(--cf3));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .42), inset 0 -4px 10px rgba(255, 255, 255, .16), 0 3px 10px rgba(50, 35, 80, .18);
  text-shadow: 0 1px 3px rgba(38, 24, 58, .36);
}
/* 每个分类一色：按分类名自动匹配，匹配不到按分类 id 轮转 */
.cat-flag.cf-green { --cf1: rgba(88, 176, 164, .94); --cf2: rgba(104, 192, 196, .94); --cf3: rgba(122, 166, 214, .92); }
.cat-flag.cf-indigo { --cf1: rgba(84, 102, 178, .95); --cf2: rgba(116, 102, 186, .95); --cf3: rgba(148, 120, 202, .93); }
.cat-flag.cf-pink { --cf1: rgba(212, 116, 176, .95); --cf2: rgba(232, 138, 188, .95); --cf3: rgba(206, 128, 206, .93); }
.cat-flag.cf-blue { --cf1: rgba(88, 146, 212, .95); --cf2: rgba(108, 168, 220, .95); --cf3: rgba(102, 196, 198, .93); }
.cat-flag.cf-default { --cf1: rgba(126, 138, 172, .94); --cf2: rgba(152, 144, 190, .93); --cf3: rgba(178, 154, 206, .91); }
@media (hover: hover) {
  .card:hover .cat-flag { filter: brightness(1.08); }
}
/* margin-top:auto：卡片被网格拉到同高时，白条整体贴住卡片底部 */
.card-info {
  margin-top: auto;
  background: #fff;
  padding: 10px 10px 11px;
}
/* 标题固定占两行高度：一行标题的卡片也把底排压到底，全站卡片等高不参差 */
.card-title {
  margin: 0;
  min-height: 50px;
  font-size: 14px;
  line-height: 25px;
  color: #333;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* 底部这一排：单行不换行，居中，靠缩字号/缩间距自适应 */
.card-meta {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 4px 10px;
  padding-top: 3px;
  font-size: 12px;
  line-height: 18px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
}
.card-meta > span { flex: 0 0 auto; }
@media (hover: hover) {
  .card:hover .card-title { -webkit-line-clamp: 2; }
}

/* 空状态 */
.empty-box {
  max-width: 1280px; margin: 40px auto; background: #fff; border-radius: 8px;
  padding: 60px 20px; text-align: center; color: #99a0aa;
}
.empty-box strong { display: block; color: #4a4f58; font-size: 16px; margin-bottom: 8px; }

/* 分页 */
.pagination {
  max-width: 1280px;
  margin: 26px auto 30px;
  background: #fff;
  border-radius: 6px;
  padding: 22px 12px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .04);
}
.nav-links { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; }
.page-numbers {
  display: inline-block; min-width: 40px; padding: 0 12px; line-height: 38px;
  border: 1px solid #eef0f4; border-radius: 4px; color: #a1a1a1; font-size: 13px;
  transition: all .2s;
}
.page-numbers:hover { color: var(--brand); border-color: #ffd2d7; }
.page-numbers.current { background: #ff5c5c; border-color: #ff5c5c; color: #fff; }
.page-numbers.dots { border-color: transparent; min-width: 20px; padding: 0 4px; }

/* ---------- 详情页 ---------- */
.crumb {
  max-width: 1280px; margin: 14px auto 0; padding: 0 20px;
  display: flex; align-items: center; min-width: 0; overflow: hidden;
  font-size: 12.5px; line-height: 1.5; color: #8d95a3;
}
.crumb a { color: #8d95a3; text-decoration: none; white-space: nowrap; flex: 0 0 auto; transition: color .15s ease; }
.crumb a:hover { color: var(--brand); }
/* 首页：小房子图标 + 文字，图标跟随文字一起变色 */
.crumb .home { display: inline-flex; align-items: center; gap: 6px; }
.crumb .home svg { display: block; width: 13px; height: 13px; }
/* 分类：品牌红小胶囊，和首页封面左上角的分类标一致 */
.crumb .cat {
  font-size: 11.5px; font-weight: 600; color: #e11d38; line-height: 1;
  background: rgba(255, 47, 77, .08); border-radius: 999px; padding: 3px 9px;
  letter-spacing: .02em; transition: color .15s ease, background .15s ease;
}
.crumb .cat:hover { color: #d0192f; background: rgba(255, 47, 77, .14); }
.crumb .sep { margin: 0 7px; color: #cfd4dd; flex: 0 0 auto; font-size: 12px; }
/* 末级标题吃掉剩余宽度并单行截断，长标题不再把面包屑撑成两行或撑破屏幕 */
.crumb .cur {
  flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: #3f4653; font-weight: 600;
}

.article-wrap {
  max-width: 1280px; margin: 12px auto 0; padding: 0 20px;
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px;
  align-items: start;
}
.article-main {
  background: #fff; border-radius: 8px; padding: 24px 26px;
  box-shadow: 0 2px 14px rgba(20, 26, 40, .05);
  min-width: 0;
}
.article-main h1 { margin: 0 0 10px; font-size: 24px; line-height: 1.5; color: #22262e; }
.article-meta {
  display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; color: #a7abb4;
  padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 18px;
}
.article-meta i { font-style: normal; color: #d2d6dd; margin: 0 2px; }
.article-intro {
  background: #f7f8fb; border-radius: 6px; padding: 12px 14px; margin-bottom: 18px;
  font-size: 13px; color: #6b7280; line-height: 1.9;
}
.article-body { font-size: 14px; color: #4a4f58; line-height: 2; }
.article-body p { margin: 0 0 12px; }
.article-body img { display: block; max-width: 100%; height: auto; margin: 14px auto; border-radius: 6px; cursor: zoom-in; touch-action: manipulation; }
.article-body h2 { font-size: 18px; line-height: 1.6; margin: 20px 0 10px; color: #23262c; }
.article-body h3 { font-size: 16px; line-height: 1.6; margin: 16px 0 8px; color: #23262c; }
.article-body ul, .article-body ol { padding-left: 22px; margin: 0 0 12px; }
.article-body blockquote {
  margin: 12px 0; padding: 10px 14px; border-left: 3px solid #ffd0d4;
  background: #f7f8fb; border-radius: 0 6px 6px 0; color: #5c6577;
}
.article-body a { color: #ff2f4d; text-decoration: none; }
.article-body a:hover { text-decoration: underline; }
.article-body table { border-collapse: collapse; width: 100%; margin: 12px 0; font-size: 13px; }
.article-body table td, .article-body table th { border: 1px solid #e6e8ee; padding: 8px 10px; }

/* 图集浏览 */
.viewer {
  margin: 4px 0 22px;
  background: #101216;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}
.viewer-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  /* 固定高度：左右滑动切图时舞台不跳动，照片始终居中 */
  height: clamp(320px, 68vh, 720px);
  min-height: 0;
  max-height: none;
  overflow: hidden;
}
.viewer-stage img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  object-fit: contain;
  cursor: zoom-in;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-drag: none;
  will-change: transform;
}
.viewer-photo { transition: transform .26s cubic-bezier(.22, .61, .36, 1); }
.viewer-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 84px; border: 0; border-radius: 6px;
  background: rgba(255, 255, 255, .12); color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .2s;
  z-index: 3;
}
.viewer-nav:hover { background: rgba(255, 255, 255, .24); }
.viewer-nav.prev { left: 12px; }
.viewer-nav.next { right: 12px; }
.viewer-nav[disabled] { opacity: .35; cursor: default; }

/* 图片水印：只叠在页面上，原图与下载包不受影响 */
.wm-on .card-cover::after,
.wm-on .viewer-stage::after,
.wm-on .viewer-lightbox::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--wm-svg);
  background-repeat: repeat;
  background-size: 300px 200px;
  background-position: center;
  opacity: var(--wm-opacity, .26);
  pointer-events: none;
  z-index: 2;
}
/* 详情大图与全屏放大：换更大的水印格，一屏只出现一两个 */
.wm-on .viewer-stage::after,
.wm-on .viewer-lightbox::after {
  background-image: var(--wm-svg-lg);
  background-size: 600px 400px;
  opacity: calc(var(--wm-opacity, .26) * .9);
}

/* 正文图片：套一层定位框，水印叠在图片上（原图不动） */
.article-body .wm-shot {
  display: block;
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin: 14px auto;
  line-height: 0;
}
.article-body .wm-shot img { margin: 0; border-radius: 6px; }
.wm-on .article-body .wm-shot::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--wm-svg);
  background-repeat: repeat;
  background-size: 300px 200px;
  background-position: center;
  opacity: var(--wm-opacity, .26);
  pointer-events: none;
  border-radius: 6px;
  z-index: 2;
}

/* 点图放大：全屏灯箱，再点一下关闭 */
.viewer-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, .96);
  cursor: zoom-out;
  -webkit-tap-highlight-color: transparent;
}
.viewer-lightbox.is-open { display: flex; }
.viewer-lightbox img {
  max-width: 96vw;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 4px;
  user-select: none;
  -webkit-user-drag: none;
  will-change: transform;
}
.viewer-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; color: #9aa0aa; font-size: 12px;
  background: rgba(0, 0, 0, .28);
}
.viewer-count strong { color: #fff; font-size: 14px; }
.viewer-shortcuts { color: #7d838f; }
.viewer-shortcuts .sc-mob { display: none; }
.viewer-thumbs {
  display: flex; gap: 6px; padding: 10px 12px; overflow-x: auto;
  background: #16181d; scrollbar-width: thin;
}
.viewer-thumbs a {
  flex: none; width: 56px; height: 56px; border-radius: 4px; overflow: hidden;
  border: 2px solid transparent; opacity: .6; transition: all .18s;
  background-size: cover; background-position: center;
}
.viewer-thumbs a img {
  width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 2px;
}
.viewer-thumbs a:hover { opacity: .9; }
.viewer-thumbs a.current { border-color: var(--brand); opacity: 1; }

/* 侧栏 */
.article-side { display: flex; flex-direction: column; gap: 16px; }
.side-box {
  background: #fff; border-radius: 8px; padding: 18px; box-shadow: 0 2px 14px rgba(20, 26, 40, .05);
}
.side-box h3 { margin: 0 0 12px; font-size: 15px; color: #22262e; }
.download-box {
  background: linear-gradient(180deg, #fff5f5, #ffffff);
  border: 1px solid #ffe4e6;
}
.download-box .dl-tip { font-size: 12px; color: #9aa0aa; margin: 0 0 10px; line-height: 1.7; }
.download-box .dl-points {
  font-size: 12px; color: #5c6577; line-height: 1.7; margin: 0 0 10px;
  background: #fafbfc; border: 1px solid #eceef2; border-radius: 6px; padding: 7px 10px;
}
.download-box .dl-points.low { color: #a8071a; background: #fff6f5; border-color: #ffd6d3; }
.download-box .dl-points a { color: var(--brand); }
.js-like .like-heart { margin-right: 5px; font-size: 14px; line-height: 1; }
.btn-download {
  display: block; text-align: center; padding: 11px 0; border-radius: 6px;
  color: #fff; font-size: 15px; background: linear-gradient(90deg, var(--brand) 10%, #f85c5e 90%);
}
.btn-download:hover { opacity: .92; }
.btn-ghost {
  display: block; text-align: center; padding: 9px 0; border-radius: 6px;
  font-size: 13px; color: #666; border: 1px solid #e8ebf1; margin-top: 10px;
}
.btn-ghost:hover { color: var(--brand); border-color: #ffd7db; }

/* 下载区挪到评论区上方：单列布局时去掉空的右侧栏，按钮只留下载与收藏并居中 */
.article-wrap.no-side { grid-template-columns: minmax(0, 1fr); }
.download-box.inline { margin: 20px 0 22px; text-align: center; }
.download-box.inline h3 { text-align: center; }
.download-box.inline .dl-btns {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
}
.download-box.inline .dl-btns > a {
  flex: 0 1 auto; margin: 0; min-width: 132px;
  display: inline-flex; align-items: center; justify-content: center;
}
.download-box.inline .dl-btns > .btn-download { padding: 11px 26px; }
.download-box.inline .dl-btns > .btn-ghost { padding: 9px 18px; }
/* 前台卡片与详情页 meta 里的小图标（浏览=眼睛，下载=箭头入托盘） */
.meta-eye, .meta-dl {
  display: inline-flex; align-items: center; gap: 4px;
  color: #8f97a3; white-space: nowrap;
}
.meta-eye .meta-ico, .meta-dl .meta-ico { display: block; flex: none; width: 13px; height: 13px; }
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.side-list li:last-child { border-bottom: 0; }
.side-list .thumb {
  flex: none; width: 62px; height: 62px; border-radius: 4px;
  background-size: cover; background-position: center;
  overflow: hidden;
}
.card-cover img,
.side-list .thumb img {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.side-list .thumb { position: relative; }
.side-list .txt { min-width: 0; }
.side-list .txt a { display: block; font-size: 13px; color: #4a4f58; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.side-list .txt a:hover { color: var(--brand); }
.side-list .txt span { font-size: 12px; color: var(--text-3); }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list a { font-size: 12px; color: #666; background: #f3f5f9; border-radius: 3px; padding: 3px 9px; }
.tag-list a:hover { background: #fff0f1; color: var(--brand); }

/* 评论 */
.comment-box { margin-top: 18px; }
.comment-box h3 { margin: 0 0 14px; font-size: 16px; }
.comment-list { list-style: none; margin: 0 0 18px; padding: 0; }
.comment-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.comment-avatar {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, #ffd0d5, #ff8a8f); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700;
}
.comment-body { min-width: 0; flex: 1; }
.comment-head { display: flex; align-items: center; gap: 10px; font-size: 12px; color: #a7abb4; }
.comment-head strong { color: #4a4f58; font-size: 13px; }
.comment-text { margin: 4px 0 0; font-size: 13px; color: #5b616b; line-height: 1.8; word-break: break-word; }
.comment-form textarea {
  width: 100%; min-height: 92px; border: 1px solid #e6e9ef; border-radius: 6px;
  padding: 10px 12px; font-size: 14px; resize: vertical; outline: none;
}
.comment-form textarea:focus { border-color: #ffb8be; }
.comment-form .row { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.comment-form .hint { font-size: 12px; color: #a7abb4; }
.comment-form button {
  border: 0; border-radius: 4px; padding: 8px 20px; color: #fff; cursor: pointer;
  background: linear-gradient(90deg, var(--brand), #f85c5e);
}
.comment-login-tip { font-size: 13px; color: #9aa0aa; }

/* 静态页 */
.page-wrap { max-width: 900px; margin: 0 auto; padding: 0 20px; }
.page-card { background: #fff; border-radius: 8px; padding: 30px 32px; box-shadow: 0 2px 14px rgba(20, 26, 40, .05); }
.page-card h1 { margin: 0 0 16px; font-size: 24px; }
.page-card h2 { margin: 24px 0 8px; font-size: 17px; color: #22262e; }
.page-card p, .page-card li { font-size: 14px; color: #4a4f58; line-height: 2; }
.page-card ul { padding-left: 20px; }

/* 登录注册 */
.auth-wrap { max-width: 420px; margin: 0 auto; padding: 0 20px; }
.auth-card { background: #fff; border-radius: 10px; padding: 30px 28px; box-shadow: 0 8px 30px rgba(20, 26, 40, .08); }
.auth-card h1 { margin: 0 0 6px; font-size: 22px; }
.auth-card .sub { margin: 0 0 22px; font-size: 13px; color: #9aa0aa; }
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-size: 13px; color: #6b7280; margin-bottom: 6px; }
.form-field input {
  width: 100%; height: 42px; border: 1px solid #e6e9ef; border-radius: 6px;
  padding: 0 12px; font-size: 15px; outline: none;
}
.form-field input:focus { border-color: #ffb8be; }
.form-actions { margin-top: 20px; }
.form-actions button {
  width: 100%; height: 44px; border: 0; border-radius: 6px; color: #fff; font-size: 15px; cursor: pointer;
  background: linear-gradient(90deg, var(--brand) 10%, #f85c5e 90%);
}
.auth-foot { margin-top: 16px; font-size: 13px; color: #9aa0aa; text-align: center; }
.auth-foot a { color: var(--brand); }
.form-error {
  background: #fff1f0; border: 1px solid #ffd6d3; color: #a8071a;
  border-radius: 6px; padding: 10px 12px; font-size: 13px; margin-bottom: 16px;
}
.form-ok {
  background: #f6ffed; border: 1px solid #c6f6d5; color: #1a7f37;
  border-radius: 6px; padding: 10px 12px; font-size: 13px; margin-bottom: 16px;
}
.redeem-status {
  display: flex; flex-wrap: wrap; gap: 6px 20px;
  font-size: 13px; color: #6b7080;
  background: #fafbfc; border: 1px solid #eceef2; border-radius: 6px;
  padding: 10px 12px; margin-bottom: 16px;
}
.redeem-status strong { color: var(--brand); }

/* 个人中心 */
.uc-head { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; }
.uc-avatar {
  width: 54px; height: 54px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px; font-weight: 700;
  background: linear-gradient(90deg, var(--brand) 10%, #f85c5e 90%);
}
.uc-id strong { display: block; font-size: 18px; color: #1f2329; }
.uc-id span { font-size: 13px; color: #8a93a3; }
.uc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 16px; }
.uc-stat { background: #f6f7f9; border-radius: 8px; padding: 10px 14px; min-width: 0; }
.uc-stat strong { display: block; font-size: 20px; color: #1f2329; }
.uc-stat span { font-size: 12px; color: #8a93a3; }
.uc-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 4px; }
.uc-btn {
  display: inline-block; padding: 8px 16px; border-radius: 18px;
  font-size: 13px; color: #5b6270; background: #f3f5f9;
}
.uc-btn:hover { color: var(--brand); background: #fff0f1; }
.uc-btn.primary { color: #fff; background: linear-gradient(90deg, var(--brand) 10%, #f85c5e 90%); }
.uc-btn.primary:hover { color: #fff; opacity: .92; }
.uc-favs { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 10px; }
.uc-fav img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 6px; display: block; }
.uc-fav span {
  display: block; margin-top: 5px; font-size: 12px; color: #5b6270;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.uc-fav:hover span { color: var(--brand); }
.uc-cmts { list-style: none; margin: 0; padding: 0; }
.uc-cmts li { padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 13px; color: #4a4f58; line-height: 1.7; }
.uc-cmts li:last-child { border-bottom: 0; }
.uc-cmts li a { color: #1f2329; font-weight: 600; }
.uc-cmts li a:hover { color: var(--brand); }
.uc-cmts li span { display: block; font-size: 12px; color: #a7abb4; margin-top: 2px; line-height: 1.6; }
.uc-empty { font-size: 13px; color: #a7abb4; margin: 0 0 6px; }

/* 底部 */
.site-footer {
  margin-top: 40px;
  background: linear-gradient(90deg, #f96c6c 0%, #f5556b 100%);
  color: #fff;
  padding: 22px 20px;
}
.footer-inner { max-width: 1280px; margin: 0 auto; text-align: center; }
.footer-text { margin: 0; font-size: 13px; opacity: .92; }
.footer-links { margin: 6px 0 0; font-size: 12px; opacity: .8; }
.footer-links a:hover { text-decoration: underline; }
.footer-links span { margin: 0 6px; }

.mobile-tabbar { display: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 1240px) {
  /* 中等宽度（笔记本不满屏）收紧间距，导航与搜索仍排一行 */
  .header_menu { margin-left: 20px; }
  .header_menu li { margin: 0 9px; }
  .header_menu a { font-size: 15px; }
  .header_search_bar { margin-left: 10px; }
  .search_bar_input { width: 104px; }
  .search_bar_input:focus { width: 128px; }
  .login_text { margin-left: 12px; }
}
@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .article-wrap { grid-template-columns: minmax(0, 1fr); }
  .article-side { flex-direction: row; flex-wrap: wrap; }
  .article-side > .side-box { flex: 1 1 260px; }
}

@media (max-width: 800px) {
  .index_header { height: 50px; box-shadow: 0 1px 10px rgba(0, 0, 0, .06); }
  .header_inner { height: 50px; padding: 0 12px; }
  .logo-mark { font-size: 19px; line-height: 50px; }
  .logo-img { height: 24px; max-width: 150px; }
  .logo-sub { font-size: 11px; }
  .header_menu, .header_search_bar, .pc { display: none; }
  .mobie { display: flex; align-items: center; }
  .login_text { margin-left: auto; }
  .login_text + .login_text { margin-left: 6px; }

  .site-main { padding-top: 50px; padding-bottom: 58px; }
  .channel-bar { margin: 10px 12px 0; border-radius: 14px; padding: 6px; overflow: hidden; }
  .channel-bar ul { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .channel-bar ul::-webkit-scrollbar { display: none; }
  .channel-bar li { margin: 3px; }
  .channel-bar a { white-space: nowrap; padding: 0 12px; line-height: 30px; font-size: 12px; }

  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0 12px; }
  .card-info { padding: 8px 8px 9px; }
  .card-title { font-size: 13px; line-height: 22px; min-height: 44px; -webkit-line-clamp: 2; }
  /* 窄卡的「浏览 + 下载量」：单行居中 */
  .card-meta { font-size: 11px; gap: 3px 8px; }
  .card-cover .cat-flag { height: 34px; font-size: 11px; padding: 0 16px 0 10px; letter-spacing: .10em; border-radius: 0 0 14px 0; }
  .card-meta .meta-eye .meta-ico, .card-meta .meta-dl .meta-ico { width: 12px; height: 12px; }

  .section-head { margin: 18px auto 10px; padding: 0 12px; gap: 8px; }
  .section-head h2 { font-size: 17px; }
  .section-head .sub { font-size: 11px; padding: 3px 9px; }
  .pagination { margin: 18px 12px 20px; padding: 14px 8px; }
  .page-numbers { min-width: 34px; line-height: 32px; padding: 0 9px; }

  .crumb { padding: 0 12px; margin-top: 10px; font-size: 11.5px; }
  .crumb .home svg { width: 12px; height: 12px; }
  .crumb .cat { font-size: 11px; padding: 3px 8px; }
  .crumb .sep { margin: 0 5px; }
  .article-wrap { padding: 0 12px; margin-top: 8px; gap: 12px; }
  .article-main { padding: 16px 14px; border-radius: 6px; }
  .article-main h1 { font-size: 19px; }
  .article-meta { font-size: 11px; }
  .viewer-stage { height: clamp(260px, 62vh, 560px); min-height: 0; max-height: none; }
  .viewer-stage img { max-height: 100%; }
  .viewer-nav { width: 34px; height: 64px; background: rgba(255,255,255,.16); }
  .viewer-nav.prev { left: 6px; }
  .viewer-nav.next { right: 6px; }
  .viewer-bar { padding: 8px 12px; font-size: 11px; flex-direction: column; align-items: flex-start; gap: 3px; }
  .viewer-shortcuts .sc-desk { display: none; }
  .viewer-shortcuts .sc-mob { display: inline; }
  .viewer-thumbs a { width: 46px; height: 46px; }
  .article-side { flex-direction: column; }

  .comment-item { padding: 10px 0; }
  .comment-avatar { width: 32px; height: 32px; font-size: 12px; }

  .page-wrap { padding: 0 12px; }
  .page-card { padding: 20px 16px; }
  .auth-wrap { padding: 0 12px; }
  .auth-card { padding: 24px 18px; }

  .site-footer { margin-top: 24px; padding: 16px 12px 70px; }
  .footer-text { font-size: 12px; }

  .mobile-tabbar {
    display: flex;
    position: fixed; left: 0; right: 0; bottom: 0;
    height: 50px;
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(8px);
    box-shadow: 0 -2px 14px rgba(0, 0, 0, .08);
    z-index: 950;
  }
  .tab-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 1px; font-size: 11px; color: #8b9099;
  }
  .tab-item.active { color: var(--brand); }
  .tab-item svg { display: block; }
}

@media (max-width: 380px) {
  .grid { gap: 10px; }
  .card-title { font-size: 12px; line-height: 21px; min-height: 42px; }
  .card-meta { font-size: 10.5px; gap: 2px 6px; }
  .card-meta .meta-eye .meta-ico, .card-meta .meta-dl .meta-ico { width: 11px; height: 11px; }
}
