/* 底栏：图标盒不能吃到 .m2m-tab span {width:100%}，否则图标靠左、文字居中。 */
.m2m-tabbar{
  display:flex;
  flex-direction:row;
  flex-wrap:nowrap !important;
  align-items:stretch;
  justify-content:space-around;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
}
.m2m-tabbar::-webkit-scrollbar{display:none;}
.m2m-tabbar > .m2m-tab{
  flex:1 1 0;
  min-width:0;
  display:flex !important;
  flex-direction:column;
  align-items:center;
  justify-content:center;
}
.m2m-tab > .m2m-tab-ico{
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  width:28px !important;
  height:28px !important;
  max-width:28px !important;
  flex:0 0 28px !important;
  overflow:visible;
  text-align:center;
}
.m2m-tab > .m2m-tab-lab{
  display:block;
  max-width:100%;
  width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap !important;
  text-align:center;
}
@media (max-width:390px){
  .m2m-tabbar{
    overflow-x:auto !important;
    overflow-y:hidden !important;
  }
  a.m2m-tab,
  .m2m-tab{
    flex:0 0 auto !important;
    min-width:56px;
    padding:4px 8px;
  }
  .m2m-tab > .m2m-tab-lab{
    max-width:64px;
    font-size:9px;
  }
}
body.pathwalker .m2m-tabbar,
body.pw-ink .m2m-tabbar{padding-bottom:env(safe-area-inset-bottom,0);}

/* 手机 / html.m2m-phone：子站首页与内容页同一单列居中，禁止宽屏两栏在手机类名下左偏 */
@media (max-width:767.98px){
  .container,.container-main,.subsite-main,.np-wrap,.container-read,.layout-2col,.layout-3col,.article-content,.thread-content,.comm-rev-page{
    width:100% !important;
    max-width:100% !important;
    margin-left:auto !important;
    margin-right:auto !important;
    float:none !important;
    box-sizing:border-box;
  }
}
html.m2m-phone .container,
html.m2m-phone .container-main,
html.m2m-phone .subsite-main,
html.m2m-phone .np-wrap,
html.m2m-phone .container-read,
html.m2m-phone .layout-2col,
html.m2m-phone .layout-3col,
html.m2m-phone .article-content,
html.m2m-phone .thread-content,
html.m2m-phone .comm-rev-page{
  width:100% !important;
  max-width:100% !important;
  margin-left:auto !important;
  margin-right:auto !important;
  float:none !important;
  box-sizing:border-box;
}
html.m2m-phone .layout-2col,
html.m2m-phone .layout-3col,
html.m2m-phone .comm-rev-page{
  grid-template-columns:minmax(0,1fr) !important;
}
html.m2m-phone .comm-rev-side,
html.m2m-phone .layout-2col > aside,
html.m2m-phone .layout-3col > aside{
  display:none !important;
}


/* 20261029m: 五格底栏完整可见；禁止 overflow 裁切图标/字 */
.m2m-tabbar{
  overflow: visible !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
  max-width: 100vw !important;
  height: calc(56px + env(safe-area-inset-bottom, 0px)) !important;
  min-height: calc(56px + env(safe-area-inset-bottom, 0px)) !important;
  box-sizing: border-box !important;
  padding-top: 2px !important;
  padding-bottom: env(safe-area-inset-bottom, 0px) !important;
}
.m2m-tabbar > .m2m-tab,
a.m2m-tab,
.m2m-tab{
  flex: 1 1 0 !important;
  min-width: 0 !important;
  max-width: none !important;
  overflow: visible !important;
}
.m2m-tab > .m2m-tab-ico{
  width: 22px !important;
  height: 22px !important;
  max-width: 22px !important;
  flex: 0 0 22px !important;
  overflow: visible !important;
}
.m2m-tab > .m2m-tab-lab{
  font-size: 9px !important;
  line-height: 1.1 !important;
  max-width: 100% !important;
}
@media (max-width:390px){
  .m2m-tabbar{
    overflow: visible !important;
  }
  a.m2m-tab,
  .m2m-tab{
    flex: 1 1 0 !important;
    min-width: 0 !important;
    padding: 2px 1px !important;
  }
  .m2m-tab > .m2m-tab-lab{
    max-width: 100% !important;
    font-size: 8.5px !important;
  }
}

/* 2026-11-05：目标页面不存在时的运行时灰显（无 href，不可点）。
   同一套判断见 m2m_target_available()；只降透明度与指针，不新增布局规则。 */
.dropdown-item.m2m-nav-off,
.nav-link.m2m-nav-off,
.m2m-mnav-item.m2m-nav-off,
.m2m-mnav-more-link.m2m-nav-off,
.topbar-link.m2m-nav-off{
  opacity: .55;
  cursor: default;
  pointer-events: none;
}
.hp-entry.m2m-nav-off,
.hp-focus-card.m2m-nav-off,
.hp-hero-art.m2m-nav-off,
.hp-pw-banner.m2m-nav-off,
.hp-channel.m2m-nav-off,
.hp-more.m2m-nav-off,
.hp-battle-more.m2m-nav-off,
.hp-empty.m2m-nav-off,
.hp-empty-sm.m2m-nav-off,
.m2m-tab.m2m-nav-off,
.footer-meta-link.m2m-nav-off{
  opacity: .55;
  cursor: default;
  pointer-events: none;
  transform: none !important;
}
