/* 万鸟朝手机端：找房与房源沿用房源现有尺寸。
   仅修正几何和切换时的位移；原配色、数据与操作保持不变。
   important 声明置于独立层，覆盖历史无层级的高权重样式。 */
@layer wncMobileHouseFinder {
  @media (max-width: 768px) {
    /* 电脑统计包装层仍可存在；手机保持原图标在名称、数字前。 */
    :is(#page-houses, #page-vacant) :is(.ym-stat-icon, .vc-stat-ic) {
      order: -1 !important;
    }

    /* 电脑顶部适配器追加的图标留在 DOM，手机使用原有手机图标。 */
    :is(#page-houses, #page-vacant) > .page-content > .sf-mode-tabs .wnc-top-tab-icon {
      display: none !important;
    }

    /* 同一搜索组件采用房源现有字号；新旧节点切换时文字不再缩放。 */
    :is(#page-houses, #page-vacant) :is(.wf3-s input, #house-search, #vc-search) {
      box-sizing: border-box !important;
      min-width: 0 !important;
      width: 100% !important;
      height: 40px !important;
      min-height: 40px !important;
      font-size: 16px !important;
      line-height: 22px !important;
      font-family: inherit !important;
      font-weight: 400 !important;
    }

    :is(#page-houses, #page-vacant) :is(.wf3-s input, #house-search, #vc-search)::placeholder {
      font-size: 16px !important;
      line-height: 22px !important;
      font-family: inherit !important;
      font-weight: 400 !important;
    }

    :is(#page-houses, #page-vacant) .wf3-s {
      min-width: 0 !important;
      box-sizing: border-box !important;
    }

    :is(#page-houses, #page-vacant) .wf3-m,
    :is(#page-houses, #page-vacant) .wf3-m .t {
      font-size: 14px !important;
      line-height: 20px !important;
      font-family: inherit !important;
      font-weight: 400 !important;
    }

    :is(#page-houses, #page-vacant) .wf3-m {
      box-sizing: border-box !important;
      height: 40px !important;
      min-height: 40px !important;
    }

    /* 找房五格统计与房源实测一致：每格约 81.640625px 高。 */
    #page-vacant #vc-stats-bar > .vc-stat-item {
      box-sizing: border-box !important;
      display: flex !important;
      flex-direction: column !important;
      align-items: center !important;
      justify-content: center !important;
      gap: 0 !important;
      height: auto !important;
      min-height: 0 !important;
      padding: 9px 2px 10px !important;
    }

    #page-vacant #vc-stats-bar > .vc-stat-item .vc-stat-ic {
      width: 18px !important;
      height: 18px !important;
      min-width: 18px !important;
      flex: none !important;
      margin: 0 0 4px !important;
    }

    #page-vacant #vc-stats-bar > .vc-stat-item .vc-stat-ic svg {
      width: 18px !important;
      height: 18px !important;
    }

    #page-vacant #vc-stats-bar > .vc-stat-item .vc-stat-lbl {
      font-size: 14px !important;
      line-height: 16.8px !important;
      font-weight: 500 !important;
      letter-spacing: 0 !important;
      margin: 0 !important;
      max-width: none !important;
      overflow: visible !important;
      text-overflow: clip !important;
    }

    #page-vacant #vc-stats-bar > .vc-stat-item .vc-stat-value {
      font-size: 19px !important;
      line-height: 21.85px !important;
      font-weight: 800 !important;
      letter-spacing: -0.3px !important;
      margin: 2px 0 0 !important;
    }

    /* 同一信息槽保留租金、租客和设施位置；无设施资料时留空。 */
    :is(#page-houses, #page-vacant) .ym-room-card .rc-card-info {
      box-sizing: border-box !important;
      min-height: 52.5px !important;
    }

    #page-vacant .ym-room-card .rc-card-name {
      flex-wrap: nowrap !important;
    }

    /* 不改变三列网格，取消原卡片按压缩放及结构切换动画。 */
    :is(#page-houses, #page-vacant) :is(.ym-house-group, .ym-group-header, .ym-room-grid, .ym-room-card, .rc-card-name, .rc-card-info, .wm-hsum, .wm-rfoot) {
      transition: none !important;
      animation: none !important;
    }

    :is(#page-houses, #page-vacant) :is(.ym-house-group, .ym-room-card),
    :is(#page-houses, #page-vacant) :is(.ym-house-group, .ym-room-card):hover,
    :is(#page-houses, #page-vacant) :is(.ym-house-group, .ym-room-card):active {
      transform: none !important;
    }
  }
}

/* Align the first visible row with the existing housing-list baseline. */
@layer wncMobileHouseFinder {
  @media (max-width: 768px) {
    #page-vacant .sf-mode-tabs { padding-bottom: 0 !important; }
    #page-vacant #sf-list-mode > .wf3 { margin-bottom: 10px !important; }
  }
}

@layer wncMobileHouseFinder {
  @media (max-width: 768px) {
    #page-houses .ym-filter-bar > .wf3 { margin-bottom: 0 !important; }
  }
}
