:root{--dx-vt-ui-build:26112114}

/* ============================================================
   帖子内容页 UI 精修补丁 v26112114
   1) 移动端主题管理菜单：恢复 5 列 x 4 行网格（图1样式）
   2) 移动端：隐藏打印 / 上一主题 / 下一主题 三个箭头
   3) 移动端：收紧标题上下间距
   4) PC 端：标题靠左显示，隐藏复制链接
   5) 移动端：附件下载按钮加宽
   ============================================================ */

/* ---- 1) 管理菜单：移动端恢复 5 列网格 ---- */
@media screen and (max-width:720px){
  html:root body#nv_forum #ct #modmenu{
    display:grid !important;
    grid-template-columns:repeat(5,minmax(0,1fr)) !important;
    grid-auto-flow:row !important;
    gap:6px !important;
    overflow:visible !important;
    overflow-x:visible !important;
    padding:8px 6px !important;
    margin:8px 0 12px !important;
  }
  html:root body#nv_forum #ct #modmenu>a{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    width:100% !important;
    min-width:0 !important;
    height:34px !important;
    line-height:1.2 !important;
    margin:0 !important;
    padding:2px 0 !important;
    text-align:center !important;
    white-space:nowrap !important;
    box-sizing:border-box !important;
  }
  html:root body#nv_forum #ct #modmenu>.pipe{
    display:none !important;
  }
}

/* ---- 2) 移动端隐藏 打印 / 上一主题 / 下一主题 ---- */
@media screen and (max-width:720px){
  html:root body.pg_viewthread #postlist .vwthd>.y>a[title="打印"],
  html:root body.pg_viewthread #postlist .vwthd>.y>a[title="上一主题"],
  html:root body.pg_viewthread #postlist .vwthd>.y>a[title="下一主题"],
  html:root body.pg_viewthread #postlist .vwthd>.y>a:has(.fico-print),
  html:root body.pg_viewthread #postlist .vwthd>.y>a:has(.fico-left),
  html:root body.pg_viewthread #postlist .vwthd>.y>a:has(.fico-right){
    display:none !important;
  }
  html:root body.pg_viewthread #postlist .vwthd>.y{
    display:none !important;
    margin:0 !important;
    height:0 !important;
    min-height:0 !important;
    overflow:hidden !important;
  }
}

/* ---- 3) 移动端收紧标题上下间距 ---- */
@media screen and (max-width:720px){
  html:root body#nv_forum #postlist .vwthd{
    padding:10px 8px !important;
  }
  html:root body#nv_forum #postlist .vwthd h1.ts{
    display:inline !important;
    width:auto !important;
    margin:0 !important;
    line-height:1.35 !important;
  }
  /* 荐徽标跟在标题文字后同一行，不再独占一行撑大卡片 */
  html:root body#nv_forum #postlist .vwthd .xg1{
    display:inline !important;
    vertical-align:baseline !important;
  }
  html:root body.pg_viewthread #postlist .vwthd .xg1{
    margin-top:0 !important;
  }
  /* 只隐藏标题后灰色的[复制链接]，荐徽标保持原样 */
  html:root body.pg_viewthread #postlist .vwthd .xg1 a{
    display:none !important;
  }
  /* 调近标题与下方作者卡片的距离 */
  html:root body.pg_viewthread #postlist .pls.dx-viewthread-author{
    padding-top:6px !important;
  }
}

/* ---- 4) PC 端标题靠左，隐藏复制链接 ---- */
@media screen and (min-width:721px){
  html:root body.pg_viewthread #postlist .vwthd,
  html:root body.pg_viewthread #postlist .vwthd h1.ts,
  html:root body.pg_viewthread #postlist .vwthd .xg1{
    text-align:left !important;
  }
  html:root body.pg_viewthread #postlist .vwthd h1.ts{
    display:block !important;
    width:100% !important;
    margin:0 auto !important;
  }
  html:root body.pg_viewthread #postlist .vwthd>.y{
    float:right !important;
  }
  /* PC端也隐藏标题后灰色的[复制链接]，与移动端一致，荐徽标保留 */
  html:root body.pg_viewthread #postlist .vwthd .xg1 a{
    display:none !important;
  }
}

/* ---- 5) 移动端附件下载按钮：与"推荐给好友"同宽同高（46px饱满胶囊），精准例外不影响其余链接的28px规则 ---- */
@media screen and (max-width:720px){
  html:root body.pg_viewthread #postlist .x5pa-card .x5pa-actions > a.x5pa-btn,
  html:root body.pg_viewthread #postlist .x5pa-card .x5pa-actions > a.x5pa-btn-primary,
  html:root body.pg_viewthread .x5pa-ui .x5pa-actions > a.x5pa-btn{
    min-height:46px !important;
    height:46px !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    padding-left:12px !important;
    padding-right:12px !important;
    box-sizing:border-box !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
  }
}

/* ---- 6) 移动端标题卡片：原样复用 PC 端标题玻璃卡片规则（仅把 media 换成 max-width:720px）---- */
@media screen and (max-width:720px){
  body.pg_viewthread #postlist > table:first-child .plc{
    background:linear-gradient(145deg,rgba(255,255,255,0.82),rgba(239,246,253,0.62)) !important;
    border:1px solid rgba(255,255,255,0.8) !important;
    box-shadow:0 8px 22px rgba(39,53,77,0.055),inset 0 1px 0 rgba(255,255,255,0.92) !important;
    border-radius:14px !important;
  }
  /* 标题卡片与作者卡片宽度跟随父容器(和菜单卡片同步缩放)，任何视口都不缺边 */
  body.pg_viewthread #postlist > table:first-child .plc,
  body.pg_viewthread #postlist .pls.dx-viewthread-author{
    width:calc(100% - 12px) !important;
    max-width:calc(100% - 12px) !important;
    margin-left:auto !important;
    margin-right:auto !important;
    box-sizing:border-box !important;
  }
  /* 隐藏标题表之后那个无文字的空A占位，消除作者卡片上方多余空隙 */
  body.pg_viewthread #postlist > div > a:empty{
    display:none !important;
  }
}

/* ---- 7) 标题卡片下方间距 = 上方间距(12px)：给作者卡所在表加margin-top，上下对称 ---- */
@media screen and (max-width:720px){
  body.pg_viewthread #postlist table.plhin:has(.dx-viewthread-author){
    margin-top:11px !important;
  }
}

/* ---- 8) PC端电梯直达输入框弱化：去掉液态玻璃白框，恢复低调小输入框 ---- */
@media screen and (min-width:721px){
  html:root body.pg_viewthread #fj input.px{
    background:rgba(255,255,255,0.35) !important;
    box-shadow:none !important;
    border:1px solid rgba(0,0,0,0.10) !important;
    border-radius:5px !important;
    height:22px !important;
    min-height:22px !important;
    width:48px !important;
    vertical-align:middle !important;
  }
}

/* ---- 9) 移动端网盘附件卡片：短标题时右侧缺一截，强制表格/单元格占满容器宽度 ---- */
@media screen and (max-width:720px){
  html:root body.pg_viewthread #postlist table.x5pa-card-table{
    display:block !important;
    width:100% !important;
  }
  html:root body.pg_viewthread #postlist table.x5pa-card-table tbody,
  html:root body.pg_viewthread #postlist table.x5pa-card-table tr{
    display:block !important;
    width:100% !important;
  }
  html:root body.pg_viewthread #postlist table.x5pa-card-table td.t_f{
    display:block !important;
    width:100% !important;
    max-width:100% !important;
  }
}
