@charset "utf-8";
/* ==========================================================================
   mobile.css —— 移动端样式（首页 / 列表页 / 文章页）
   设计基准 375px 宽；1. 顶部栏 2. 抽屉 3. 频道条 4. 首页 5. 列表页
   6. 文章页 7. 底部导航 8. 页脚
   ========================================================================== */

/* ---------- 1. 顶部栏 ---------- */
.m-header {
  position: sticky; top: 0; z-index: 100; height: 50px;
  background: #fff; border-bottom: 1px solid var(--c-border);
}
.m-header__inner { display: flex; align-items: center; height: 50px; gap: 10px; padding: 0 12px; }
.m-iconbtn {
  width: 32px; height: 32px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
  color: var(--c-title); border-radius: 50%;
}
.m-iconbtn:active { background: #f2f4f7; }
.m-header__logo { display: flex; align-items: center; gap: 7px; flex: 1; min-width: 0; }
.m-header__logo .mark {
  width: 26px; height: 26px; border-radius: 7px; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--c-primary), #4f8bff);
  display: flex; align-items: center; justify-content: center;
}
.m-header__logo b { font-size: 17px; color: var(--c-title); letter-spacing: .5px; }
.m-header__title {
  flex: 1; min-width: 0; text-align: center; font-size: 16px; font-weight: 600;
  color: var(--c-title); overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}

/* ---------- 2. 抽屉菜单 ---------- */
.m-drawer { position: fixed; inset: 0; z-index: 200; visibility: hidden; }
.m-drawer.is-open { visibility: visible; }
.m-drawer__mask {
  position: absolute; inset: 0; background: rgba(16, 24, 40, .45);
  opacity: 0; transition: opacity .25s;
}
.m-drawer.is-open .m-drawer__mask { opacity: 1; }
.m-drawer__panel {
  position: absolute; top: 0; left: 0; bottom: 0; width: 74%; max-width: 300px;
  background: #fff; transform: translateX(-100%); transition: transform .28s ease;
  overflow-y: auto; padding-bottom: 24px;
}
.m-drawer.is-open .m-drawer__panel { transform: translateX(0); }
.m-drawer__hd { padding: 30px 20px 22px; background: linear-gradient(135deg, #1f3d7a, var(--c-primary)); }
.m-drawer__hd b { display: block; color: #fff; font-size: 19px; letter-spacing: .5px; }
.m-drawer__hd span { display: block; margin-top: 6px; font-size: 12px; color: rgba(255, 255, 255, .7); }
.m-drawer__nav { padding: 6px 0; }
.m-drawer__nav a {
  display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 20px;
  font-size: 15px; color: var(--c-title); border-bottom: 1px solid #f6f7f9;
}
.m-drawer__nav a.is-active { color: var(--c-primary); background: var(--c-primary-light); }
.m-drawer__nav a::before {
  content: ""; width: 3px; height: 14px; border-radius: 2px; background: var(--c-border-2);
}
.m-drawer__nav a.is-active::before { background: var(--c-primary); }
.m-drawer__foot { display: flex; gap: 10px; padding: 20px; }
.m-drawer__foot .btn { flex: 1; }

/* ---------- 3. 频道条（横向滚动） ---------- */
.m-chanbar { background: #fff; border-bottom: 1px solid var(--c-border); }
.m-chanbar__scroll {
  display: flex; gap: 20px; overflow-x: auto; padding: 0 12px; height: 44px; align-items: center;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.m-chanbar__scroll::-webkit-scrollbar { display: none; }
.m-chanbar__scroll a { flex: 0 0 auto; font-size: 15px; color: var(--c-text-2); position: relative; height: 44px; display: flex; align-items: center; }
.m-chanbar__scroll a.is-active { color: var(--c-primary); font-weight: 600; }
.m-chanbar__scroll a.is-active::after {
  content: ""; position: absolute; left: 50%; transform: translateX(-50%); bottom: 4px;
  width: 20px; height: 2px; border-radius: 2px; background: var(--c-primary);
}
/* 列表页用的分组标签 */
/* ---------- 4. 移动端首页 ---------- */
.m-main { padding: 12px 0 0; }
.m-sec { background: #fff; border-radius: 10px; margin: 0 12px 12px; padding: 14px; }
.m-sec__hd { display: flex; align-items: center; margin-bottom: 4px; }
.m-sec__title { font-size: 16px; }
.m-sec__title::before {
  content: ""; display: inline-block; width: 3px; height: 14px; border-radius: 2px;
  background: var(--c-primary); margin-right: 8px; vertical-align: -1px;
}
.m-sec__more { margin-left: auto; font-size: 12px; color: var(--c-text-3); }
.m-sec__hd--tight { margin-bottom: 6px; }

/* 头条 */
.m-hero { display: block; padding: 0 12px; margin-bottom: 12px; }
.m-hero__card { position: relative; border-radius: 10px; overflow: hidden; background: #f0f2f5; }
.m-hero__card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.m-hero__body { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 14px 12px; background: linear-gradient(180deg, rgba(12, 20, 36, 0), rgba(12, 20, 36, .82)); }
.m-hero__body h2 { color: #fff; font-size: 17px; line-height: 1.5; }
.m-hero__body p { margin-top: 6px; font-size: 12px; color: rgba(255, 255, 255, .75); }
.m-hero__tags { display: flex; gap: 8px; margin-bottom: 8px; }
.m-hero__tags .tag { background: rgba(255, 255, 255, .2); color: #fff; }

/* 图文卡列表 */
.m-cardlist > li { padding: 13px 0; border-bottom: 1px solid #f4f5f7; }
.m-cardlist > li:last-child { border-bottom: 0; padding-bottom: 2px; }
.m-card { display: flex; gap: 10px; }
.m-card__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.m-card__title { font-size: 15px; font-weight: 500; line-height: 1.5; color: var(--c-title); }
.m-card__desc { margin-top: 6px; font-size: 12px; line-height: 1.6; color: var(--c-text-3); }
.m-card__meta { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 8px; font-size: 11px; color: var(--c-text-3); }
.m-card__thumb { flex: 0 0 108px; width: 108px; height: 76px; border-radius: 6px; overflow: hidden; background: #f0f2f5; }
.m-card__thumb img { width: 100%; height: 100%; object-fit: cover; }

/* 纯文字条目 */
.m-postlist > li { padding: 12px 0; border-bottom: 1px solid #f4f5f7; display: flex; gap: 10px; align-items: center; }
.m-postlist > li:last-child { border-bottom: 0; }
.m-postlist .t { flex: 1; min-width: 0; font-size: 15px; color: var(--c-title); line-height: 1.5; }
.m-postlist .d { flex: 0 0 auto; font-size: 11px; color: var(--c-text-3); }

/* 排行榜（横向两列） */
.m-ranklist { display: grid; grid-template-columns: 1fr; gap: 0; }
.m-ranklist li { display: flex; gap: 8px; padding: 10px 0; border-bottom: 1px solid #f4f5f7; font-size: 14px; }
.m-ranklist li:last-child { border-bottom: 0; }
.m-ranklist .no { flex: 0 0 17px; height: 17px; line-height: 17px; margin-top: 3px; text-align: center; font-size: 11px; border-radius: 3px; background: #f2f4f7; color: var(--c-text-2); }
.m-ranklist li:nth-child(1) .no { background: var(--c-primary); color: #fff; }
.m-ranklist li:nth-child(2) .no { background: #f9a03f; color: #fff; }
.m-ranklist li:nth-child(3) .no { background: #f5c451; color: #fff; }

/* 标签云 */
.m-tagcloud { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 8px; }
.m-tagcloud a { padding: 5px 12px; border-radius: 999px; background: #f5f6f8; font-size: 12px; color: var(--c-text-2); }

/* 移动端 Tab 切换 */
.m-tabs { display: flex; gap: 10px; overflow-x: auto; padding: 10px 0 2px; scrollbar-width: none; }
.m-tabs::-webkit-scrollbar { display: none; }
.m-tabs button {
  flex: 0 0 auto; padding: 5px 14px; border-radius: 999px;
  background: #f4f6f9; font-size: 13px; color: var(--c-text-2);
}
.m-tabs button.is-active { background: var(--c-primary-light); color: var(--c-primary); font-weight: 500; }

/* 加载更多 */
.m-loadmore { display: block; width: calc(100% - 24px); margin: 0 12px 16px; height: 42px; border-radius: 999px; background: #fff; color: var(--c-primary); font-size: 14px; border: 1px solid var(--c-border-2); }
.m-loadmore:active { background: #f7f9ff; }
.m-end { text-align: center; font-size: 12px; color: var(--c-text-3); padding: 4px 0 16px; }

/* ---------- 5. 移动端列表页 ---------- */
.m-listhead { background: #fff; padding: 14px 12px 12px; border-bottom: 1px solid var(--c-border); }
.m-listhead h1 { font-size: 19px; }
.m-listhead p { margin-top: 5px; font-size: 12px; color: var(--c-text-3); }
.m-listhead .stat { margin-top: 8px; font-size: 12px; color: var(--c-text-2); }
.m-listhead .stat b { color: var(--c-primary); font-size: 15px; }
.m-breadcrumb { padding: 10px 12px 0; }
.m-breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; color: var(--c-text-3); }
.m-breadcrumb li::after { content: "/"; margin-left: 6px; color: var(--c-border-2); }
.m-breadcrumb li:last-child::after { content: ""; }

.m-pager { display: flex; gap: 10px; padding: 16px 12px 8px; }
.m-pager a {
  flex: 1; height: 40px; display: flex; align-items: center; justify-content: center;
  background: #fff; border-radius: 999px; font-size: 14px; color: var(--c-text);
  border: 1px solid var(--c-border);
}
.m-pager a.is-primary { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.m-pager span { flex: 1; height: 40px; display: flex; align-items: center; justify-content: center; background: #fff; border-radius: 999px; font-size: 14px; color: var(--c-text-3); border: 1px solid var(--c-border); }

/* ---------- 6. 移动端文章页 ---------- */
.m-article { background: #fff; padding: 16px 16px 20px; }
.m-article__title { font-size: 21px; line-height: 1.45; }
.m-article__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--c-border); font-size: 12px; color: var(--c-text-3); }
.m-article__body { padding-top: 16px; font-size: 16px; line-height: 1.9; color: #2b3444; }
.m-article__body p { margin-bottom: 16px; }
.m-article__body h2 { margin: 24px 0 12px; font-size: 18px; padding-left: 10px; position: relative; }
.m-article__body h2::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 3px; height: 15px; border-radius: 2px; background: var(--c-primary); }
.m-article__body h3 { margin: 18px 0 10px; font-size: 16px; }
.m-article__body figure { margin: 18px 0; }
.m-article__body figure img { width: 100%; border-radius: 6px; }
.m-article__body figcaption { margin-top: 8px; text-align: center; font-size: 12px; color: var(--c-text-3); }
.m-article__body blockquote { margin: 18px 0; padding: 12px 14px; border-left: 3px solid var(--c-primary); background: #f8faff; border-radius: 0 6px 6px 0; font-size: 15px; color: var(--c-text-2); }
.m-article__body ul li { position: relative; padding-left: 16px; margin-bottom: 8px; }
.m-article__body ul li::before { content: ""; position: absolute; left: 4px; top: 12px; width: 5px; height: 5px; border-radius: 50%; background: var(--c-primary); opacity: .55; }
.m-article__body .adbox { height: 76px; margin: 20px 0; border-radius: 6px; }
.m-copyright { margin-top: 20px; padding: 12px; border-radius: 6px; background: #fafbfc; font-size: 12px; line-height: 1.8; color: var(--c-text-3); }

/* 相关阅读 */
.m-related { background: #fff; margin-top: 12px; padding: 14px 16px; }
.m-related > li { padding: 11px 0; border-bottom: 1px solid #f4f5f7; font-size: 14px; }
.m-related > li:last-child { border-bottom: 0; }
.m-related .t { color: var(--c-title); line-height: 1.55; display: block; }
.m-related .d { margin-top: 5px; font-size: 11px; color: var(--c-text-3); }

/* 底部固定操作条 */
.m-actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 110;
  display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 12px;
  background: rgba(255, 255, 255, .97); border-top: 1px solid var(--c-border);
  backdrop-filter: blur(8px);
}
.m-actionbar__item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  flex: 0 0 auto; width: 48px; font-size: 10px; color: var(--c-text-3);
}
.m-actionbar__btn {
  flex: 1; height: 38px; display: flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 999px; background: #f4f6f9; font-size: 14px; color: var(--c-text);
}
.m-actionbar__btn.is-primary { background: var(--c-primary); color: #fff; }

/* ---------- 7. 底部导航 ---------- */
.m-tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
  display: grid; grid-template-columns: repeat(4, 1fr); height: 54px;
  background: #fff; border-top: 1px solid var(--c-border); padding-bottom: env(safe-area-inset-bottom);
}
.m-tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 10px; color: var(--c-text-3); }
.m-tabbar a.is-active { color: var(--c-primary); }

/* ---------- 8. 页脚 ---------- */
.m-footer { padding: 20px 16px 24px; text-align: center; font-size: 12px; color: var(--c-text-3); line-height: 1.9; }
.m-footer .links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; margin-bottom: 12px; }
.m-footer .links a { color: var(--c-text-2); }

/* 为底部固定条留出空间 */
.has-tabbar { padding-bottom: 66px; }
.has-actionbar { padding-bottom: 76px; }

.home-info-banner { display: block; width: 100%; margin-bottom: 16px; overflow: hidden; }
.home-info-banner img { display: block; width: 100%; height: auto; }
