/* 2026-11-09 数字中心手机端通用适配（独立模板用，不继承 base.html 的页面）
 * 问题：顶栏写死区、按钮文字被挤成竖排、表格撑破页面、底部工具栏拓掉。
 */
@media (max-width:768px){
  /* 顶栏：允许换行，不再挤压 */
  .topbar,.top-bar,.appbar,.app-header{
    height:auto!important;min-height:46px;flex-wrap:wrap;row-gap:8px;
    padding:8px 12px!important;gap:8px!important;
  }
  .topbar .clock,.top-bar .clock{display:none}
  .brand{flex:1 1 auto;min-width:0}
  .brand h1,.brand h2{font-size:15px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .brand-sub,.brand .sub{display:none}
  .topbar-actions,.actions,.top-actions{margin-left:auto;gap:6px!important;flex-wrap:wrap;justify-content:flex-end}
  .nav-btn,.topbar-actions button,.topbar-actions a,.top-actions button{
    padding:7px 10px!important;font-size:12px!important;white-space:nowrap;
  }
  /* 按钮文字永远不竖排 */
  button{white-space:nowrap}
  /* 底部固定操作栏 */
  .bottom-bar,.fixed-bar,.action-bar,.sticky-actions,.bottom-tools{
    flex-wrap:wrap;row-gap:6px;padding:10px 12px!important;gap:8px!important;
  }
  /* 页面标题不要被挤成竖排 */
  .page-title{flex-wrap:wrap}
  .page-title h1,.page-title h2{font-size:17px!important;white-space:nowrap}
  .page-title .sub{flex:1 1 100%;font-size:12px!important;line-height:1.6}
  /* 大横幅挂牌在手机上收紧 */
  .hero{padding:16px 18px!important;gap:12px!important}
  .hero h1,.hero h2,.hero h3{font-size:17px!important}
  .hero p{font-size:12px!important;line-height:1.6}
  /* 底部固定操作栏：信息单行，按钮平分占位 */
  .action-bar,.bottom-bar,.fixed-bar,.sticky-actions,.bottom-tools{
    padding:10px 12px!important;flex-wrap:wrap;row-gap:8px;
  }
  .action-bar .info,.bottom-bar .info,.fixed-bar .info,.sticky-actions .info,.bottom-tools .info{
    flex:1 1 100%;white-space:nowrap;font-size:12px;overflow:hidden;text-overflow:ellipsis;
  }
  .action-bar .btn,.bottom-bar .btn,.fixed-bar .btn,.sticky-actions .btn,.bottom-tools .btn{
    flex:1 1 auto;text-align:center;white-space:nowrap;
  }
  /* 删除只在鼠标悬停时才出现的小按钮：手机上永远可见且点得到 */
  .sb-del{opacity:1!important;width:30px!important;height:30px!important}
  /* 宽表格可横向滑动（由 mobile_fit.js 包裹） */
  .mfit-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%}
  .mfit-scroll::-webkit-scrollbar{height:6px}
  .mfit-scroll::-webkit-scrollbar-thumb{background:rgba(120,95,65,.35);border-radius:3px}
  .mfit-clip{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
  .mfit-fixed{max-width:100vw;left:0!important;right:0!important;margin-left:auto;margin-right:auto}
}
