/* V6-43-T mobile posts only
   手机端只展示帖子列表。
   桌面端不生效。
*/

@media(max-width:768px){

  html,
  body{
    width:100%!important;
    max-width:100%!important;
    overflow-x:hidden!important;
    background:#f8fafc!important;
  }

  body{
    margin:0!important;
    padding:0!important;
  }

  /* 手机端顶部保留极简品牌栏 */
  .home-top-v629a{
    width:calc(100% - 24px)!important;
    max-width:none!important;
    height:auto!important;
    min-height:0!important;
    margin:10px 12px 0!important;
    padding:10px 12px!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    gap:0!important;
    overflow:hidden!important;
    position:relative!important;
    z-index:30!important;
    border-radius:20px!important;
    background:rgba(255,255,255,.98)!important;
    border:1px solid rgba(15,23,42,.08)!important;
    box-shadow:0 8px 22px rgba(15,23,42,.07)!important;
  }

  /* 隐藏原导航直接子元素，避免露出按钮 */
  .home-top-v629a > *{
    display:none!important;
  }

  /* 只显示手机重建的品牌行，不显示按钮行 */
  .home-top-v629a > .mobile-brand-v643s{
    display:flex!important;
  }

  .home-top-v629a > .mobile-actions-v643s{
    display:none!important;
  }

  .mobile-brand-v643s{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    align-items:center!important;
    gap:10px!important;
    margin:0!important;
    padding:0!important;
  }

  .mobile-brand-icon-v643s{
    width:42px!important;
    height:42px!important;
    min-width:42px!important;
    border-radius:14px!important;
    background:url('/assets/forum-logo-premium-v642p.svg') center center / cover no-repeat!important;
    box-shadow:0 8px 18px rgba(37,99,235,.15)!important;
    border:1px solid rgba(255,255,255,.72)!important;
  }

  .mobile-brand-text-v643s{
    min-width:0!important;
    flex:1 1 auto!important;
  }

  .mobile-brand-title-v643s{
    display:block!important;
    color:#0f172a!important;
    font-size:17px!important;
    line-height:1.12!important;
    font-weight:900!important;
    margin:0 0 4px!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }

  .mobile-brand-sub-v643s{
    display:block!important;
    color:#64748b!important;
    font-size:12px!important;
    line-height:1.2!important;
    font-weight:600!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }

  /* 手机端隐藏首页主视觉整块 */
  .home-hero-v629a,
  .home-hero-section-v629a,
  .home-banner-v629a,
  .home-intro-v629a,
  .home-main-hero-v629a{
    display:none!important;
  }

  /* 隐藏手机端 AI 提问，快捷标签 */
  .home-question-v629a,
  .home-tags-v629a,
  .home-quick-tags-v629a,
  .home-chip-list-v629a{
    display:none!important;
  }

  /* 首页内容直接上来，只显示帖子列表 */
  html.is-home-v643e .home-main-grid-v629a,
  html.is-home-v643e .home-grid-v629a,
  html.is-home-v643e .home-content-v629a,
  html.is-home-v643e .home-section-grid-v629a{
    width:100%!important;
    max-width:100%!important;
    display:block!important;
    padding:12px 12px 42px!important;
    margin:0 auto!important;
  }

  /* 隐藏右侧栏全部内容 */
  html.is-home-v643e .home-side-v629a,
  html.is-home-v643e .home-sidebar-v629a,
  html.is-home-v643e .home-right-v629a,
  html.is-home-v643e .home-main-grid-v629a > :last-child,
  html.is-home-v643e .home-grid-v629a > :last-child,
  html.is-home-v643e .home-content-v629a > :last-child{
    display:none!important;
  }

  /* 左侧帖子容器占满 */
  html.is-home-v643e .home-main-grid-v629a > :first-child,
  html.is-home-v643e .home-grid-v629a > :first-child,
  html.is-home-v643e .home-content-v629a > :first-child,
  html.is-home-v643e .home-section-grid-v629a > :first-child{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }

  html.is-home-v643e .home-card-v629a{
    width:100%!important;
    max-width:100%!important;
    border-radius:20px!important;
    overflow:hidden!important;
    background:#ffffff!important;
    border:1px solid #e5e7eb!important;
    box-shadow:0 10px 24px rgba(15,23,42,.055)!important;
  }

  html.is-home-v643e .home-card-head-v629a{
    min-height:56px!important;
    padding:0 16px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    border-bottom:1px solid #eef2f7!important;
  }

  html.is-home-v643e .home-card-head-v629a h2{
    font-size:18px!important;
    font-weight:900!important;
    margin:0!important;
  }

  html.is-home-v643e .home-card-head-v629a a,
  html.is-home-v643e .home-card-head-v629a button{
    font-size:13px!important;
    color:#2563eb!important;
  }

  /* 分类可以保留，方便筛帖子，横向滑动 */
  html.is-home-v643e .home-category-row-v629a{
    padding:14px 16px 0!important;
    gap:8px!important;
    display:flex!important;
    flex-wrap:nowrap!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    scrollbar-width:none!important;
  }

  html.is-home-v643e .home-category-row-v629a::-webkit-scrollbar{
    display:none!important;
  }

  html.is-home-v643e .home-category-row-v629a button{
    flex:0 0 auto!important;
    height:34px!important;
    padding:0 13px!important;
    border-radius:999px!important;
    font-size:13px!important;
    font-weight:800!important;
    white-space:nowrap!important;
  }

  html.is-home-v643e .home-post-list-v629a{
    padding:14px 16px 18px!important;
    display:flex!important;
    flex-direction:column!important;
    gap:12px!important;
  }

  html.is-home-v643e .home-post-item-v629a{
    width:100%!important;
    max-width:100%!important;
    display:flex!important;
    gap:12px!important;
    align-items:flex-start!important;
    padding:14px!important;
    border-radius:18px!important;
    background:#ffffff!important;
    border:1px solid #e5e7eb!important;
    box-shadow:0 6px 18px rgba(15,23,42,.035)!important;
    overflow:hidden!important;
  }

  html.is-home-v643e .home-post-avatar-v629a{
    width:44px!important;
    height:44px!important;
    min-width:44px!important;
    border-radius:14px!important;
  }

  html.is-home-v643e .home-post-body-v643j,
  html.is-home-v643e .home-post-body-v643h,
  html.is-home-v643e .home-post-body-v629a{
    min-width:0!important;
    flex:1 1 auto!important;
    overflow:hidden!important;
  }

  html.is-home-v643e .home-post-title-v629a{
    font-size:16px!important;
    line-height:1.35!important;
    margin:0 0 6px!important;
    display:-webkit-box!important;
    -webkit-line-clamp:2!important;
    -webkit-box-orient:vertical!important;
    overflow:hidden!important;
  }

  html.is-home-v643e .home-post-summary-v629a{
    font-size:13px!important;
    line-height:1.65!important;
    max-height:44px!important;
    margin:0 0 10px!important;
    display:-webkit-box!important;
    -webkit-line-clamp:2!important;
    -webkit-box-orient:vertical!important;
    overflow:hidden!important;
  }

  html.is-home-v643e .home-post-meta-v629a{
    display:flex!important;
    flex-wrap:wrap!important;
    gap:7px!important;
    font-size:12px!important;
    color:#64748b!important;
  }

  html.is-home-v643e .home-post-tag-v629a{
    min-height:22px!important;
    padding:0 8px!important;
    border-radius:999px!important;
    font-size:12px!important;
  }

  /* 详情页不受本次首页 posts-only 影响 */
}

/* V6_MOBILE_LOGIN_VISIBLE_REAL_V1
   移动端导航原始 build 里已经加入登录 / 注册，这里只负责确保移动端可见。 */
@media (max-width: 768px){
  .home-top-v629a > .mobile-actions-v643s{
    display:flex!important;
    visibility:visible!important;
    width:100%!important;
    height:auto!important;
    overflow-x:auto!important;
    pointer-events:auto!important;
  }

  .mobile-login-entry-v644a{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-height:38px!important;
    padding:8px 14px!important;
    border:0!important;
    border-radius:999px!important;
    background:linear-gradient(135deg,#2563eb,#7c3aed)!important;
    color:#fff!important;
    font-size:13px!important;
    font-weight:900!important;
    box-shadow:0 10px 24px rgba(37,99,235,.22)!important;
    white-space:nowrap!important;
  }
}

/* V6_MOBILE_FINAL_NAV_VISIBLE_V1 */
@media (max-width: 768px){
  .home-top-v629a > .mobile-brand-v643s,
  .home-top-v629a > .mobile-actions-v643s{
    display:flex!important;
    visibility:visible!important;
    opacity:1!important;
    height:auto!important;
    pointer-events:auto!important;
  }

  .home-top-v629a > .mobile-actions-v643s{
    width:100%!important;
    max-width:100%!important;
    overflow-x:auto!important;
    gap:8px!important;
  }

  .mobile-login-entry-v644a{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-height:38px!important;
    padding:8px 14px!important;
    border:0!important;
    border-radius:999px!important;
    background:linear-gradient(135deg,#2563eb,#7c3aed)!important;
    color:#fff!important;
    font-size:13px!important;
    font-weight:900!important;
    box-shadow:0 10px 24px rgba(37,99,235,.22)!important;
    white-space:nowrap!important;
  }
}
