/* ===== PP论坛 · 窄屏兜底（桌面版被手机/窄窗口打开时用） =====
   作用域：仅 max-width:960px，PC 版式（≥961px）完全不受影响。
   目标：a) 页面级横向滚动归零；b) 首页版块列表 / 帖子列表在窄屏可读。
   2026-11-15 新增。引入位置：template/yudi_kanchai/common/header.htm（全站 PC 页面） */

@media (max-width:960px){

  /* ---------- 1. 解除 1200 固定宽度 ---------- */
  html,body{min-width:0!important;width:auto!important;}
  .wp{width:auto!important;max-width:100%!important;box-sizing:border-box;
      padding-left:10px!important;padding-right:10px!important;}
  #ct.wp,#pt,#chart,.pp-recent,.sitefocus,.focus_0,.ftbg,#ft .wp{
      width:auto!important;max-width:100%!important;box-sizing:border-box;}

  /* ---------- 2. 顶部导航：flex 换行 ---------- */
  #nvc{display:flex!important;flex-wrap:wrap!important;align-items:center!important;
       height:auto!important;min-height:50px!important;padding:2px 8px!important;box-sizing:border-box;}
  .nv_wrap{display:flex!important;align-items:center!important;justify-content:flex-start!important;
       float:none!important;width:auto!important;max-width:100%!important;}
  .nv_logo{float:none!important;width:auto!important;height:44px!important;line-height:44px!important;}
  .nv_logo h1{margin:0!important;}
  .nv_logo img{width:auto!important;height:32px!important;max-height:32px!important;}
  #nvc .nav{float:none!important;flex:1 1 auto!important;width:auto!important;max-width:100%!important;
       height:auto!important;min-width:0;}
  #nvc .nav ul{display:flex!important;flex-wrap:wrap!important;width:auto!important;height:auto!important;}
  #nvc .nav li,#nvc .nav li.a{float:none!important;}
  #nvc .nav li a{font-size:13.5px!important;padding:0 7px!important;line-height:30px!important;}
  #header_user{float:none!important;margin-left:auto!important;width:auto!important;height:auto!important;}
  #header_user a{font-size:12px!important;padding:4px 8px!important;}

  /* ---------- 3. 主列 / 右栏堆叠 ---------- */
  #ct .mn,#ct .sd,#ct .area,.yudilistl,.yudilistr,.pp-sp-ct .pp-sp-col{
      width:100%!important;max-width:100%!important;float:none!important;
      margin-left:0!important;box-sizing:border-box;}
  #ct .sd{margin-top:12px;}
  #ct .mn.pa20{padding-left:0!important;padding-right:0!important;}
  /* 全站顶部小工具条与其他页面的固定宽度容器 */
  #toptb{width:auto!important;min-width:0!important;max-width:100%!important;box-sizing:border-box;padding:0 6px!important;}
  #main_message .f_c.altw,#scform{max-width:100%!important;}
  #scform{width:100%!important;table-layout:fixed!important;}
  #scform td,#scform th{white-space:normal!important;}
  .rfm{width:auto!important;max-width:100%!important;}
  .layui-container{width:auto!important;max-width:100%!important;box-sizing:border-box;
      padding-left:10px!important;padding-right:10px!important;}
  .cnet-header-search{width:auto!important;max-width:100%!important;}
  .cnet-header-search label{max-width:100%!important;}
  /* 个人空间（PC 三栏档案）→ 单列 */
  #ct.pp-sp-ct,.pp-sp-ct{width:auto!important;max-width:100%!important;box-sizing:border-box;}
  body.pp-sp #ct.pp-sp-ct{grid-template-columns:1fr!important;gap:12px!important;padding:12px 10px!important;}
  .pp-sp-id{max-width:100%!important;}
  /* 署名条：头像 + 姓名信息 + 按钮组改为换行堆叠 */
  body.pp-sp .pp-sp-id{flex-wrap:wrap!important;gap:12px!important;padding:16px 14px!important;align-items:flex-start!important;}
  body.pp-sp .pp-sp-av{flex:0 0 64px!important;width:64px!important;height:64px!important;}
  body.pp-sp .pp-sp-av img{width:64px!important;height:64px!important;}
  body.pp-sp .pp-sp-i1{flex:1 1 calc(100% - 80px)!important;min-width:0!important;}
  body.pp-sp .pp-sp-nm{flex-wrap:wrap!important;}
  body.pp-sp .pp-sp-bt{flex:1 1 100%!important;margin-left:0!important;flex-wrap:wrap!important;gap:6px!important;}

  /* ---------- 4. 首页版块列表：隐藏「最后发表」列，说明换行 ---------- */
  #ct table.fl_tb{width:100%!important;table-layout:fixed!important;}
  #ct table.fl_tb td.fl_i{width:72px!important;padding-left:2px!important;text-align:left!important;}
  #ct table.fl_tb td.fl_i span{font-size:11.5px!important;}
  #ct table.fl_tb td.fl_by{display:none!important;}
  #ct table.fl_tb h2{font-size:15.5px!important;line-height:1.35;}
  #ct table.fl_tb h2 em{font-size:11.5px!important;}
  #ct table.fl_tb p.xg2{max-width:100%!important;white-space:normal!important;font-size:13px!important;
      line-height:1.5;text-align:left!important;
      display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
  #ct table.fl_tb p.pp-sub{max-width:100%!important;white-space:normal!important;font-size:12px!important;
      line-height:1.5;text-align:left!important;}
  #ct table.fl_tb td>p:not(.xg2):not(.pp-sub){font-size:12.5px!important;line-height:1.5;}
  .pp-catnote{max-width:100%!important;white-space:normal!important;}

  /* ---------- 5. 帖子列表：表格 → 卡片 ---------- */
  #threadlisttableid{display:block!important;width:100%!important;table-layout:auto!important;}
  #threadlisttableid thead{display:none!important;}
  #threadlisttableid tbody,#threadlisttableid tr,#threadlisttableid th,#threadlisttableid td{
      display:block!important;width:auto!important;}
  #threadlisttableid tr{position:relative;padding:11px 0 9px 40px!important;border-bottom:1px solid #ececec;}
  #threadlisttableid td.icn{position:absolute!important;left:0;top:13px;width:32px!important;}
  #threadlisttableid td.icn img,#threadlisttableid td.icn .user_avatar{
      width:30px!important;height:30px!important;border-radius:50%;}
  #threadlisttableid th.common{font-size:15px!important;line-height:1.45;padding:0!important;text-align:left!important;}
  #threadlisttableid th.common .s.xst{font-size:15px!important;}
  #threadlisttableid td.num{display:inline-block!important;font-size:12px!important;
      margin:5px 14px 0 0;padding:0!important;color:#8a8a8a;}
  #threadlisttableid td.by{font-size:12px!important;padding:3px 0 0!important;text-align:left!important;}
  #threadlisttableid td.by cite,#threadlisttableid td.by .bycite{font-size:12px!important;}
  #threadlisttableid .kym_list_img img{max-width:100%!important;height:auto!important;}

  /* ---------- 6. 分页 / 正文溢出容器 ---------- */
  .pg{width:auto!important;max-width:100%!important;box-sizing:border-box;}
  .pg a,.pg strong{min-width:30px;height:30px;line-height:30px;}
  .t_f{max-width:100%!important;overflow-x:auto!important;}
  .t_f img{max-width:100%!important;height:auto!important;}
  .t_f table{max-width:100%!important;}
  /* 顶部标题条：固定两翼宽度，标题列吃满剩余空间 */
  .yudi_view_top{max-width:100%!important;}
  .yudi_view_top>table{width:100%!important;max-width:100%!important;table-layout:fixed!important;}
  .yudi_view_top td.avtar{width:42px!important;padding:0!important;}
  .yudi_view_top td.avtar img{width:36px!important;height:36px!important;}
  .yudi_view_top td.plc{width:auto!important;min-width:0!important;padding:0 4px 0 6px!important;box-sizing:border-box;}
  .yudi_view_top td.pp-title-act{width:96px!important;padding:0!important;}
  .yudi_view_top td.pp-title-act .yudi_tp_action{white-space:nowrap!important;}
  .yudi_view_top td.pp-title-act .yudi_tp_action span{font-size:11px!important;margin-left:2px!important;}
  .yudi_view_top td.pp-title-act .view_post_btn{width:auto!important;height:24px!important;
       min-width:0!important;padding:0 6px!important;font-size:11px!important;line-height:24px!important;
       background:none!important;}
  .yudi_view_top h1.ts{font-size:17px!important;line-height:1.4!important;margin:0 0 4px!important;
       display:block!important;white-space:normal!important;}
  #thread_subject{font-size:17px!important;line-height:1.4!important;}
  .pp-thread-author{padding:0!important;min-height:0!important;}
  .pp-thread-author .pp-avt-lead{display:none!important;}
  .thread-head-info{width:auto!important;font-size:12px!important;line-height:1.6!important;}
  div.bar,.tedt .bar,#fastposteditor .bar{width:auto!important;max-width:100%!important;
      box-sizing:border-box;overflow-x:auto;}
  #fastposteditor .tedt{max-width:100%!important;}

  /* ---------- 7. 帖子页标题 ---------- */
  #thread_subject{font-size:18px!important;line-height:1.45!important;}
}
