/* 社区 community · 移动端骨架 + 首页流 */

.cm-m { padding-bottom: 0; }
.cm-m.cm-has-tabbar { padding-bottom: 0; }

/* 公告 */
.cm-m-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  background: var(--cm-accent-soft);
  border-bottom: 1px solid var(--cm-accent-line);
  font-size: 11.5px;
  color: var(--cm-accent-dark);
  overflow: hidden;
}
.cm-m-notice span {
  flex: 0 0 auto;
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--cm-accent);
  color: #fff;
  font-size: 10px;
  letter-spacing: .04em;
}
.cm-m-notice p { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 头部 */
.cm-m-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 18px;
  background: #fff;
  border-bottom: 1px solid var(--cm-line);
}

.cm-m-logo { display: flex; align-items: center; gap: 7px; min-width: 0; }
.cm-m-logo .cm-logo-mark { width: 32px; height: 32px; font-size: 15px; border-radius: 8px; }
.cm-m-logo .cm-logo-name { font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-m-logo img { height: 34px; width: auto; }

.cm-m-acts { display: flex; gap: 4px; }
.cm-m-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--cm-text-2);
  cursor: pointer;
}
.cm-m-icon:active { background: var(--cm-accent-soft); }

/* 搜索弹层 */
.cm-m-search-layer {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: #fff;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.cm-m-search-layer[hidden] { display: none; }

.cm-m-search-inner {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 9vh 16px 40px;
}

.cm-m-search-box { display: flex; gap: 8px; }
.cm-m-search-box input {
  flex: 1;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--cm-line);
  border-radius: 20px;
  background: var(--cm-bg);
  outline: none;
}
.cm-m-search-box input:focus { border-color: var(--cm-accent); background: #fff; }
.cm-m-search-box button {
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 20px;
  background: var(--cm-accent);
  color: #fff;
  font-size: 13px;
}
.cm-m-search-close {
  display: block;
  margin: 12px 0 0 2px;
  border: 0;
  background: transparent;
  color: var(--cm-text-3);
  font-size: 13px;
  padding: 4px 2px;
}

/* 搜索层推荐 */
.cm-m-search-his h4 { display: flex; align-items: center; justify-content: space-between; }
.cm-his-clear {
  border: 0;
  background: transparent;
  color: var(--cm-text-3);
  font-size: 12px;
  padding: 2px 0;
}
.cm-m-search-sec { margin-top: 22px; }
.cm-m-search-sec h4 {
  font-size: 12px;
  font-weight: 500;
  color: var(--cm-text-3);
  letter-spacing: .04em;
  margin-bottom: 10px;
}
.cm-m-search-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.cm-m-search-tags a {
  padding: 5px 12px;
  border-radius: 14px;
  background: var(--cm-accent-soft);
  color: var(--cm-accent);
  font-size: 12.5px;
}
.cm-m-search-tags a:active { background: var(--cm-accent); color: #fff; }

.cm-m-search-hot li a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--cm-line);
  font-size: 13px;
  color: var(--cm-text);
}
.cm-m-search-hot li a:active { color: var(--cm-accent); }
.cm-m-search-hot em {
  flex: 0 0 auto;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  color: var(--cm-text-3);
  font-variant-numeric: tabular-nums;
}
.cm-m-search-hot li:nth-child(-n+3) em { color: var(--cm-accent); }
.cm-m-search-hot span {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 抽屉 */
.cm-m-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 78%;
  max-width: 320px;
  z-index: 50;
  background: #fff;
  border-left: 1px solid var(--cm-line);
  box-shadow: -12px 0 32px rgba(16, 40, 80, .12);
  padding: 16px 16px 90px;
  overflow-y: auto;
}
.cm-m-drawer[hidden] { display: none; }
.cm-m-drawer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--cm-line);
}
.cm-m-drawer-bar span { font-size: 12px; color: var(--cm-text-3); letter-spacing: .08em; }
.cm-m-drawer-close {
  width: 30px;
  height: 30px;
  border: 1px solid var(--cm-line);
  border-radius: 8px;
  background: #fff;
  color: var(--cm-text-2);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

.cm-m-drawer-head { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--cm-line); }
.cm-m-drawer-head img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.cm-m-drawer-head b { display: block; font-size: 14px; }
.cm-m-drawer-head span { font-size: 11.5px; color: var(--cm-text-3); }
.cm-m-drawer-guest b { display: block; font-size: 14px; }
.cm-m-drawer-guest span { font-size: 11.5px; color: var(--cm-text-3); }

.cm-m-drawer-nav { display: flex; flex-direction: column; padding: 10px 0; border-bottom: 1px solid var(--cm-line); }
.cm-m-drawer-nav a { padding: 11px 4px; font-size: 13.5px; color: var(--cm-text); }
.cm-m-drawer-nav a:active { color: var(--cm-accent); }

.cm-m-drawer-sorts { padding-top: 12px; }
.cm-m-drawer-sorts span { font-size: 11.5px; color: var(--cm-text-3); }
.cm-m-drawer-sorts a {
  display: inline-block;
  margin: 8px 6px 0 0;
  padding: 5px 11px;
  border-radius: 13px;
  background: var(--cm-bg);
  border: 1px solid var(--cm-line);
  font-size: 12.5px;
  color: var(--cm-text-2);
}

/* 主体 */
.cm-m-main { padding: 0 0 12px; }

.cm-m-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 14px 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cm-m-chips::-webkit-scrollbar { display: none; }
.cm-m-chips a {
  flex: 0 0 auto;
  height: 30px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  border-radius: 15px;
  background: #fff;
  border: 1px solid var(--cm-line);
  font-size: 12.5px;
  color: var(--cm-text-2);
}
.cm-m-chips a.is-on { background: var(--cm-accent); border-color: var(--cm-accent); color: #fff; }

.cm-m-cards { display: flex; flex-direction: column; gap: 10px; padding: 10px 12px 0; }

.cm-m-card {
  background: #fff;
  border: 1px solid var(--cm-line);
  border-radius: 12px;
  padding: 13px 14px 11px;
  box-shadow: 0 1px 6px rgba(22, 119, 255, .05);
}
.cm-m-card-head { display: flex; align-items: center; gap: 7px; }
.cm-m-card-head img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.cm-m-card-head span { font-size: 12px; color: var(--cm-text-2); font-weight: 500; }
.cm-m-card-head span a { color: var(--cm-text-2); }
.cm-m-card-head time { margin-left: auto; font-size: 11px; color: var(--cm-text-3); }

.cm-m-card-link { display: block; margin-top: 8px; }
.cm-m-card-link h2 {
  font-size: 15.5px;
  line-height: 1.45;
  color: var(--cm-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cm-m-card-link p {
  margin-top: 5px;
  font-size: 12.5px;
  color: var(--cm-text-2);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cm-m-card-cover { display: block; margin-top: 9px; border-radius: 8px; overflow: hidden; max-height: 160px; }
.cm-m-card-cover img { width: 100%; height: 160px; object-fit: cover; }

.cm-m-card-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid var(--cm-line);
  font-size: 11px;
  color: var(--cm-text-3);
}
.cm-m-card-foot a { color: var(--cm-accent); }

.cm-m-empty { margin: 16px 12px; padding: 40px 20px; text-align: center; background: #fff; border: 1px dashed var(--cm-line); border-radius: 12px; }
.cm-m-empty div { font-size: 16px; color: var(--cm-accent); margin-bottom: 8px; }
.cm-m-empty p { font-size: 12.5px; color: var(--cm-text-3); }

.cm-m-page { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; padding: 16px 12px 8px; }
.cm-m-page a, .cm-m-page span {
  min-width: 32px;
  height: 32px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--cm-line);
  border-radius: 8px;
  background: #fff;
  font-size: 12.5px;
  color: var(--cm-text-2);
}
.cm-m-page .is-on, .cm-m-page a.on { background: var(--cm-accent); border-color: var(--cm-accent); color: #fff; }

/* 板块宫格 */
.cm-m-boards { margin: 16px 12px 0; padding: 14px; background: #fff; border: 1px solid var(--cm-line); border-radius: 12px; }
.cm-m-boards h2 { font-size: 14px; margin-bottom: 10px; }
.cm-m-board-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cm-m-board-grid a {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--cm-accent-soft);
  color: var(--cm-accent-dark);
  font-size: 12.5px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 底部导航 */
.cm-m-tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  height: 54px;
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--cm-line);
}
.cm-m-tabbar a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  color: var(--cm-text-3);
  font-size: 11px;
}
.cm-m-tabbar a.is-on { color: var(--cm-accent); }
.cm-m-tabbar a svg { display: block; }

/* 页脚（白底浅色多栏 + 友链行 + 版权行） */
.cm-m-footer {
  padding-bottom: 18px;
  background: #fff;
  border-top: 1px solid var(--cm-line);
  font-size: 12px;
  color: var(--cm-text-3);
}
.cm-m-foot-brand {
  padding: 30px 18px 0;
}
.cm-m-foot-brand b {
  display: block;
  font-size: 17px;
  font-weight: 700;
  color: var(--cm-text);
}
.cm-m-foot-brand p {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.8;
  color: var(--cm-text-3);
}
.cm-m-foot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 28px 16px;
  padding: 38px 18px 12px;
}
.cm-m-foot-col h4 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--cm-text);
}
.cm-m-foot-col li { margin-bottom: 7px; list-style: none; }
.cm-m-foot-col a,
.cm-m-foot-col p {
  font-size: 12px;
  line-height: 1.8;
  word-break: break-word;
  color: var(--cm-text-3);
}
.cm-m-foot-col ul li a { font-size: 13.5px; color: var(--cm-text-3); }
.cm-m-foot-col ul li a:hover { color: var(--cm-accent); }
.cm-m-foot-qr { padding: 0; }
.cm-m-foot-qr h4 {
  margin: 0 0 10px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--cm-text);
}
.cm-m-foot-qr img {
  display: block;
  width: 68px;
  height: 68px;
  padding: 3px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--cm-line);
  border-radius: 6px;
}
.cm-m-foot-qr span {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  white-space: nowrap;
  color: var(--cm-text-3);
}
.cm-m-foot-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 8px 16px 0;
  padding: 10px 0 0;
  border-top: 1px solid var(--cm-line);
  font-size: 11.5px;
  color: var(--cm-text-3);
}
.cm-m-foot-links a { color: var(--cm-text-3); }
.cm-m-foot-legal {
  margin: 24px 18px 0;
  padding: 26px 0 8px;
  border-top: 1px solid var(--cm-line);
  text-align: center;
  font-size: 11.5px;
  line-height: 1.9;
  color: var(--cm-text-3);
}
.cm-m-foot-copy {
  display: block;
  font-size: 13px;
  color: var(--cm-text-2);
}
.cm-m-foot-beian {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 12px;
  margin-top: 4px;
}
.cm-m-foot-beian a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  color: var(--cm-text-3);
  text-decoration: none;
}
.cm-m-beian img { width: 14px; height: 14px; object-fit: contain; display: block; }
.cm-m-foot-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
  font-size: 11px;
  color: var(--cm-text-3);
  opacity: .9;
}
.cm-m-foot-switch { color: var(--cm-accent); }

/* 移动端首页页面模块 */
.cm-m-plain {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 14px 14px 4px;
}
.cm-m-plain b { font-size: 14px; color: var(--cm-text); }
.cm-m-plain em {
  font-style: normal;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--cm-text-3);
}
.cm-m-page-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 21px 18px;
  border-top: 1px solid #f1f5fa;
  font-size: 15px;
  color: var(--cm-text-2);
}
.cm-m-page-item > i:first-child { display: none; }
.cm-m-page-item i {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 2px;
  background: var(--cm-accent-soft);
  border: 1px solid #c8dcff;
}
.cm-m-page-item span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cm-m-page-item em { font-style: normal; font-size: 12px; color: var(--cm-text-3); }

/* ---------- 移动帖子页 / 独立页 ---------- */
.cm-post-grid, .cm-page-grid {
  display: block;
  padding: 0 12px;
}
.cm-post-side, .cm-page-side { display: none; }
.cm-post-main, .cm-page-main { min-width: 0; }

.cm-crumb { margin: 12px 2px 10px; font-size: 11.5px; }

.cm-phead { padding: 15px 15px 13px; border-radius: 10px; margin-bottom: 10px; }
.cm-phead-top { margin-bottom: 9px; }
.cm-phead-cat { height: 25px; font-size: 12px; padding: 0 10px 0 4px; }
.cm-phead-cat .cm-sort-icon { width: 19px; height: 19px; font-size: 10px; }
.cm-phead-date { font-size: 11.5px; }
.cm-post-title { font-size: 19.5px; line-height: 1.42; margin-bottom: 10px; }
.cm-phead .cm-byline { padding-bottom: 0; margin-bottom: 0; border-bottom: 0; }
.cm-page-title { font-size: 19px; }
.cm-page-card { padding: 16px 16px 18px; }
.cm-page-meta { margin: 6px 0 12px; }

.cm-byline { gap: 8px; padding-bottom: 12px; margin-bottom: 12px; }
.cm-byline .cm-avatar { width: 30px; height: 30px; }
.cm-byline-sub { flex-wrap: wrap; gap: 4px; }

.cm-post-hero { margin-bottom: 14px; border-radius: 10px; max-height: 220px; }
.cm-post-hero img { max-height: 220px; }

.cm-post-main .cm-content { padding: 16px; font-size: 14.5px; line-height: 1.8; border-radius: 10px; }
.cm-content pre { font-size: 12px; padding: 11px; }

.cm-post-tags { margin: 12px 0 10px; }
.cm-post-actions { padding: 0 0 14px; gap: 8px; }
.cm-act-btn { height: 32px; padding: 0 12px; font-size: 12.5px; }

.cm-author-card { flex-wrap: wrap; gap: 10px; margin: 14px 0; padding: 13px 14px; }
.cm-author-card .cm-btn { width: 100%; margin-top: 4px; }
.cm-author-body b { font-size: 13.5px; }
.cm-author-body p { font-size: 12px; }

.cm-reply { padding: 14px 15px; margin-bottom: 14px; }
.cm-reply-fields { grid-template-columns: 1fr; gap: 8px; }
.cm-reply-act { flex-wrap: wrap; }

.cm-floors { padding: 13px 14px 2px; border-radius: 10px; }
.cm-floor { gap: 9px; padding: 12px 0 11px; }
.cm-floor-side { width: 32px; }
.cm-floor-side .cm-avatar { width: 32px; height: 32px; }
.cm-floor-meta { gap: 6px; }
.cm-floor-no { height: 18px; font-size: 10.5px; padding: 0 5px; border-radius: 5px; }
.cm-floor-name { font-size: 13px; }
.cm-floor-tag { height: 16px; font-size: 10px; }
.cm-floor-time { font-size: 11px; }
.cm-floor-content { font-size: 13.5px; margin-top: 6px; }
.cm-floor-replies {
  margin: 0 0 10px 0;
  padding: 2px 11px;
  border-radius: 0 8px 8px 0;
}
.cm-floor-sub { padding: 10px 0 9px; }
.cm-floor-sub .cm-floor-side { width: 26px; }
.cm-floor-sub .cm-floor-side .cm-avatar { width: 26px; height: 26px; }
.cm-floor-sub .cm-floor-content { font-size: 13px; }

/* 上下篇：手机端合成一张卡，两行 + 细分割线 */
.cm-neighbor {
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: 14px;
  background: #fff;
  border: 1px solid var(--cm-line);
  border-radius: 12px;
  box-shadow: 0 1px 6px rgba(22, 119, 255, .05);
  overflow: hidden;
}
.cm-neighbor-item {
  flex-direction: row;
  align-items: center;
  gap: 9px;
  padding: 11px 13px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.cm-neighbor-item + .cm-neighbor-item { border-top: 1px solid var(--cm-line); }
.cm-neighbor-item.is-next { text-align: left; }
.cm-neighbor-item.is-next .cm-neighbor-dir { justify-content: flex-start; }
.cm-neighbor-item:hover { border-color: transparent; box-shadow: none; }
.cm-neighbor-dir { flex: 0 0 auto; font-size: 11px; color: var(--cm-text-3); }
.cm-neighbor-title {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  line-height: 1.5;
  -webkit-line-clamp: 2;
}

.cm-solo-box { margin: 10vh 16px 0; padding: 36px 22px; }

/* ---------- 移动端：页面入口 / 作者页 ---------- */
.cm-pages-strip { gap: 6px; margin: 8px 0 10px; }
.cm-pages-strip a { height: 26px; padding: 0 9px; font-size: 12px; border-radius: 7px; }
.cm-pages-strip em { display: none; }

.cm-author { margin: 14px 0 30px; padding: 0 16px; }
.cm-author-hero { gap: 12px; padding: 16px 15px; }
.cm-author-avatar { width: 54px; height: 54px; border-radius: 11px; }
.cm-author-main h1 { margin-top: 0; font-size: 18px; }
.cm-author-meta { gap: 5px 10px; margin-top: 7px; font-size: 11.5px; }
.cm-author-desc { margin-top: 8px; font-size: 12.5px; line-height: 1.65; }
.cm-author-edit { height: 28px; padding: 0 10px; font-size: 12px; }
.cm-author-head { margin: 16px 0 10px; }
.cm-author-head h2 { font-size: 14px; }
.cm-author .cm-post { padding: 13px 14px 11px; }
.cm-author .cm-post-text h2 { font-size: 15.5px; }
.cm-author .cm-post-text p { font-size: 12.5px; }

/* ---------- 移动端：作者页 / 404 ---------- */
.cm-author-m { padding: 14px 16px 24px; }
.cm-author-m .cm-author-hero { margin: 0; }
.cm-author-m .cm-author-contact { margin-top: 9px; gap: 5px 8px; }
.cm-author-m .cm-contact-icon { width: 32px; height: 32px; border-radius: 9px; }
.cm-author-m .cm-author-head { padding: 0; margin: 15px 0 10px; }
.cm-author-m .cm-m-card { margin: 0 0 10px; }

.cm-404p-wrap { padding: 26px 16px 40px; }
.cm-404p { padding: 32px 18px 28px; }
.cm-404p-code { font-size: 48px; }
.cm-404p h1 { font-size: 17px; }
.cm-404p-act { flex-direction: column; }
.cm-404p-act .cm-btn { width: 100%; height: 44px; }

/* 底部导航是 fixed，避让距离放在页脚上，页脚下方不再露出底色 */
.cm-has-tabbar .cm-m-footer { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
.cm-m:not(.cm-has-tabbar) .cm-m-footer { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }

/* 桌面浏览器强行看手机版：内容居中一列，别铺满整屏 */
@media (min-width: 720px) {
  body.cm-m { background: #e9eef6; }
  body.cm-m .cm-m-body,
  body.cm-m .cm-m-header,
  body.cm-m .cm-m-notice,
  body.cm-m .cm-m-footer { max-width: 720px; margin-left: auto; margin-right: auto; }
  body.cm-m .cm-m-footer { box-shadow: 0 -1px 0 var(--cm-line); }
  /* 宽屏下手机页脚铺成三栏：导航 / 关于 / 关注靠右，别让二维码孤零零杵在左边 */
  body.cm-m .cm-m-footer { position: relative; }
  body.cm-m .cm-m-foot-grid { grid-template-columns: 1fr 1fr 168px; gap: 24px; padding: 26px 24px 6px; }
  body.cm-m .cm-m-foot-qr img { width: 92px; height: 92px; }
  body.cm-m .cm-m-foot-qr span { font-size: 12px; }
  body.cm-m .cm-m-foot-links,
  body.cm-m .cm-m-foot-copy { padding-left: 24px; padding-right: 24px; }
  body.cm-m .cm-m-body { padding-left: 4px; padding-right: 4px; }
  body.cm-m .cm-m-tabbar {
    left: 50%;
    right: auto;
    width: 720px;
    transform: translateX(-50%);
    box-shadow: 0 0 0 1px var(--cm-line);
  }
}

/* ---------- 移动首页 · 按板块分组 ---------- */
.cm-m-bf { padding: 2px 0 4px; }
.cm-m-bf-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px 9px;
  border-bottom: 1px solid var(--cm-line);
}
.cm-m-bf-name {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-size: 14.5px;
  color: var(--cm-text);
}
.cm-m-bf-name b { font-weight: 600; }
.cm-m-bf-head em { font-style: normal; font-size: 11.5px; color: var(--cm-text-3); }
.cm-m-bf-more { margin-left: auto; font-size: 12px; color: var(--cm-text-3); }
.cm-m-bf-list { padding: 2px 14px 8px; }
.cm-m-bf-list li {
  padding: 9px 0;
  border-bottom: 1px dashed var(--cm-line);
}
.cm-m-bf-list li:last-child { border-bottom: 0; }
.cm-m-bf-title {
  display: block;
  font-size: 14px;
  line-height: 1.5;
  color: var(--cm-text);
}
.cm-m-bf-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--cm-text-3);
}
.cm-m-bf-meta a { color: var(--cm-text-2); }
.cm-m-bf-meta i { font-style: normal; }
.cm-m-bf-empty { font-size: 13px; color: var(--cm-text-3); border-bottom: 0 !important; }
.cm-m-bf-empty a { color: var(--cm-accent); }
.cm-m-bf-all {
  display: block;
  margin: 10px 14px 4px;
  padding: 11px;
  text-align: center;
  font-size: 13px;
  color: var(--cm-text-3);
  background: #fff;
  border: 1px solid var(--cm-line);
  border-radius: var(--cm-radius);
}

.cm-m-foot-qr img { font-size: 0; }

/* ---------- 子分类 / 回复图片按钮 ---------- */
.cm-m-chips a.is-sub { color: var(--cm-text-3); font-size: 12px; background: #fbfcfe; border-style: dashed; }
.cm-m-chips a.is-sub i { font-style: normal; margin-right: 2px; color: var(--cm-line); }
.cm-m-bf.is-sub .cm-m-bf-head { padding-top: 2px; }
.cm-m-bf-parent { font-size: 11px; font-weight: 400; color: var(--cm-text-3); margin-right: 4px; }
.cm-m-bf-parent::after { content: ' /'; }
.cm-m-board-grid a.is-sub { background: #f4f7fc; color: var(--cm-text-2); font-size: 12px; }
.cm-m-drawer-sorts a.is-sub { color: var(--cm-text-3); font-size: 12.5px; }
.cm-m-drawer-sorts a.is-sub i { font-style: normal; margin-right: 3px; color: var(--cm-line); }

.cm-reply .cm-up-btn.cm-cmt-img-btn {
  height: 34px;
  padding: 0 13px;
  border-radius: 8px;
  font-size: 13.5px;
  gap: 6px;
  background: #fff;
  color: var(--cm-text-2);
}
.cm-reply .cm-up-btn.cm-cmt-img-btn[disabled] { opacity: .65; cursor: default; }
.cm-up-spin {
  width: 12px;
  height: 12px;
  border: 2px solid var(--cm-accent-line);
  border-top-color: var(--cm-accent);
  border-radius: 50%;
  animation: cm-spin .7s linear infinite;
}
@keyframes cm-spin { to { transform: rotate(360deg); } }

/* ---------- 首页自定义排版区（手机） ---------- */
.cm-hblocks { margin: 10px 12px 2px; }
.cm-hblocks-head { margin: 0 0 8px 2px; }
.cm-hblocks-head h2 { font-size: 15px; }
.cm-hblocks-head em { font-size: 10px; }
.cm-hblocks-grid { gap: 8px; }
.cm-hb-row { gap: 8px; }
.cm-hb-row.is-cards .cm-hb { flex: 1 1 150px; }
.cm-hb { padding: 12px 13px; border-radius: 10px; }
.cm-hb-title { font-size: 14px; }
.cm-hb-text { font-size: 12.5px; line-height: 1.68; }
.cm-hb-num { font-size: 21px; }
.cm-hb-label { font-size: 11.5px; }
.cm-hb-link { font-size: 12px; }
.cm-hb-banner .cm-hb-title { font-size: 15px; }
.cm-hb-html { padding: 0; }

/* ---------------- 社区中心 /bbs（手机） ---------------- */
.cm-hub { gap: 12px; }
.cm-hub-hero { flex-direction: column; align-items: stretch; gap: 14px; padding: 18px 16px; }
.cm-hub-hero-txt h1 { font-size: 20px; }
.cm-hub-hero-txt p { font-size: 13px; margin-bottom: 10px; }
.cm-hub-stats { gap: 16px; font-size: 12px; }
.cm-hub-stats b { font-size: 15px; }
.cm-hub-write { margin: 0; text-align: center; padding: 11px 0; }
.cm-hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cm-hub-cat { padding: 13px 13px 12px; gap: 7px; }
.cm-hub-cat:hover { transform: none; }
.cm-hub-cat-top { gap: 7px; }
.cm-hub-cat-top b { font-size: 14px; }
.cm-hub-cat-top em { font-size: 11px; padding: 1px 7px; }
.cm-hub-cat .cm-sort-icon { width: 24px; height: 24px; flex-basis: 24px; font-size: 12px; }
.cm-hub-cat-desc { font-size: 12px; min-height: 0; -webkit-line-clamp: 2; }
.cm-hub-cat-last { margin-top: auto; font-size: 12px; padding-top: 8px; }
.cm-hub-list { padding: 2px 12px 4px; }
.cm-hub-list li { flex-direction: column; align-items: stretch; gap: 6px; padding: 10px 0; }
.cm-hub-title { font-size: 14px; white-space: normal; line-height: 1.55; }
.cm-hub-meta { gap: 8px; font-size: 11.5px; flex-wrap: wrap; }
.cm-hub-more { margin: 2px 12px 8px; }

/* 首页·页面快链（手机） */
.cm-home-pages { padding: 0 0 4px; }
/* 页面卡跟自定义区一样留 12px 边距，别顶到屏幕边 */
.cm-m-card.cm-m-pages { margin: 0 12px; border-radius: var(--cm-radius, 12px); }
.cm-home-pages-grid { grid-template-columns: 1fr; gap: 0; padding: 2px 10px 6px; }
.cm-home-pages-grid a { padding: 11px 8px; font-size: 13.5px; border-bottom: 1px solid var(--cm-line); border-radius: 0; }
.cm-home-pages-grid a:last-child { border-bottom: 0; }

/* 手机首页·小标题 */
.cm-m-sec-head { display: flex; align-items: baseline; justify-content: space-between; padding: 6px 12px 0; }
.cm-m-sec-head h2 { margin: 0; font-size: 18px; color: var(--cm-text); }
.cm-m-sec-head span { font-size: 12px; color: var(--cm-text-3); }

.cm-m-chips .is-more { color: var(--cm-accent); border-style: dashed; }

/* ---------- 手机首页四段：自定义区1 + 最新5条 + 页面 + 自定义区2 ---------- */
.cm-m-sec-head { margin-top: 36px; }
.cm-m-sec-head em {
  font-style: normal;
  margin-left: auto;
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cm-text-3);
}
.cm-m-sec-more { font-size: 13px; color: var(--cm-accent); text-decoration: none; }
.cm-m-toplist { margin: 8px 12px 4px; overflow: hidden; }
.cm-m-toplist-items { margin: 0; padding: 0; list-style: none; }
.cm-m-toplist-items li + li { border-top: 1px solid #f1f5fa; }
.cm-m-toplist-items a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 21px 18px;
  align-items: flex-start;
  text-decoration: none;
}
.cm-m-toplist-items i {
  flex: 0 0 auto;
  margin-top: 3px;
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  color: #9cb4d4;
}
.cm-m-toplist-items li:nth-child(-n+3) i { color: var(--cm-accent); }
.cm-m-toplist-items span {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 16px;
  line-height: 1.55;
  color: var(--cm-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cm-m-toplist-items time {
  flex: 0 0 auto;
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--cm-text-3);
}
.cm-m-toplist-empty { padding: 26px 18px; text-align: center; }
.cm-m-toplist-empty p { margin: 0 0 14px; font-size: 13px; color: var(--cm-text-3); }

/* 手机上的 hero（自定义区 html 块）压缩成竖版 */
.cm-m-main .cm-hero {
  display: block;
  margin: 14px 12px 4px;
  padding: 26px 20px 24px;
  border-radius: 14px;
}
.cm-m-main .cm-hero h1 { font-size: 28px; line-height: 1.32; margin-bottom: 12px; }
.cm-m-main .cm-hero-kicker { font-size: 10.5px; letter-spacing: .16em; margin-bottom: 9px; }
.cm-m-main .cm-hero-sub { font-size: 14.5px; line-height: 1.85; }
.cm-m-main .cm-hero-acts { margin-top: 18px; gap: 10px; }
.cm-m-main .cm-hero-btn { height: 38px; padding: 0 16px; font-size: 13.5px; }
.cm-m-main .cm-hero-art { display: none; }

/* 手机上的自定义卡 / 横幅 */
.cm-m-main .cm-hblocks { margin: 8px 12px 4px; }
.cm-m-main .cm-hb-card { padding: 18px; }
.cm-m-main .cm-hb-title { font-size: 16px; }
.cm-m-main .cm-hb-text { font-size: 14px; }
.cm-m-main .cm-hb-banner { padding: 13px 15px; gap: 6px 10px; }
.cm-m-main .cm-hb-title { font-size: 14.5px; }
.cm-m-main .cm-hb-text { font-size: 12.5px; line-height: 1.75; }
.cm-m-main .cm-hb-link { height: 32px; padding: 0 14px; font-size: 12.5px; }
