/* 2.0 文档层 + #__nuxt 下页面根 `.mobile`（无 1.0 壳） */
html.hk-m-route {
  height: 100%;
}

/* 全站隐藏滚动条（覆盖 entry body,html 的 scrollbar-gutter: stable） */
html.hk-m-route,
html.hk-m-route body {
  scrollbar-width: none;
  -ms-overflow-style: none;
  scrollbar-gutter: auto;
}

html.hk-m-route::-webkit-scrollbar,
html.hk-m-route body::-webkit-scrollbar {
  display: none;
}

html.hk-m-route * {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html.hk-m-route *::-webkit-scrollbar {
  display: none;
}

/* 窄屏 rem 根。PC 行内 style 只保留 font-size: 68px */
@media (max-width: 767px) {
  html.hk-m-route {
    font-size: calc(min(100vw, 750px) / 7.5) !important;
  }

  .floating-qrcode {
    display: none !important;
  }
}

/* 窄屏：document 不纵向滚动，视口高度锁在 --vh / 100dvh，内容在 .n-config-provider 内滚。
   路由回顶由 scroll-page-top 插件写 scrollTop，不依赖 body 滚动。 */
@media (max-width: 767px) {
  html.hk-m-route {
    height: 100%;
    height: 100dvh;
    height: calc(var(--vh, 1vh) * 100);
    overflow: hidden;
    overscroll-behavior: none;
    overscroll-behavior-x: none;
    overflow-x: hidden;
  }

  html.hk-m-route body,
  html.hk-m-route body.body-black {
    height: 100%;
    min-height: 0;
    overflow: hidden;
    overscroll-behavior: none;
    overscroll-behavior-x: none;
  }

  html.hk-m-route #__nuxt {
    height: 100%;
    min-height: 0;
  }

  html.hk-m-route .mobile {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  html.hk-m-route .mobile > .n-config-provider {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
  }
}

html.hk-m-route body,
html.hk-m-route body.body-black {
  min-height: 100%;
  background: #000;
  font-size: 16px;
}

#__nuxt {
  min-height: 100%;
}

@media (min-width: 768px) {
  html.hk-m-route .mobile,
  html.hk-m-route .pc {
    min-height: 100%;
  }

  .link_item.m-nav-mobile,
  .m-tabbar,
  .mb-footer-app-banner {
    display: none !important;
  }
}

.mb-header-wrapper .nav .m-nav-scroll {
  position: relative;
  flex: 1;
  min-width: 0;
  align-self: stretch;
}

.mb-header-wrapper .nav .m-nav-scroll__track {
  padding-right: 15px;
  display: flex;
  align-items: center;
  height: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(
    to right,
    #000 calc(100% - 0.72rem),
    transparent
  );
  mask-image: linear-gradient(to right, #000 calc(100% - 0.72rem), transparent);
}

.mb-header-wrapper .nav .m-nav-scroll__track::-webkit-scrollbar {
  display: none;
}

.mb-header-wrapper .nav .m-nav-scroll::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  width: 0.72rem;
  pointer-events: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000);
  mask-image: linear-gradient(90deg, transparent, #000);
}

.mb-header-wrapper .nav .m-nav-grid {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  flex: none;
  width: auto;
  height: auto;
  aspect-ratio: 1;
  box-sizing: border-box;
  margin: 0 0 0 0.12rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #1c1c1f;
  color: #fff;
  cursor: pointer;
}

.mb-header-wrapper .nav .m-nav-grid svg {
  width: 0.28rem;
  height: 0.28rem;
}

@media (max-width: 767px) {
  .mb-header-wrapper .nav {
    overflow: hidden;
  }

  .mb-header-wrapper .nav .link_item[data-v-da0182b7] {
    flex: none;
    margin-right: 0.32rem;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    cursor: pointer;
  }
}

/* 轮播横向滑动手势不与纵向滚动手势互抢 */
html.hk-m-route .carousel {
  touch-action: pan-y pinch-zoom;
}

/* 顶栏滚动毛玻璃（兜底：不依赖 chunk 内 CSS 变量选择器） */
html.hk-m-route
  .mb-header-wrapper.home-glass-header.is-m-header-scrolled
  > .home-header-banner-clip
  > .home-header-backdrop.is-active {
  opacity: 0;
}

html.hk-m-route
  .mb-header-wrapper.home-glass-header.is-m-header-scrolled::before {
  opacity: 1;
}

html.hk-m-route
  .mb-header-wrapper.home-glass-header:not(.is-m-header-scrolled)
  > .home-header-banner-clip
  > .home-header-backdrop.is-active {
  opacity: 0.95;
}

html.hk-m-route
  .mb-header-wrapper.home-glass-header:not(.is-m-header-scrolled)::before {
  opacity: 0;
}

.mb-header-wrapper .header .right .m-sign-entry {
  display: inline-flex;
  align-items: center;
  gap: 0.04rem;
  position: relative;
  /* margin-left: 0.16rem; */
  color: #f5c518;
  font-size: 0.24rem;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
}

.mb-header-wrapper .header .right .m-sign-entry__dot {
  position: absolute;
  top: -1px;
  right: -2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff3b30;
  box-shadow: 0 0 0 1px #000;
}

.mb-header-wrapper .header .right .m-sign-entry svg {
  width: 26px;
  height: 26px;
  flex: none;
}

@media (max-width: 767px) {
  html.hk-m-route .mb-header-wrapper .nav .link_item[data-v-da0182b7] {
    margin-right: 0.16rem;
    padding: 0.08rem 0.2rem;
    border-radius: 999px;
    background: #1c1c1f;
    color: rgba(255, 255, 255, 0.72);
    opacity: 1;
    font-size: 0.26rem;
    line-height: 1.2;
  }

  html.hk-m-route .mb-header-wrapper .nav .link_item.active[data-v-da0182b7] {
    background: #ff2d6a;
    color: #fff;
    opacity: 1;
  }

  html.hk-m-route
    .mb-header-wrapper
    .nav
    .link_item.active[data-v-da0182b7]:after {
    display: none;
  }

  html.hk-m-route .mobile.has-m-tabbar {
    padding-bottom: calc(1.28rem + env(safe-area-inset-bottom));
  }
}

.m-tabbar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  display: flex;
  box-sizing: border-box;
  height: calc(1.16rem + env(safe-area-inset-bottom));
  padding: 0.08rem 0.04rem env(safe-area-inset-bottom);
  overflow: hidden;
  background: #0a0a0a;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.m-tabbar__item {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.04rem;
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.42);
  text-decoration: none;
}

.m-tabbar__item.is-active {
  color: #ff2d6a;
}

.m-tabbar__icon {
  position: relative;
  display: flex;
  width: 0.44rem;
  height: 0.44rem;
  flex: none;
}

.m-tabbar__icon > svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.m-tabbar__icon .m-bunny-mark {
  fill: currentColor;
  stroke: none;
}

.m-tabbar__dot {
  position: absolute;
  top: 0;
  right: -0.02rem;
  width: 0.14rem;
  height: 0.14rem;
  border-radius: 50%;
  background: #ff2d6a;
  box-shadow: 0 0 0 1.5px #0a0a0a;
}

.m-tabbar__label {
  display: -webkit-box;
  max-width: 100%;
  padding: 0 0.02rem;
  overflow: hidden;
  font-size: 0.2rem;
  line-height: 1.15;
  text-align: center;
  word-break: break-word;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* 手机横屏仍走竖屏壳。播放页不加这个 class，作品方向旋转留在播放器自己。 */
html.hk-m-route.hk-orient-lock {
  font-size: calc(min(100vw, 100vh, 750px) / 7.5) !important;
  background: #000;
}

html.hk-m-route.hk-orient-lock .mobile {
  width: min(100vw, 100vh) !important;
  max-width: min(100vw, 100vh) !important;
  margin-right: auto !important;
  margin-left: auto !important;
}

html.hk-m-route.hk-orient-lock .m-tabbar,
html.hk-m-route.hk-orient-lock .mb-footer-app-banner {
  width: min(100vw, 100vh);
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}

html.hk-m-route.hk-orient-lock .m-home-pc,
html.hk-m-route.hk-orient-lock .m-search-pc,
html.hk-m-route.hk-orient-lock .m-video-pc,
html.hk-m-route.hk-orient-lock .m-dramas-pc,
html.hk-m-route.hk-orient-lock .m-rankings-pc,
html.hk-m-route.hk-orient-lock .m-genre-pc,
html.hk-m-route.hk-orient-lock .m-record-pc,
html.hk-m-route.hk-orient-lock .m-topup-pc,
html.hk-m-route.hk-orient-lock .m-faq-pc,
html.hk-m-route.hk-orient-lock .m-task-pc,
html.hk-m-route.hk-orient-lock .m-wallet-pc,
html.hk-m-route.hk-orient-lock .m-darkweb-pc,
html.hk-m-route.hk-orient-lock .m-darkweb-hero,
html.hk-m-route.hk-orient-lock .floating-qrcode {
  display: none !important;
}

html.hk-m-route.hk-orient-lock .m-home-mb,
html.hk-m-route.hk-orient-lock .m-search-mb,
html.hk-m-route.hk-orient-lock .m-video-mb,
html.hk-m-route.hk-orient-lock .m-dramas-mb,
html.hk-m-route.hk-orient-lock .m-rankings-mb,
html.hk-m-route.hk-orient-lock .m-genre-mb,
html.hk-m-route.hk-orient-lock .m-record-mb,
html.hk-m-route.hk-orient-lock .m-topup-mb,
html.hk-m-route.hk-orient-lock .m-faq-mb,
html.hk-m-route.hk-orient-lock .m-task-mb,
html.hk-m-route.hk-orient-lock .m-wallet-mb,
html.hk-m-route.hk-orient-lock .m-darkweb-mb,
html.hk-m-route.hk-orient-lock .m-darkweb-poster,
html.hk-m-route.hk-orient-lock .mb-footer-app-banner,
html.hk-m-route.hk-orient-lock .link_item.m-nav-mobile {
  display: block !important;
}

html.hk-m-route.hk-orient-lock .m-tabbar {
  display: flex !important;
}
