
/* ==========================================================================
 * v26112681 修复：移动端「个人设置 / 个人资料」表单标签与控件分两行
 * --------------------------------------------------------------------------
 * 成因：extend_common.css 在 @media(max-width:720px) 内写了
 *     .tfm tbody,.tfm tr{display:block;width:100%}
 *     .tfm th,.tfm td{display:block;width:100%!important;padding:5px 0!important}
 *   表格结构被整体拆成块级，于是 th(标签)、td(控件)、td.p(隐私) 各占一行。
 * 方案：仅在设置页把表单行改为 flex 两列 —— 标签固定列宽，控件自适应并撑满，
 *   隐私选择独占第二行右对齐。不影响其它页面、不影响 PC 端。
 * 注意：本段必须位于 dx_c14 原有规则之后，靠“后写覆盖”压过同特异性的 !important。
 * ========================================================================== */
@media (max-width: 720px) {

  body:is(#nv_home,#home).pg_spacecp #ct>.mn form[action*="ac=profile"] .tfm,
  body:is(#nv_home,#home).pg_spacecp #profilelist {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    table-layout: auto !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    background: transparent !important;
  }

  body:is(#nv_home,#home).pg_spacecp #ct>.mn form[action*="ac=profile"] .tfm>tbody,
  body:is(#nv_home,#home).pg_spacecp #profilelist>tbody {
    display: block !important;
    width: 100% !important;
  }

  /* 一行 = 一张卡片，标签与控件同行 */
  body:is(#nv_home,#home).pg_spacecp #ct>.mn form[action*="ac=profile"] .tfm tr,
  body:is(#nv_home,#home).pg_spacecp #profilelist tr {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    column-gap: 10px !important;
    row-gap: 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 0 8px !important;
    padding: 10px 12px !important;
    border: 1px solid rgba(108,133,169,.10) !important;
    border-radius: 12px !important;
    background: rgba(255,255,255,.56) !important;
  }

  /* 先解除旧规则给单元格加的左右边框与圆角，避免 flex 下出现断线 */
  body:is(#nv_home,#home).pg_spacecp #ct>.mn form[action*="ac=profile"] .tfm tr>:is(th,td):first-child,
  body:is(#nv_home,#home).pg_spacecp #ct>.mn form[action*="ac=profile"] .tfm tr>:is(th,td):last-child,
  body:is(#nv_home,#home).pg_spacecp #profilelist tr>:is(th,td):first-child,
  body:is(#nv_home,#home).pg_spacecp #profilelist tr>:is(th,td):last-child {
    border: 0 !important;
    border-radius: 0 !important;
  }

  body:is(#nv_home,#home).pg_spacecp #ct>.mn form[action*="ac=profile"] .tfm tr>:is(th,td),
  body:is(#nv_home,#home).pg_spacecp #profilelist tr>:is(th,td) {
    display: block !important;
    float: none !important;
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    text-align: left !important;
    vertical-align: middle !important;
  }

  /* 标签列：固定宽度，保证纵向对齐 */
  body:is(#nv_home,#home).pg_spacecp #ct>.mn form[action*="ac=profile"] .tfm tr>th,
  body:is(#nv_home,#home).pg_spacecp #profilelist tr>th {
    flex: 0 0 76px !important;
    width: 76px !important;
    font-size: 14px !important;
    line-height: 1.45 !important;
    font-weight: 650 !important;
    color: #344158 !important;
    word-break: keep-all !important;
    text-align: left !important;
  }

  /* 控件列：占满剩余宽度，输入框不再溢出 */
  body:is(#nv_home,#home).pg_spacecp #ct>.mn form[action*="ac=profile"] .tfm tr>td,
  body:is(#nv_home,#home).pg_spacecp #profilelist tr>td {
    flex: 1 1 0 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 6px !important;
    min-width: 0 !important;
  }

  /* 隐私列：换到第二行，靠右弱化，避免与控件抢宽度 */
  body:is(#nv_home,#home).pg_spacecp #ct>.mn form[action*="ac=profile"] .tfm tr>td.p,
  body:is(#nv_home,#home).pg_spacecp #profilelist tr>td.p {
    flex: 0 0 100% !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    width: 100% !important;
  }

  body:is(#nv_home,#home).pg_spacecp #ct>.mn form[action*="ac=profile"] .tfm tr>td.p>select,
  body:is(#nv_home,#home).pg_spacecp #profilelist tr>td.p>select {
    width: auto !important;
    min-width: 0 !important;
    max-width: 150px !important;
    height: 34px !important;
    min-height: 34px !important;
    font-size: 12px !important;
    line-height: 32px !important;
  }

  /* 控件在单元格内并排均分：单个控件占满，多个控件（如生日 年/月/日）等分不换行 */
  body:is(#nv_home,#home).pg_spacecp #ct>.mn form[action*="ac=profile"] .tfm tr>td>:is(input:not([type="radio"]):not([type="checkbox"]),select,textarea),
  body:is(#nv_home,#home).pg_spacecp #profilelist tr>td>:is(input:not([type="radio"]):not([type="checkbox"]),select,textarea) {
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* 说明文字与校验提示独占一行，不再挤压标签列 */
  body:is(#nv_home,#home).pg_spacecp #ct>.mn form[action*="ac=profile"] .tfm tr>td>:is(.rq,p.d,.d),
  body:is(#nv_home,#home).pg_spacecp #profilelist tr>td>:is(.rq,p.d,.d) {
    flex: 0 0 100% !important;
    width: 100% !important;
    margin: 2px 0 0 !important;
  }

  /* 占位空单元格不参与布局 */
  body:is(#nv_home,#home).pg_spacecp #ct>.mn form[action*="ac=profile"] .tfm tr>td:empty,
  body:is(#nv_home,#home).pg_spacecp #profilelist tr>td:empty {
    display: none !important;
  }
}
