/*
 * RiPro 前端重写 · 单文章家族（Stage S4）
 * 覆盖 general/hero/shop/video 四态：面包屑、Hero（标题/盒面/购买下载）、正文排印、
 *   下载/购买面板（沿用 .ri-down-warp/.js-pay-action/.copy-pwd/价格组/下载令牌链接）、标签/社交/版权、
 *   上下篇、相关、评论、侧栏、移动端安全区吸底 CTA。仅重构视觉与骨架，不改任何业务函数与字段。
 * 保留 JS 钩子：.js-pay-action[data-id/type/info]、.copy-pwd[data-pwd]、.ri-down-warp、
 *   .post-share-btn/.post-fav-btn/.post-like-btn、.switch-video、heroVideoJs、[data-sticky]/[data-sticky-content]。
 */

/* ============ 顶部面包屑 ============ */
.mm-single-crumb { border-bottom: var(--mm-border) solid var(--mm-line); background: var(--mm-surface); }
.mm-single-crumb .mm-shell-container { padding-block: var(--mm-space-2); }

/* ============ 布局骨架 ============ */
.mm-single { padding-block: var(--mm-space-4) var(--mm-space-6); }
.mm-single__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: clamp(1rem, 2.5vw, 2rem);
  align-items: start;
}
.mm-single__main { min-width: 0; }
.mm-single__side { min-width: 0; }
.mm-single__side-inner { display: grid; gap: var(--mm-space-4); }
@media (max-width: 991.98px) {
  .mm-single__grid { grid-template-columns: 1fr; }
}

/* 内容卡 */
.mm-single__card {
  background: var(--mm-surface);
  border: var(--mm-border) solid var(--mm-line);
  border-radius: var(--mm-radius-lg);
  padding: clamp(1.1rem, 3vw, 2.2rem);
  box-shadow: var(--mm-shadow-sm);
}
.mm-single__head { margin-bottom: var(--mm-space-4); }
.mm-single__title {
  margin: 0 0 var(--mm-space-3);
  font-family: var(--mm-font-display);
  font-size: var(--mm-fs-700);
  font-weight: var(--mm-fw-black);
  line-height: var(--mm-lh-tight);
  letter-spacing: -0.01em;
  color: var(--mm-ink);
  word-break: break-word;
  overflow-wrap: anywhere;
}
.mm-single__meta,
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--mm-space-2) var(--mm-space-4);
  color: var(--mm-ink-faint);
  font-size: var(--mm-fs-200);
}
.mm-single__meta span,
.article-meta span { display: inline-flex; align-items: center; gap: 0.35em; }
.mm-single__meta a,
.article-meta a { color: inherit; text-decoration: none; }
.mm-single__meta a:hover,
.article-meta a:hover { color: var(--mm-accent); }
.mm-single__meta .meta-cat-dot a,
.article-meta .meta-cat-dot a { color: var(--mm-accent); }

/* ============ 正文排印 ============ */
.post-content {
  color: var(--mm-ink);
  font-size: var(--mm-fs-400);
  line-height: var(--mm-lh-body);
  word-break: break-word;
  overflow-wrap: anywhere;
}
.post-content > * + * { margin-top: var(--mm-space-4); }
.post-content h1, .post-content h2, .post-content h3, .post-content h4 {
  font-family: var(--mm-font-display);
  font-weight: var(--mm-fw-bold);
  line-height: var(--mm-lh-snug);
  color: var(--mm-ink);
  margin-top: var(--mm-space-6);
  scroll-margin-top: 90px;
}
.post-content h2 { font-size: var(--mm-fs-600); position: relative; padding-inline-start: 0.75rem; }
.post-content h2::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.15em;
  bottom: 0.15em;
  width: 4px;
  border-radius: 3px;
  background: var(--mm-accent);
}
.post-content h3 { font-size: var(--mm-fs-500); }
.post-content p { margin: 0; }
.post-content a { color: var(--mm-accent); text-underline-offset: 2px; }
.post-content img { max-width: 100%; height: auto; border-radius: var(--mm-radius-md); }
.post-content ul, .post-content ol { padding-inline-start: 1.5em; }
.post-content li + li { margin-top: 0.35em; }
.post-content blockquote {
  margin: 0;
  padding: var(--mm-space-3) var(--mm-space-4);
  border-inline-start: 3px solid var(--mm-accent);
  background: var(--mm-surface-2);
  border-radius: var(--mm-radius-sm);
  color: var(--mm-ink-soft);
}
.post-content pre {
  padding: var(--mm-space-4);
  background: var(--mm-surface-sunken);
  border: var(--mm-border) solid var(--mm-line);
  border-radius: var(--mm-radius-md);
  overflow: auto;
  font-family: var(--mm-font-mono);
  font-size: var(--mm-fs-200);
}
.post-content :not(pre) > code {
  padding: 0.15em 0.4em;
  background: var(--mm-surface-2);
  border-radius: var(--mm-radius-xs);
  font-family: var(--mm-font-mono);
  font-size: 0.9em;
}
.post-content table { width: 100%; border-collapse: collapse; font-size: var(--mm-fs-200); }
.post-content th, .post-content td { padding: 0.6rem 0.8rem; border: var(--mm-border) solid var(--mm-line); text-align: start; }
.post-content th { background: var(--mm-surface-2); font-weight: var(--mm-fw-bold); }

/* 内容分页（wp_link_pages） */
.mm-page-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--mm-space-2);
  margin-top: var(--mm-space-5);
  padding-top: var(--mm-space-4);
  border-top: var(--mm-border) solid var(--mm-line);
}
.mm-page-links__label { color: var(--mm-ink-faint); font-size: var(--mm-fs-200); }
.mm-page-links a,
.mm-page-links > span:not(.mm-page-links__label) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 0.6rem;
  border-radius: var(--mm-radius-sm);
  background: var(--mm-surface-2);
  color: var(--mm-ink-soft);
  text-decoration: none;
  font-family: var(--mm-font-mono);
}
.mm-page-links a:hover { background: var(--mm-accent-soft); color: var(--mm-accent); }
.mm-page-links > span:not(.mm-page-links__label) { background: var(--mm-accent); color: var(--mm-accent-ink); }

/* ============ Hero：hero / video 通用背景 ============ */
.archive-hero.post-hero,
.video-hero {
  position: relative;
  overflow: hidden;
  background: var(--mm-surface-2);
  border-bottom: var(--mm-border) solid var(--mm-line);
}
.archive-hero.post-hero .archive-hero-bg,
.video-hero .archive-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.08);
  filter: saturate(0.9);
}
.archive-hero.post-hero .archive-hero-bg::after,
.video-hero .archive-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(var(--mm-bg-rgb), 0.4), rgba(var(--mm-bg-rgb), 0.9) 90%);
}
.archive-hero.post-hero .container,
.video-hero .container,
.video-hero .video-hero-container { position: relative; z-index: 2; }

/* hero 变体（居中标题） */
.archive-hero.post-hero.text-center .article-header { padding-block: clamp(1.5rem, 5vw, 3rem); }
.archive-hero.post-hero .post-title {
  font-family: var(--mm-font-display);
  font-size: var(--mm-fs-800);
  font-weight: var(--mm-fw-black);
  line-height: var(--mm-lh-tight);
  letter-spacing: -0.02em;
  color: var(--mm-ink);
  word-break: break-word;
}
.archive-hero.post-hero.text-center .article-meta { justify-content: center; }

/* ============ shop 盒面 Hero ============ */
.shop-hero .container { padding-block: clamp(1.5rem, 5vw, 3rem); }
.shop-hero .row { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: clamp(1rem, 3vw, 2.5rem); align-items: start; }
.shop-hero .col-lg-3, .shop-hero .col-lg-9 { max-width: none; width: auto; padding: 0; }
.shop-hero .img-box {
  position: relative;
  border-radius: var(--mm-radius-lg);
  overflow: hidden;
  background: var(--mm-surface-sunken);
  box-shadow: var(--mm-shadow-lg);
  aspect-ratio: 3 / 4;
}
.shop-hero .img-box img { width: 100%; height: 100%; object-fit: cover; }
.shop-hero .info-box { min-width: 0; }
.shop-hero .post-title {
  font-family: var(--mm-font-display);
  font-size: var(--mm-fs-700);
  font-weight: var(--mm-fw-black);
  line-height: var(--mm-lh-tight);
  color: var(--mm-ink);
  word-break: break-word;
}
@media (max-width: 767.98px) {
  .shop-hero .row { grid-template-columns: 1fr; }
  .shop-hero .img-box { aspect-ratio: 16 / 10; max-width: 320px; }
}

/* ============ 购买 / 下载面板（沿用内部功能类，重构视觉） ============ */
.ri-down-warp,
.mm-buy {
  margin-top: var(--mm-space-4);
  padding: var(--mm-space-4);
  background: var(--mm-surface);
  border: var(--mm-border) solid var(--mm-line);
  border-radius: var(--mm-radius-lg);
  box-shadow: var(--mm-shadow-sm);
}
.shop-hero .ri-down-warp { background: var(--mm-surface); }
.ri-down-warp .down-msg { display: none; }

/* rihide 真实下载业务首屏槽位（entry-shop）：正文 .ri-rihide 卡由 relocateRihide 移入。
   空槽（无 rihide 或 JS 未就绪）隐藏，防止出现空白/错位卡；移入后按实线首屏卡呈现，覆盖正文虚线态。 */
.mm-rihide-slot:empty { display: none; }
.shop-hero .mm-rihide-slot .ri-hide-warp {
  margin: 0;
  background: var(--mm-surface);
  border-style: solid;
  border-color: var(--mm-line);
  box-shadow: var(--mm-shadow-sm);
}
.buy-title {
  display: flex;
  align-items: center;
  gap: 0.4em;
  font-size: var(--mm-fs-500);
  font-weight: var(--mm-fw-bold);
  color: var(--mm-ink);
  margin-bottom: var(--mm-space-3);
}
.down-buy-warp .buy-title i { color: var(--mm-accent); }

/* 价格组 */
.buy-desc { margin-bottom: var(--mm-space-3); }
.prices-desc {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--mm-space-3);
  padding: var(--mm-space-3) var(--mm-space-4);
  background: var(--mm-surface-2);
  border-radius: var(--mm-radius-md);
}
.prices-default {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25em;
  color: var(--mm-accent);
  font-family: var(--mm-font-mono);
  font-weight: var(--mm-fw-black);
}
.prices-default span { font-size: var(--mm-fs-700); }
.prices-rate { text-align: end; }
.prices-rate > a {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  color: var(--mm-gold);
  text-decoration: none;
  font-size: var(--mm-fs-200);
  font-weight: var(--mm-fw-bold);
}
.prices-info { list-style: none; margin: var(--mm-space-2) 0 0; padding: 0; display: grid; gap: 0.2rem; }
.prices-info .price-item { color: var(--mm-ink-soft); font-size: var(--mm-fs-100); }
.prices-info .price-item.vip span, .prices-info .price-item.boosvip span { color: var(--mm-gold); font-family: var(--mm-font-mono); }

/* 购买 / 下载按钮 */
.buy-btns { display: grid; gap: var(--mm-space-2); margin-top: var(--mm-space-3); }
.down-buy-warp .btn,
.buy-btns .btn,
.buy-btns .login-btn,
.js-pay-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45em;
  min-height: 48px;
  padding: 0.6rem 1.5rem;
  border: none;
  border-radius: var(--mm-radius-pill);
  font-size: var(--mm-fs-400);
  font-weight: var(--mm-fw-bold);
  cursor: pointer;
  text-decoration: none;
  transition: filter var(--mm-dur-1) var(--mm-ease), transform var(--mm-dur-1) var(--mm-ease);
}
.js-pay-action,
.buy-btns .btn-danger { background: var(--mm-accent); color: var(--mm-accent-ink); box-shadow: var(--mm-shadow-accent); }
.js-pay-action:hover,
.buy-btns .btn-danger:hover { filter: brightness(1.05); transform: translateY(-1px); }
.buy-btns .btn-info,
.buy-btns .login-btn { background: var(--mm-ink); color: var(--mm-surface); }

/* 下载地址组（btn-group：地址 + 密码） */
.down-buy-warp .d-block,
.down-buy-warp .d-grid { display: grid !important; gap: var(--mm-space-2); margin-top: var(--mm-space-3); }
.btn-group {
  display: flex;
  gap: 2px;
  border-radius: var(--mm-radius-pill);
  overflow: hidden;
}
.btn-group .btn {
  min-height: 48px;
  border-radius: 0;
  background: var(--mm-success);
  color: #fff;
  box-shadow: none;
}
.btn-group .btn:first-child { flex: 1 1 auto; border-start-start-radius: var(--mm-radius-pill); border-end-start-radius: var(--mm-radius-pill); }
.btn-group .copy-pwd { flex: none; opacity: 1; background: var(--mm-success); filter: brightness(0.92); border-start-end-radius: var(--mm-radius-pill); border-end-end-radius: var(--mm-radius-pill); }
.btn-group .copy-pwd:hover { filter: brightness(0.82); }

/* 销量 / 附加信息 */
.buy-count {
  margin-top: var(--mm-space-3);
  color: var(--mm-ink-faint);
  font-size: var(--mm-fs-200);
  text-align: center;
}
.buy-count span { color: var(--mm-accent); font-family: var(--mm-font-mono); font-weight: var(--mm-fw-bold); }
.down-buy-info { margin-top: var(--mm-space-3); }
.down-buy-info .btn-secondary-soft,
.down-buy-info .btn { background: var(--mm-surface-2); color: var(--mm-ink); min-height: 44px; box-shadow: none; }
.down-buy-info .list-group { list-style: none; margin: var(--mm-space-3) 0 0; padding: 0; border-top: var(--mm-border) solid var(--mm-line); }
.down-buy-info .list-group-item {
  display: flex;
  justify-content: space-between;
  gap: var(--mm-space-3);
  padding: 0.5rem 0;
  border-bottom: var(--mm-border) solid var(--mm-line);
  background: transparent !important;
  color: var(--mm-ink-soft) !important;
  font-size: var(--mm-fs-200);
}

/* ============ 视频 Hero ============ */
.ri-video-warp { border-radius: var(--mm-radius-lg); overflow: hidden; background: #000; }
.ri-video-warp .video-js { width: 100%; }
.ri-video-view { position: relative; }
.ri-video-view .video-buy-warp {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--mm-space-3);
  padding: var(--mm-space-4);
  text-align: center;
  background: rgba(8, 7, 5, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
}
.ri-video-view .buy-title { color: #fff; justify-content: center; }
.ri-video-view .prices-info { justify-items: center; color: rgba(255, 255, 255, 0.85); }
.ri-video-list { padding: var(--mm-space-3); background: var(--mm-surface); border: var(--mm-border) solid var(--mm-line); border-radius: var(--mm-radius-lg); margin-top: var(--mm-space-2); }
.ri-video-list .video-title { font-weight: var(--mm-fw-bold); color: var(--mm-ink); }
.ri-video-list .title-count { color: var(--mm-ink-faint); font-size: var(--mm-fs-100); margin: 0.25rem 0 var(--mm-space-2); }
.video-nav { display: flex; flex-wrap: wrap; gap: var(--mm-space-2); }
.video-nav .switch-video {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: var(--mm-radius-sm);
  background: var(--mm-surface-2);
  color: var(--mm-ink-soft);
  text-decoration: none;
  font-family: var(--mm-font-mono);
  transition: all var(--mm-dur-1) var(--mm-ease);
}
.video-nav .switch-video:hover { color: var(--mm-ink); }
.video-nav .switch-video.active { background: var(--mm-accent); color: var(--mm-accent-ink); }
@media (min-width: 992px) {
  .video-hero .row { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: var(--mm-space-3); }
  .video-hero .col-lg-9, .video-hero .col-lg-3 { max-width: none; width: auto; }
}

/* 媒体预览（正文顶部） */
.archive-media-preview { position: relative; margin-bottom: var(--mm-space-4); border-radius: var(--mm-radius-lg); overflow: hidden; background: #000; }
.archive-media-preview .preview-text {
  position: absolute; top: var(--mm-space-2); inset-inline-start: var(--mm-space-2); z-index: 2;
  padding: 0.2em 0.7em; border-radius: var(--mm-radius-pill);
  background: rgba(8,7,5,0.6); color: #fff; font-size: var(--mm-fs-100); text-transform: capitalize;
}

/* ============ 标签 / 社交 / 版权 ============ */
.entry-tags { display: flex; flex-wrap: wrap; align-items: center; gap: var(--mm-space-2); margin-top: var(--mm-space-4); font-size: var(--mm-fs-200); }
.entry-tags > i { color: var(--mm-accent); }
.entry-tags a {
  padding: 0.25em 0.75em;
  border-radius: var(--mm-radius-pill);
  background: var(--mm-surface-2);
  color: var(--mm-ink-soft);
  text-decoration: none;
  transition: all var(--mm-dur-1) var(--mm-ease);
}
.entry-tags a:hover { background: var(--mm-accent-soft); color: var(--mm-accent); }

.entry-copyright {
  margin-top: var(--mm-space-4);
  padding: var(--mm-space-3) var(--mm-space-4);
  background: var(--mm-surface-2);
  border-radius: var(--mm-radius-md);
  color: var(--mm-ink-soft);
  font-size: var(--mm-fs-200);
  line-height: var(--mm-lh-snug);
}
.entry-copyright i { color: var(--mm-accent); }

.entry-social .row { display: flex; align-items: center; justify-content: space-between; gap: var(--mm-space-3); margin-top: var(--mm-space-4); }
.entry-social .col { flex: 1 1 auto; min-width: 0; }
.entry-social .col-auto { flex: none; display: flex; flex-wrap: wrap; gap: var(--mm-space-2); }
.entry-social .share-author { display: inline-flex; align-items: center; gap: 0.5em; color: var(--mm-ink); text-decoration: none; font-weight: var(--mm-fw-medium); }
.entry-social .share-author .avatar-img { width: 34px; height: 34px; }
.entry-social .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  min-height: 40px;
  padding: 0.4rem 1rem;
  border-radius: var(--mm-radius-pill);
  border: var(--mm-border) solid var(--mm-line);
  background: var(--mm-surface);
  color: var(--mm-ink-soft);
  text-decoration: none;
  font-size: var(--mm-fs-200);
  cursor: pointer;
  transition: all var(--mm-dur-1) var(--mm-ease);
}
.entry-social .post-share-btn:hover { color: var(--mm-info); border-color: var(--mm-info); }
.entry-social .post-fav-btn:hover { color: var(--mm-success); border-color: var(--mm-success); }
.entry-social .post-like-btn:hover,
.entry-social .post-like-btn.active { color: var(--mm-accent); border-color: var(--mm-accent); }

/* ============ 上下篇 ============ */
.entry-navigation { margin-top: var(--mm-space-4); }
.entry-navigation .row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--mm-space-3); }
.entry-navigation .col-lg-6, .entry-navigation .col-12 { max-width: none; width: auto; }
.entry-page-prev, .entry-page-next {
  display: flex;
  align-items: center;
  gap: var(--mm-space-3);
  height: 100%;
  padding: var(--mm-space-3) var(--mm-space-4);
  background: var(--mm-surface);
  border: var(--mm-border) solid var(--mm-line);
  border-radius: var(--mm-radius-md);
  text-decoration: none;
  transition: all var(--mm-dur-1) var(--mm-ease);
}
.entry-page-prev:hover, .entry-page-next:hover { border-color: var(--mm-accent); box-shadow: var(--mm-shadow-sm); }
.entry-page-next { justify-content: flex-end; text-align: end; }
.entry-page-icon { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--mm-surface-2); color: var(--mm-accent); }
.entry-page-info { min-width: 0; }
.entry-page-info .rnav { color: var(--mm-ink-faint); font-size: var(--mm-fs-100); }
.entry-page-info .title { color: var(--mm-ink); font-weight: var(--mm-fw-medium); font-size: var(--mm-fs-200); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 575.98px) { .entry-navigation .row { grid-template-columns: 1fr; } }

/* ============ 相关文章 ============ */
.related-posts { margin-top: var(--mm-space-6); }
.related-posts-title {
  margin: 0 0 var(--mm-space-4);
  font-family: var(--mm-font-display);
  font-size: var(--mm-fs-600);
  font-weight: var(--mm-fw-black);
  color: var(--mm-ink);
  display: flex;
  align-items: center;
  gap: 0.4em;
}
.related-posts-title i { color: var(--mm-accent); }

/* ============ 评论（.entry-comments，含 ZB_Walker_Comment 输出与评论翻页） ============ */
.entry-comments {
  margin-top: var(--mm-space-6);
  background: var(--mm-surface);
  border: var(--mm-border) solid var(--mm-line);
  border-radius: var(--mm-radius-lg);
  padding: clamp(1rem, 3vw, 2rem);
}
.comments-title {
  margin: 0 0 var(--mm-space-4);
  font-family: var(--mm-font-display);
  font-size: var(--mm-fs-500);
  font-weight: var(--mm-fw-black);
  color: var(--mm-ink);
  display: flex;
  align-items: center;
  gap: 0.4em;
}
.comments-title i { color: var(--mm-accent); }
.entry-comments .comment-form { display: grid; gap: var(--mm-space-3); }
.entry-comments input[type="text"],
.entry-comments input[type="email"],
.entry-comments input[type="url"],
.entry-comments textarea {
  width: 100%;
  padding: 0.65rem 1rem;
  background: var(--mm-surface-2);
  border: var(--mm-border) solid var(--mm-line);
  border-radius: var(--mm-radius-md);
  color: var(--mm-ink);
  outline: none;
  font-family: inherit;
}
.entry-comments input:focus,
.entry-comments textarea:focus { border-color: var(--mm-accent); box-shadow: 0 0 0 3px var(--mm-accent-soft); }
.entry-comments .form-submit .submit,
.entry-comments input.submit,
.entry-comments .login-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  min-height: 44px;
  padding: 0.5rem 1.75rem;
  border: none;
  border-radius: var(--mm-radius-pill);
  background: var(--mm-accent);
  color: var(--mm-accent-ink);
  font-weight: var(--mm-fw-bold);
  text-decoration: none;
  cursor: pointer;
}
.entry-comments .login-btn { background: var(--mm-ink); color: var(--mm-surface); }
.comments-list { list-style: none; margin: var(--mm-space-4) 0 0; padding: 0; }
.comments-list ul.children { list-style: none; margin: 0; padding-inline-start: var(--mm-space-4); }
.comments-list li.comment { padding: 0; }
.comments-list .comment-body { padding: var(--mm-space-3) 0; border-bottom: var(--mm-border) solid var(--mm-line); }
.comments-list .comment-author { display: flex; align-items: center; gap: var(--mm-space-2); font-weight: var(--mm-fw-medium); color: var(--mm-ink); }
.comments-list .avatar { border-radius: 50%; }
.comments-list .comment-meta { color: var(--mm-ink-faint); font-size: var(--mm-fs-100); }
.comments-list .comment-content { margin-top: var(--mm-space-2); color: var(--mm-ink-soft); font-size: var(--mm-fs-300); line-height: var(--mm-lh-body); }
.comments-nav { margin-top: var(--mm-space-4); display: flex; flex-direction: column; align-items: center; gap: var(--mm-space-3); }
.comments-pagination { display: flex; flex-wrap: wrap; gap: var(--mm-space-1); justify-content: center; }
.comments-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 0.6rem;
  border-radius: var(--mm-radius-sm);
  background: var(--mm-surface);
  border: var(--mm-border) solid var(--mm-line);
  color: var(--mm-ink-soft);
  text-decoration: none;
  font-family: var(--mm-font-mono);
}
.comments-pagination .page-numbers.current { background: var(--mm-accent); color: var(--mm-accent-ink); border-color: var(--mm-accent); }

/* ============ 侧栏（single-sidebar 小工具） ============ */
.mm-single__side .widget {
  background: var(--mm-surface);
  border: var(--mm-border) solid var(--mm-line);
  border-radius: var(--mm-radius-lg);
  padding: var(--mm-space-4);
}
.mm-single__side .widget-title {
  margin: 0 0 var(--mm-space-3);
  font-size: var(--mm-fs-400);
  font-weight: var(--mm-fw-bold);
  color: var(--mm-ink);
  display: flex;
  align-items: center;
  gap: 0.4em;
}

/* ============ 移动端安全区吸底 CTA ============ */
.mm-cta-bar { display: none; }
.mm-anchor { display: block; scroll-margin-top: 84px; }
@media (max-width: 991.98px) {
  .mm-cta-bar {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 1035;
    display: flex;
    align-items: center;
    gap: var(--mm-space-3);
    padding: var(--mm-space-2) var(--mm-space-3);
    padding-bottom: calc(var(--mm-space-2) + env(safe-area-inset-bottom, 0px));
    background: var(--mm-header-bg);
    -webkit-backdrop-filter: var(--mm-header-blur);
    backdrop-filter: var(--mm-header-blur);
    border-top: var(--mm-border) solid var(--mm-line);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.12);
  }
  .mm-cta-bar__info { flex: none; min-width: 0; line-height: 1.2; }
  .mm-cta-bar__price { display: inline-flex; align-items: baseline; gap: 0.15em; color: var(--mm-accent); font-family: var(--mm-font-mono); font-weight: var(--mm-fw-black); font-size: var(--mm-fs-600); }
  .mm-cta-bar__price em { font-style: normal; font-size: var(--mm-fs-200); color: var(--mm-ink-soft); }
  .mm-cta-bar__state { display: inline-flex; align-items: center; gap: 0.35em; color: var(--mm-success); font-weight: var(--mm-fw-bold); }
  .mm-cta-bar__action { flex: 1 1 auto; }
  .mm-cta-bar__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4em;
    width: 100%;
    min-height: 48px;
    padding: 0 1.25rem;
    border: none;
    border-radius: var(--mm-radius-pill);
    background: var(--mm-accent);
    color: var(--mm-accent-ink);
    font-size: var(--mm-fs-400);
    font-weight: var(--mm-fw-bold);
    text-decoration: none;
    cursor: pointer;
  }
  .mm-cta-bar__btn.is-go { background: var(--mm-success); color: #fff; }
  .mm-cta-bar__btn.is-login { background: var(--mm-ink); color: var(--mm-surface); }
  /* 有吸底 CTA 时，移动底部导航让位（现代浏览器 :has） */
  body:has(.mm-cta-bar) .m-navbar { display: none; }
  body:has(.mm-cta-bar) .back-top.mm-backtop { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  .mm-single { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
}

/* ============ 缺元数据 / 空态收口 ============ */
.mm-single__meta:empty, .article-meta:empty { display: none; }

/* ============ 正文短代码 + 隐藏内容（登录/评论/权限可见） ============ */
.ri-hide-warp {
  margin: var(--mm-space-4) 0;
  padding: var(--mm-space-4);
  background: var(--mm-surface-2);
  border: var(--mm-border) dashed var(--mm-line-strong);
  border-radius: var(--mm-radius-md);
}
.ri-hide-warp .hide-msg { display: inline-flex; align-items: center; gap: 0.35em; font-weight: var(--mm-fw-bold); color: var(--mm-ink); margin-bottom: var(--mm-space-2); }
.ri-hide-warp .hide-buy-warp { display: grid; gap: var(--mm-space-2); }
.rihide-preview-desc { color: var(--mm-ink-faint); font-size: var(--mm-fs-100); }

.mm-accordion { margin: var(--mm-space-3) 0; border: var(--mm-border) solid var(--mm-line); border-radius: var(--mm-radius-md); overflow: hidden; background: var(--mm-surface); }
.mm-accordion > summary { list-style: none; cursor: pointer; padding: var(--mm-space-3) var(--mm-space-4); font-weight: var(--mm-fw-bold); color: var(--mm-ink); display: flex; align-items: center; justify-content: space-between; gap: var(--mm-space-2); background: var(--mm-surface-2); }
.mm-accordion > summary::-webkit-details-marker { display: none; }
.mm-accordion > summary::after { content: "\f078"; font-family: "Font Awesome 5 Free"; font-weight: 900; color: var(--mm-accent); transition: transform var(--mm-dur-2) var(--mm-ease); }
.mm-accordion[open] > summary::after { transform: rotate(180deg); }
.mm-accordion__body { padding: var(--mm-space-4); color: var(--mm-ink-soft); line-height: var(--mm-lh-body); }

.mm-alert { margin: var(--mm-space-3) 0; padding: var(--mm-space-3) var(--mm-space-4); border-radius: var(--mm-radius-md); border-inline-start: 3px solid var(--mm-accent); background: var(--mm-surface-2); color: var(--mm-ink); }
.mm-alert--success { border-color: var(--mm-success); }
.mm-alert--danger { border-color: var(--mm-danger); }
.mm-alert--warning { border-color: var(--mm-gold); }
.mm-alert--info { border-color: var(--mm-info); }
.mm-alert--secondary { border-color: var(--mm-ink-faint); }

.mm-sc-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.6rem 1.5rem;
  margin: 0.35rem 0.5rem 0.35rem 0;
  border-radius: var(--mm-radius-sm);
  background: var(--mm-accent);
  color: var(--mm-accent-ink);
  text-decoration: none;
  font-weight: var(--mm-fw-bold);
  border: var(--mm-border) solid transparent;
  transition: filter var(--mm-dur-1) var(--mm-ease);
}
.mm-sc-btn:hover { filter: brightness(1.06); }
.mm-sc-btn--rounded { border-radius: var(--mm-radius-pill); }
.mm-sc-btn--outline { background: transparent; border-color: var(--mm-accent); color: var(--mm-accent); }
.mm-sc-btn--dark { background: var(--mm-ink); color: var(--mm-surface); }
.mm-sc-btn--success { background: var(--mm-success); color: #fff; }
.mm-sc-btn--danger { background: var(--mm-danger); color: #fff; }
.mm-sc-btn--info { background: var(--mm-info); color: #fff; }
.mm-sc-btn--warning { background: var(--mm-gold); color: #2a1e05; }
.mm-sc-btn--secondary { background: var(--mm-surface-2); color: var(--mm-ink); }
.mm-sc-btn--light { background: var(--mm-surface-2); color: var(--mm-ink); }

.ri-video-shortcode { margin: var(--mm-space-4) 0; border-radius: var(--mm-radius-md); overflow: hidden; background: #000; }
.ri-video-shortcode .video-js { width: 100%; }

.mm-vip-cards { margin-block: var(--mm-space-3); }

/* ============================================================
 * S17 · Meimo 品牌购买/下载 CTA 换肤层（CSS-only）
 * 让顶部购买/下载面板更醒目：品红描边 + 内发光 + 顶部品红晕染。
 * mascot-download 作角落装饰（纯 CSS 背景，无需改 PHP），低透明度、
 * pointer-events:none、内容抬到装饰上层；移动端缩小。静态无动画。
 * ============================================================ */
.ri-down-warp,
.mm-buy,
.ri-hide-warp.ri-rihide,
.ri-hide-warp.rihide-relocated {
  position: relative;
  overflow: hidden;
  border-color: rgba(var(--mm-accent-rgb), 0.42);
  box-shadow: var(--mm-shadow-md), inset 0 0 0 1px rgba(var(--mm-accent-rgb), 0.12);
  background-image: linear-gradient(180deg, rgba(var(--mm-accent-rgb), 0.07), transparent 140px);
}
.ri-down-warp::after,
.mm-buy::after,
.ri-hide-warp.ri-rihide::after,
.ri-hide-warp.rihide-relocated::after {
  content: "";
  position: absolute;
  right: -12px;
  bottom: -12px;
  z-index: 0;
  width: 150px;
  height: 150px;
  background: url(../images/meimo-brand/mascot-download-transparent-v1.webp) no-repeat right bottom;
  background-size: contain;
  opacity: 0.16;
  pointer-events: none;
}
.ri-down-warp > *,
.mm-buy > *,
.ri-hide-warp.ri-rihide > *,
.ri-hide-warp.rihide-relocated > * { position: relative; z-index: 1; }
@media (max-width: 575.98px) {
  .ri-down-warp::after,
  .mm-buy::after,
  .ri-hide-warp.ri-rihide::after,
  .ri-hide-warp.rihide-relocated::after { width: 96px; height: 96px; opacity: 0.12; }
}

/* ============ 减弱动效 ============ */
@media (prefers-reduced-motion: reduce) {
  .archive-hero.post-hero .archive-hero-bg,
  .video-hero .archive-hero-bg { transform: none; }
  .js-pay-action:hover,
  .buy-btns .btn-danger:hover { transform: none; }
  .mm-accordion[open] > summary::after { transition: none; }
}

/* ============ S23 · 评论区暗夜魅魔社换肤（仅展示层） ============ */
.mm-ui .entry-comments,
.mm-ui .mm-comments {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 79, 195, 0.24);
  border-radius: clamp(18px, 2vw, 26px);
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 79, 195, 0.16), transparent 34%),
    radial-gradient(circle at 92% 12%, rgba(155, 69, 255, 0.16), transparent 38%),
    linear-gradient(150deg, rgba(27, 11, 45, 0.88), rgba(10, 5, 22, 0.9));
  box-shadow: 0 22px 58px rgba(6, 2, 16, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.84);
}
.mm-ui .mm-comments {
  margin-top: var(--mm-space-6);
  padding: clamp(18px, 3vw, 30px);
}
.mm-ui .comments-title {
  color: #fff;
  text-shadow: 0 0 20px rgba(255, 79, 195, 0.25);
}
.mm-ui .comments-title i {
  color: #ff8bdd;
  filter: drop-shadow(0 0 10px rgba(255, 79, 195, 0.55));
}
.mm-ui .comment-reply-title {
  margin: 0 0 12px;
  color: #ffd7f2;
  font-size: var(--mm-fs-300);
  font-weight: 800;
}
.mm-ui .comment-form {
  padding: clamp(14px, 2vw, 20px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
}
.mm-ui .comment-form-comment,
.mm-ui .comment-form-author,
.mm-ui .comment-form-email,
.mm-ui .comment-form-url {
  margin: 0;
}
.mm-ui .entry-comments input[type="text"],
.mm-ui .entry-comments input[type="email"],
.mm-ui .entry-comments input[type="url"],
.mm-ui .entry-comments textarea,
.mm-ui .mm-comments input[type="text"],
.mm-ui .mm-comments input[type="email"],
.mm-ui .mm-comments input[type="url"],
.mm-ui .mm-comments textarea {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(8, 3, 19, 0.72);
  color: #fff;
}
.mm-ui .entry-comments input::placeholder,
.mm-ui .entry-comments textarea::placeholder,
.mm-ui .mm-comments input::placeholder,
.mm-ui .mm-comments textarea::placeholder {
  color: rgba(255, 255, 255, 0.42);
}
.mm-ui .entry-comments input:focus,
.mm-ui .entry-comments textarea:focus,
.mm-ui .mm-comments input:focus,
.mm-ui .mm-comments textarea:focus {
  border-color: rgba(255, 79, 195, 0.72);
  box-shadow: 0 0 0 3px rgba(255, 79, 195, 0.16), 0 0 26px rgba(255, 79, 195, 0.14);
}
.mm-ui .entry-comments .form-submit .submit,
.mm-ui .entry-comments input.submit,
.mm-ui .entry-comments .login-btn,
.mm-ui .mm-comments .form-submit .submit,
.mm-ui .mm-comments input.submit,
.mm-ui .mm-comments .login-btn {
  background: linear-gradient(135deg, #ff4fc3, #9b45ff);
  color: #fff;
  box-shadow: 0 12px 30px rgba(255, 79, 195, 0.22);
}
.mm-ui .entry-comments .form-submit .submit:hover,
.mm-ui .entry-comments input.submit:hover,
.mm-ui .entry-comments .login-btn:hover,
.mm-ui .mm-comments .form-submit .submit:hover,
.mm-ui .mm-comments input.submit:hover,
.mm-ui .mm-comments .login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 38px rgba(255, 79, 195, 0.3);
}
.mm-ui .comments-list {
  display: grid;
  gap: 12px;
}
.mm-ui .comments-list li.comment {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.042);
}
.mm-ui .comments-list .comment-inner {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
}
.mm-ui .comments-list .comment-body {
  min-width: 0;
  padding: 0;
  border-bottom: 0;
}
.mm-ui .comments-list .comment-author {
  color: #fff;
}
.mm-ui .comments-list .avatar {
  border: 2px solid rgba(255, 79, 195, 0.38);
  box-shadow: 0 0 22px rgba(255, 79, 195, 0.22);
}
.mm-ui .comments-list .comment-content {
  color: rgba(255, 255, 255, 0.74);
}
.mm-ui .comments-list .comment-meta,
.mm-ui .comments-list .comment-meta a,
.mm-ui .comments-list .comment-time {
  color: rgba(255, 255, 255, 0.5);
}
.mm-ui .comments-list .comment-reply-link {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  color: #ffd7f2;
  font-weight: 800;
  text-decoration: none;
}
.mm-ui .comments-pagination .page-numbers {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.055);
  color: rgba(255, 255, 255, 0.72);
}
.mm-ui .comments-pagination .page-numbers.current,
.mm-ui .comments-pagination .page-numbers:hover {
  border-color: transparent;
  background: linear-gradient(135deg, #ff4fc3, #9b45ff);
  color: #fff;
}
@media (max-width: 575.98px) {
  .mm-ui .comments-list .comment-inner {
    grid-template-columns: 38px minmax(0, 1fr);
    padding: 12px;
  }
  .mm-ui .comments-list ul.children {
    padding-inline-start: 14px;
  }
}
