/* 上线前测试：手机端适配修复。仅在窄屏生效，桌面网页与打印样式不受影响。 */
@media screen and (max-width:768px){
  /* 所有业务页都必须允许子元素收缩，禁止内容把页面撑出屏幕。 */
  #project-info,#supervision-log,#weekly-report,#field-supervision,#meeting-minutes,#inspection-notice,
  #project-info *,#supervision-log *,#weekly-report *,#field-supervision *,#meeting-minutes *,#inspection-notice *{
    box-sizing:border-box
  }
  #project-info,#supervision-log,#weekly-report,#field-supervision,#meeting-minutes,#inspection-notice{
    width:100%!important;max-width:100%!important;min-width:0!important;overflow-x:hidden!important
  }

  /* 项目管理：标签栏不再悬浮遮挡正文，标题与操作在卡片内自然排布。 */
  #project-info .project-manage-tabs{
    position:relative!important;top:auto!important;z-index:1!important;
    display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;
    width:calc(100% - 20px)!important;max-width:none!important;margin:0 10px 10px!important;padding:3px!important
  }
  #project-info .project-manage-tabs button{
    width:100%!important;min-width:0!important;min-height:34px!important;height:34px!important;
    padding:0 3px!important;font-size:12px!important;line-height:1.2!important;white-space:nowrap!important
  }
  #project-info .project-profile-card,#project-info .project-manage-panel{
    width:100%!important;max-width:100%!important;min-width:0!important;margin:0!important;
    padding:12px 10px 18px!important;border-radius:0!important;overflow:hidden!important
  }
  #project-info .project-subheading-row,#project-info .project-manage-heading{
    display:flex!important;width:100%!important;min-width:0!important;align-items:center!important;
    justify-content:space-between!important;gap:8px!important;margin:0 0 10px!important;flex-wrap:nowrap!important
  }
  #project-info .project-subheading-row .project-subheading,#project-info .project-manage-heading h2{
    min-width:0!important;margin:0!important;font-size:15px!important;line-height:1.35!important;white-space:normal!important
  }
  #project-info .project-profile-save-btn,#project-info .project-manage-heading .btn{
    position:static!important;inset:auto!important;flex:0 0 auto!important;max-width:44%!important;
    height:30px!important;min-height:30px!important;padding:0 8px!important;font-size:11px!important;white-space:nowrap!important
  }
  #project-info .project-profile-card .w-table-opt tr{margin:0 0 8px!important}
  #project-info .project-profile-card .w-table-opt td:first-child{
    width:100%!important;min-height:0!important;margin:0 0 3px!important;padding:5px 8px!important;
    background:#f3f7fa!important;font-size:12px!important;line-height:1.35!important;text-align:center!important
  }
  #project-info .project-profile-card .w-input-opt{
    height:38px!important;min-height:38px!important;padding:0 9px!important;font-size:13px!important
  }
  #project-info .project-member-list{grid-template-columns:1fr!important;width:100%!important}
  #project-info .project-member-card{width:100%!important;min-width:0!important;padding:10px 38px 10px 10px!important}
  #project-info .project-member-main strong{font-size:13px!important}
  #project-info .project-member-main span,#project-info .project-member-main em{font-size:11px!important}

  /* 监理日志目录：今日卡片和年份改为上下排列。 */
  #supervision-log #logYearGrid.upgrade-log-overview,
  #supervision-log .upgrade-log-overview{
    display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:10px!important;width:100%!important
  }
  #supervision-log .upgrade-today-card{
    width:100%!important;min-width:0!important;padding:16px!important;border-radius:8px!important
  }
  #supervision-log .upgrade-today-card strong{
    margin:0 0 5px!important;font-size:18px!important;line-height:1.35!important;letter-spacing:0!important;word-break:keep-all!important
  }
  #supervision-log .upgrade-today-card span{font-size:12px!important;line-height:1.55!important}
  #supervision-log .upgrade-year-list{width:100%!important;min-width:0!important;gap:0!important}
  #supervision-log .upgrade-year-row{width:100%!important;min-width:0!important;padding:10px 4px!important;font-size:13px!important}
  #supervision-log .upgrade-year-row strong{font-size:14px!important}
  #supervision-log .upgrade-year-row span{font-size:12px!important}

  /* 周报编辑：手机端分组标题和输入文字使用可读的小字号。 */
  #weekly-report #weekEditorView>.a4-page{padding:12px 9px 16px!important}
  #weekly-report #weekEditorView>.a4-page h2{font-size:16px!important;line-height:1.4!important;letter-spacing:2px!important}
  #weekly-report #weekEditorView>.a4-page>.w-table-opt td,
  #weekly-report #weekEditorView>.a4-page>.w-table-opt tr td:first-child{
    font-size:12px!important;line-height:1.4!important
  }
  #weekly-report #weekEditorView>.a4-page>.w-table-opt tr td:first-child{
    padding:9px 10px!important;text-align:left!important
  }
  #weekly-report #weekEditorView>.a4-page>.w-table-opt input,
  #weekly-report #weekEditorView>.a4-page>.w-table-opt textarea{font-size:12px!important;line-height:1.55!important}

  /* 旁站、巡视和安全检查目录。 */
  #field-supervision .fs-directory{
    width:100%!important;max-width:100%!important;min-width:0!important;min-height:0!important;
    margin:0!important;padding:14px 10px 18px!important;border-radius:0!important;overflow:hidden!important
  }
  #field-supervision .fs-directory-head{
    display:flex!important;width:100%!important;align-items:center!important;justify-content:space-between!important;
    gap:8px!important;margin:0 0 14px!important
  }
  #field-supervision .fs-directory-head strong{
    min-width:0!important;font-size:18px!important;line-height:1.3!important;white-space:normal!important
  }
  #field-supervision .fs-directory-head>button{
    flex:0 0 auto!important;height:32px!important;min-height:32px!important;padding:0 9px!important;font-size:11px!important
  }
  #field-supervision .fs-archive-head{
    display:grid!important;grid-template-columns:1fr!important;gap:8px!important;width:100%!important;
    margin:0 0 10px!important;padding:0 0 10px!important
  }
  #field-supervision .fs-archive-head h3{margin:0!important;font-size:15px!important;line-height:1.35!important}
  #field-supervision .fs-directory-tools{
    display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;width:100%!important;gap:7px!important
  }
  #field-supervision .fs-directory-tools select{
    width:100%!important;min-width:0!important;height:34px!important;padding:0 28px 0 9px!important;font-size:12px!important
  }
  #field-supervision .fs-record-table tr{width:100%!important;min-width:0!important}
  #field-supervision .fs-record-table td{min-width:0!important;font-size:12px!important;overflow-wrap:anywhere!important}

  /* 现场监管编辑表：每组标签/内容按两列换行，复杂人员与签字区域改为单列。 */
  #field-supervision .fs-paper{
    width:100%!important;max-width:100%!important;min-width:0!important;padding:12px 9px!important;overflow:hidden!important
  }
  #field-supervision .fs-title{font-size:16px!important;line-height:1.4!important;letter-spacing:1px!important}
  #field-supervision .fs-number,#field-supervision .fs-contract{font-size:11px!important}
  #field-supervision .fs-table,#field-supervision .fs-table>tbody{width:100%!important;min-width:0!important}
  #field-supervision .fs-table>tbody>tr,
  #field-supervision .fs-standing .fs-table>tbody>tr:nth-child(2),
  #field-supervision .fs-safety .fs-table>tbody>tr:nth-child(1),
  #field-supervision .fs-safety .fs-table>tbody>tr:nth-child(2){
    display:grid!important;grid-template-columns:minmax(82px,29%) minmax(0,1fr)!important;width:100%!important;min-width:0!important
  }
  #field-supervision .fs-table>tbody>tr>td{
    width:auto!important;min-width:0!important;max-width:100%!important;padding:6px!important;
    font-size:12px!important;line-height:1.45!important;overflow:hidden!important;overflow-wrap:anywhere!important
  }
  #field-supervision .fs-table>tbody>tr>td.fs-label{
    display:flex!important;align-items:center!important;justify-content:center!important;text-align:center!important;font-size:12px!important
  }
  #field-supervision .fs-table>tbody>tr>td[colspan]{grid-column:2!important}
  #field-supervision .fs-standing .fs-table>tbody>tr:nth-child(2)>td:nth-child(2n),
  #field-supervision .fs-safety .fs-table>tbody>tr:nth-child(1)>td:nth-child(2n),
  #field-supervision .fs-safety .fs-table>tbody>tr:nth-child(2)>td:nth-child(2n){border-right:0!important}
  #field-supervision .fs-table input,#field-supervision .fs-table textarea{
    width:100%!important;min-width:0!important;max-width:100%!important;font-size:12px!important;line-height:1.5!important
  }
  #field-supervision .fs-personnel,#field-supervision .fs-personnel tbody,
  #field-supervision .fs-personnel tr,#field-supervision .fs-personnel td{width:100%!important;min-width:0!important;max-width:100%!important}
  #field-supervision .fs-personnel tr{display:grid!important;grid-template-columns:1fr!important}
  #field-supervision .fs-personnel tr:first-child td,#field-supervision .fs-personnel td{grid-column:1!important}
  #field-supervision .fs-personnel td{padding:6px!important;font-size:11px!important;overflow:hidden!important}
  #field-supervision .fs-names{display:grid!important;grid-template-columns:1fr!important;gap:5px!important}
  #field-supervision .fs-names label{display:grid!important;grid-template-columns:auto minmax(0,1fr)!important;font-size:11px!important;white-space:normal!important}
  #field-supervision .fs-count-line{
    display:grid!important;grid-template-columns:minmax(0,1fr) 42px auto!important;width:100%!important;min-width:0!important;
    gap:4px!important;font-size:11px!important;white-space:normal!important
  }
  #field-supervision .fs-standing .fs-sign-row,#field-supervision .fs-table>tbody>tr.fs-sign-row{
    display:block!important;width:100%!important;border:1px solid var(--sl-table-line,#b8c6d0)!important
  }
  #field-supervision .fs-standing .fs-sign-row>td,#field-supervision .fs-table>tbody>tr.fs-sign-row>td{
    display:block!important;width:100%!important;min-width:0!important;padding:0!important;border:0!important
  }
  #field-supervision .fs-standing .fs-sign-grid{display:grid!important;grid-template-columns:1fr!important;width:100%!important;min-width:0!important}
  #field-supervision .fs-standing .fs-sign-cell{width:100%!important;min-width:0!important;padding:10px 8px!important;gap:7px!important}
  #field-supervision .fs-standing .fs-sign-cell+.fs-sign-cell{border-left:0!important;border-top:1px solid var(--sl-table-line,#b8c6d0)!important}
  #field-supervision .fs-standing .fs-sign-cell label{
    display:grid!important;grid-template-columns:auto minmax(0,1fr)!important;width:100%!important;min-width:0!important;
    gap:5px!important;font-size:11px!important;white-space:normal!important;text-align:left!important
  }
  #field-supervision .fs-standing .fs-sign-cell input,
  #field-supervision .fs-standing .fs-sign-cell input[type="date"]{width:100%!important;min-width:0!important;max-width:100%!important;flex:auto!important}
  #field-supervision .fs-note{font-size:10.5px!important;line-height:1.55!important}

  /* 会议纪要目录。 */
  #meeting-minutes .mm-directory-page{
    width:100%!important;max-width:100%!important;min-width:0!important;margin:0!important;padding:12px 10px 18px!important;
    border-radius:0!important;overflow:hidden!important
  }
  #meeting-minutes .mm-current-card{
    display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;
    width:100%!important;min-width:0!important;min-height:0!important;margin:0 0 14px!important;padding:12px!important
  }
  #meeting-minutes .mm-current-card h3{font-size:18px!important;line-height:1.3!important}
  #meeting-minutes .mm-current-card>.btn{
    flex:0 0 auto!important;width:auto!important;min-width:0!important;height:34px!important;min-height:34px!important;
    padding:0 10px!important;font-size:11px!important;white-space:nowrap!important
  }
  #meeting-minutes .record-list-toolbar{
    display:grid!important;grid-template-columns:1fr auto!important;align-items:center!important;gap:8px!important;width:100%!important
  }
  #meeting-minutes .record-list-toolbar h3{font-size:15px!important;line-height:1.35!important}
  #meeting-minutes .mm-month-filter{font-size:0!important}
  #meeting-minutes .mm-month-filter input{width:132px!important;min-width:0!important;height:34px!important;font-size:12px!important}
  #meeting-minutes .file-list,#meeting-minutes .file-list tbody{display:grid!important;width:100%!important;min-width:0!important;gap:8px!important}
  #meeting-minutes .mm-record-row{
    display:grid!important;grid-template-areas:"name action" "date action" "size action"!important;
    grid-template-columns:minmax(0,1fr) 36px!important;width:100%!important;min-width:0!important;height:auto!important;min-height:0!important;
    gap:3px 8px!important;padding:10px!important;border:1px solid #dfe7ed!important;border-radius:7px!important
  }
  #meeting-minutes .mm-record-row td{min-width:0!important;padding:0!important;border:0!important;font-size:11px!important;overflow-wrap:anywhere!important}
  #meeting-minutes .mm-record-row .file-name{grid-area:name!important}
  #meeting-minutes .mm-record-row .file-name button{max-width:100%!important;font-size:13px!important;text-align:left!important;white-space:normal!important;overflow-wrap:anywhere!important}
  #meeting-minutes .mm-record-row .file-date{grid-area:date!important;font-size:11px!important}
  #meeting-minutes .mm-record-row .file-size{grid-area:size!important;font-size:11px!important}
  #meeting-minutes .mm-record-row .file-actions{grid-area:action!important;align-self:center!important}

  /* 监理通知目录：创建、筛选、记录卡片全部在屏幕内换行。 */
  #inspection-notice #fileListViewTZ{
    width:100%!important;max-width:100%!important;min-width:0!important;margin:0!important;padding:12px 10px 18px!important;
    border-radius:0!important;overflow:hidden!important
  }
  #inspection-notice #fileListViewTZ>.sl-directory-page-title{display:none!important}
  #inspection-notice .notice-current-card{
    display:grid!important;grid-template-columns:1fr!important;width:100%!important;min-width:0!important;
    min-height:0!important;margin:0 0 14px!important;padding:12px!important;gap:9px!important
  }
  #inspection-notice .notice-current-card h2{display:none!important}
  #inspection-notice .notice-create-actions{
    display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;width:100%!important;gap:7px!important
  }
  #inspection-notice .notice-create-actions .btn{
    width:100%!important;min-width:0!important;height:34px!important;min-height:34px!important;padding:0 5px!important;
    font-size:11px!important;white-space:nowrap!important
  }
  #inspection-notice .notice-archive-heading{
    display:grid!important;grid-template-columns:1fr auto!important;align-items:center!important;gap:8px!important;width:100%!important
  }
  #inspection-notice .notice-archive-heading h3{font-size:16px!important;line-height:1.35!important}
  #inspection-notice #noticeMonthFilterTZ{width:122px!important;min-width:0!important;height:34px!important;font-size:12px!important}
  #inspection-notice .notice-type-tabs{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;width:100%!important;gap:0!important}
  #inspection-notice .notice-type-tabs button{width:100%!important;min-width:0!important;padding:0 3px!important;font-size:11px!important;white-space:nowrap!important}
  #inspection-notice .file-list,#inspection-notice #fileTableBodyTZ{display:grid!important;width:100%!important;min-width:0!important;gap:8px!important}
  #inspection-notice #fileTableBodyTZ .notice-record-row{
    display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;width:100%!important;min-width:0!important;
    height:auto!important;min-height:0!important;margin:0!important;padding:10px!important;gap:5px 8px!important;
    border:1px solid #dfe7ed!important;border-radius:7px!important
  }
  #inspection-notice #fileTableBodyTZ .notice-record-row td{
    display:block!important;width:auto!important;min-width:0!important;padding:0!important;border:0!important;
    font-size:11px!important;line-height:1.4!important;overflow-wrap:anywhere!important
  }
  #inspection-notice #fileTableBodyTZ .notice-record-row .file-name{grid-column:1!important}
  #inspection-notice #fileTableBodyTZ .notice-record-row .file-name button{
    max-width:100%!important;font-size:13px!important;line-height:1.4!important;text-align:left!important;white-space:normal!important;overflow-wrap:anywhere!important
  }
  #inspection-notice #fileTableBodyTZ .notice-record-row .file-date{grid-column:1!important;font-size:10.5px!important}
  #inspection-notice #fileTableBodyTZ .notice-record-row .file-actions{
    grid-column:2!important;grid-row:1 / span 4!important;align-self:center!important;display:flex!important;width:auto!important;
    min-width:0!important;margin:0!important;gap:5px!important;white-space:normal!important
  }
  #inspection-notice #fileTableBodyTZ .notice-record-row .file-actions .btn-table{
    width:auto!important;min-width:0!important;height:30px!important;min-height:30px!important;padding:0 7px!important;font-size:10.5px!important
  }
  #inspection-notice .notice-more-button{width:30px!important;height:30px!important;min-width:30px!important;padding:0!important}
}

/* 399px 真机复核：覆盖窄屏下仍被业务模块后续规则撑大的组件。 */
@media screen and (max-width:480px){
  #ai-home,#project-info,#supervision-log,#weekly-report,#supervision-report,
  #field-supervision,#meeting-minutes,#inspection-notice,
  #ai-home *,#project-info *,#supervision-log *,#weekly-report *,#supervision-report *,
  #field-supervision *,#meeting-minutes *,#inspection-notice *{box-sizing:border-box}

  /* 手机首页：保留层级，整体字号和卡片密度按 399px 收紧。 */
  #ai-home .s7-cabin-overview{padding:11px!important}
  #ai-home .s7-cabin-overview h1{font-size:15px!important;line-height:1.35!important}
  #ai-home .s7-cabin-overview p{font-size:10.5px!important;line-height:1.45!important}
  #ai-home .s7-brain-grid{gap:6px!important}
  #ai-home .s7-brain-stat{min-height:58px!important;padding:8px!important}
  #ai-home .s7-brain-stat strong{font-size:15px!important;line-height:1.2!important}
  #ai-home .s7-brain-stat span{font-size:10.5px!important;line-height:1.35!important}
  #ai-home .s7-cabin-quick{gap:5px!important;padding:7px!important}
  #ai-home .s7-cabin-quick button{min-height:31px!important;padding:0 4px!important;font-size:10.5px!important;line-height:1.2!important}
  #ai-home .s7-cabin-section{padding:10px!important}
  #ai-home .s7-cabin-title h2{font-size:14px!important;line-height:1.35!important}
  #ai-home .s7-cabin-focus article{padding:9px!important}
  #ai-home .s7-cabin-focus strong{font-size:12px!important;line-height:1.4!important}
  #ai-home .s7-cabin-focus p,#ai-home .s7-focus-tag{font-size:10px!important}
  #ai-home .s7-cabin-focus .btn,#ai-home .s7-cabin-flow .btn,#ai-home .s7-cabin-cap .btn{min-height:30px!important;font-size:10.5px!important}

  /* 底部输入栏：语音在左，文字输入居中，照片和发送在右。 */
  .m-chat{padding:6px 7px calc(6px + env(safe-area-inset-bottom,0px))!important}
  .m-chat-box{gap:4px!important;min-width:0!important;min-height:42px!important;padding:4px!important}
  .m-chat-box>button{flex:0 0 auto!important}
  .m-chat-box>button:first-of-type{order:0!important}
  .m-chat-box>textarea{order:1!important;min-width:0!important;padding:6px 3px!important;font-size:11.5px!important;line-height:1.35!important}
  .m-chat-box>button:nth-of-type(2){order:2!important}
  .m-chat-box>.m-inner-send{order:3!important}
  .m-chat-box>.m-inner-btn{width:36px!important;min-width:36px!important;height:36px!important;min-height:36px!important;padding:0!important}
  .m-chat-box>.m-inner-send{width:48px!important;min-width:48px!important;font-size:11px!important}

  /* 项目管理：项目名称获得完整可用宽度，操作按钮不再把名称挤成竖排。 */
  #project-info .project-manage-panel{padding:10px 8px 14px!important}
  #project-info .project-manage-tabs{width:calc(100% - 12px)!important;margin:0 6px 8px!important}
  #project-info .project-manage-tabs button{height:32px!important;min-height:32px!important;font-size:11px!important}
  #project-info .project-manage-heading h2,#project-info .project-subheading-row .project-subheading{font-size:14px!important}
  #project-info .project-manage-card{
    display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important;
    width:100%!important;min-width:0!important;gap:7px!important;padding:9px!important
  }
  #project-info .project-manage-card-main{
    display:block!important;width:auto!important;min-width:0!important;max-width:100%!important;overflow:hidden!important
  }
  #project-info .project-manage-card-main strong{
    display:block!important;width:100%!important;min-width:0!important;font-size:12.5px!important;line-height:1.4!important;
    writing-mode:horizontal-tb!important;text-orientation:mixed!important;word-break:break-word!important;
    overflow-wrap:anywhere!important;white-space:normal!important
  }
  #project-info .project-manage-card-main>span:not(.project-manage-state){display:block!important;font-size:10.5px!important;line-height:1.35!important}
  #project-info .project-manage-actions{
    display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-end!important;
    width:auto!important;min-width:0!important;max-width:112px!important;gap:4px!important
  }
  #project-info .project-manage-actions .btn,#project-info .project-manage-actions button{
    width:auto!important;min-width:0!important;max-width:108px!important;height:30px!important;min-height:30px!important;
    padding:0 7px!important;font-size:10.5px!important;white-space:nowrap!important
  }
  #project-info .project-profile-card .w-table-opt td:first-child{font-size:11px!important}
  #project-info .project-profile-card .w-input-opt{height:36px!important;min-height:36px!important;font-size:12px!important}

  /* 监理日志目录。 */
  #supervision-log .upgrade-today-card{padding:12px!important}
  #supervision-log .upgrade-today-card strong{font-size:15px!important;line-height:1.35!important}
  #supervision-log .upgrade-today-card span{font-size:10.5px!important}
  #supervision-log .upgrade-year-row{padding:8px 3px!important}
  #supervision-log .upgrade-year-row strong{font-size:12.5px!important}
  #supervision-log .upgrade-year-row span{font-size:10.5px!important}

  /* 周报目录：压缩当前周卡片、归档标题和记录行。 */
  #weekly-report #weekYearView{width:100%!important;max-width:100%!important;padding:10px 8px 14px!important;overflow:hidden!important}
  #weekly-report .archive-quick-card{
    display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important;
    min-height:0!important;margin:0 0 10px!important;padding:10px!important;gap:8px!important
  }
  #weekly-report .archive-quick-card h3{font-size:15px!important;line-height:1.3!important}
  #weekly-report .archive-quick-card p,#weekly-report .archive-quick-meta{font-size:10.5px!important;line-height:1.35!important}
  #weekly-report .archive-quick-actions{width:auto!important}
  #weekly-report .archive-quick-card .btn{width:auto!important;min-height:31px!important;padding:0 9px!important;font-size:10.5px!important}
  #weekly-report .archive-section-head{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important;gap:7px!important}
  #weekly-report .archive-section-head h3{font-size:14px!important;line-height:1.3!important}
  #weekly-report #weekYearSelect{width:104px!important;height:32px!important;font-size:11px!important}
  #weekly-report .weekly-archive-row{min-height:0!important;padding:8px!important;gap:6px!important}
  #weekly-report .archive-record-name{font-size:11.5px!important}
  #weekly-report .archive-status{font-size:10px!important}
  #weekly-report .archive-download-btn{height:30px!important;min-height:30px!important;padding:0 8px!important;font-size:10.5px!important}

  /* 月报 AI：改成半屏底部面板，打开后仍能看到并对照正文。 */
  #supervision-report #monthlyAiPanel{
    position:fixed!important;top:auto!important;right:7px!important;bottom:68px!important;left:7px!important;
    width:auto!important;height:auto!important;max-height:56dvh!important;min-height:0!important;padding:10px!important;
    border-radius:7px!important;overflow:auto!important
  }
  #supervision-report #monthlyAiPanel .doc-ai-panel-head{padding-bottom:7px!important}
  #supervision-report #monthlyAiPanel .doc-ai-panel-head strong{font-size:14px!important}
  #supervision-report #monthlyAiPanel .doc-ai-panel-head span{font-size:10px!important}
  #supervision-report #monthlyAiPanel .doc-ai-panel-head>button{width:28px!important;height:28px!important;font-size:16px!important}
  #supervision-report #monthlyAiPanel .doc-ai-actions{gap:5px!important;margin:8px 0!important}
  #supervision-report #monthlyAiPanel .doc-ai-actions button{min-height:30px!important;padding:0 5px!important;font-size:10.5px!important}
  #supervision-report #monthlyAiPanel label{margin:3px 0 5px!important;font-size:10.5px!important}
  #supervision-report #monthlyAiPanel textarea{height:112px!important;min-height:112px!important;max-height:22dvh!important;padding:8px!important;font-size:11.5px!important;line-height:1.45!important}
  #supervision-report #monthlyAiPanel .doc-ai-apply{height:32px!important;min-height:32px!important;margin-top:6px!important;font-size:11px!important}

  /* 旁站、巡视、安全检查目录：字号、间距和菜单按小屏收紧。 */
  #field-supervision .fs-directory{padding:11px 8px 14px!important}
  #field-supervision .fs-directory-head{margin-bottom:10px!important}
  #field-supervision .fs-directory-head strong{font-size:15px!important;line-height:1.3!important}
  #field-supervision .fs-directory-head>button{height:30px!important;min-height:30px!important;padding:0 8px!important;font-size:10.5px!important}
  #field-supervision .fs-archive-head{gap:6px!important;margin-bottom:8px!important;padding-bottom:8px!important}
  #field-supervision .fs-archive-head h3{font-size:13.5px!important}
  #field-supervision .fs-directory-tools{gap:6px!important}
  #field-supervision .fs-directory-tools select{height:32px!important;font-size:11px!important}
  #field-supervision .fs-record-table,#field-supervision .fs-record-table tbody{gap:7px!important}
  #field-supervision .fs-record-table tr{min-height:0!important;padding:9px!important;gap:3px 7px!important}
  #field-supervision .fs-record-table td{font-size:10.5px!important;line-height:1.4!important}
  #field-supervision .fs-record-table td:first-child{font-size:12px!important;font-weight:650!important}
  #field-supervision .fs-status{padding:2px 7px!important;font-size:10px!important}
  #field-supervision .fs-row-actions>.fs-more>div{
    position:absolute!important;top:34px!important;right:0!important;bottom:auto!important;left:auto!important;
    display:grid!important;grid-template-columns:1fr!important;align-content:start!important;
    width:104px!important;min-width:104px!important;max-width:104px!important;height:max-content!important;
    min-height:0!important;max-height:none!important;padding:4px!important;overflow:hidden!important
  }
  #field-supervision .fs-row-actions>.fs-more>div>button{height:30px!important;min-height:30px!important;padding:0 8px!important;font-size:10.5px!important;line-height:30px!important}

  /* 现场表格：再降一级字号；安全检查签名区必须横向填满整行。 */
  #field-supervision .fs-paper{padding:10px 7px!important}
  #field-supervision .fs-title{font-size:15px!important;letter-spacing:.5px!important}
  #field-supervision .fs-number,#field-supervision .fs-contract{font-size:10.5px!important}
  #field-supervision .fs-table>tbody>tr{grid-template-columns:minmax(74px,27%) minmax(0,1fr)!important}
  #field-supervision .fs-table>tbody>tr>td,#field-supervision .fs-table>tbody>tr>td.fs-label,
  #field-supervision .fs-table input,#field-supervision .fs-table textarea{font-size:10.5px!important;line-height:1.45!important}
  #field-supervision .fs-table>tbody>tr>td{padding:5px!important}
  #field-supervision .fs-safety .fs-table>tbody>tr:nth-child(1),#field-supervision .fs-safety .fs-table>tbody>tr:nth-child(2){grid-template-columns:58px minmax(0,1fr) 52px minmax(0,1fr)!important}
  #field-supervision .fs-safety .fs-table>tbody>tr>td.fs-signature{
    grid-column:1 / -1!important;display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;
    height:auto!important;min-height:88px!important;padding:10px 7px!important;overflow:hidden!important
  }
  #field-supervision .fs-safety .fs-signature label{
    display:grid!important;grid-template-columns:auto minmax(0,1fr)!important;align-items:center!important;
    justify-content:start!important;width:100%!important;min-width:0!important;gap:5px!important;margin:5px 0!important;
    text-align:right!important;white-space:normal!important;font-size:10.5px!important
  }
  #field-supervision .fs-safety .fs-signature input,#field-supervision .fs-safety .fs-signature input[type=date]{width:100%!important;min-width:0!important;max-width:100%!important}
  #field-supervision .fs-patrol .fs-signature label,
  #field-supervision .fs-safety .fs-signature label{
    display:grid!important;grid-template-columns:66px minmax(0,1fr)!important;align-items:center!important;
    justify-content:start!important;width:100%!important;min-width:0!important;gap:5px!important;margin:5px 0!important;
    text-align:left!important;white-space:normal!important;font-size:10.5px!important
  }
  #field-supervision .fs-patrol .fs-signature input,#field-supervision .fs-patrol .fs-signature input[type=date],
  #field-supervision .fs-safety .fs-signature input,#field-supervision .fs-safety .fs-signature input[type=date]{width:100%!important;min-width:0!important;max-width:100%!important}
  #field-supervision .fs-note{font-size:9.5px!important}

  /* 会议纪要目录。 */
  #meeting-minutes .mm-directory-page{padding:10px 7px 14px!important}
  #meeting-minutes .mm-current-card{margin-bottom:10px!important;padding:10px!important}
  #meeting-minutes .mm-current-card h3{font-size:15px!important}
  #meeting-minutes .mm-current-card>.btn{height:31px!important;min-height:31px!important;font-size:10.5px!important}
  #meeting-minutes .record-list-toolbar{margin-bottom:7px!important;padding:5px 0!important}
  #meeting-minutes .record-list-toolbar h3{font-size:13.5px!important}
  #meeting-minutes .mm-month-filter input{width:116px!important;height:31px!important;font-size:11px!important}
  #meeting-minutes .mm-record-row{min-height:0!important;padding:9px!important;gap:3px 7px!important}
  #meeting-minutes .mm-record-row .file-name button{font-size:11.5px!important;line-height:1.4!important}
  #meeting-minutes .mm-record-row .file-date,#meeting-minutes .mm-record-row .file-size{font-size:10px!important}
  #meeting-minutes .mm-list-more{width:30px!important;height:30px!important;font-size:16px!important}
  #meeting-minutes .mm-list-context-menu{width:104px!important;min-width:104px!important;height:max-content!important;min-height:0!important;max-height:none!important;padding:4px!important}
  #meeting-minutes .mm-list-context-menu button{height:30px!important;min-height:30px!important;font-size:10.5px!important}

  /* 会议纪要编辑：移除 330px 固定签字宽度，确保全部文字横向留在表格中。 */
  #meeting-minutes .mm-a4-page,#meeting-minutes .mm-continuation-page,#meeting-minutes .mm-attachment-page{padding:10px 7px!important;overflow:hidden!important}
  #meeting-minutes .mm-template-title{font-size:15px!important;letter-spacing:3px!important}
  #meeting-minutes .mm-number,#meeting-minutes .mm-contract-line{font-size:10.5px!important}
  #meeting-minutes .mm-table{width:100%!important;min-width:0!important;max-width:100%!important;table-layout:fixed!important}
  #meeting-minutes .mm-table,#meeting-minutes .mm-table input,#meeting-minutes .mm-table textarea,#meeting-minutes .mm-editable{font-size:10.5px!important;line-height:1.45!important}
  #meeting-minutes .mm-table th{width:76px!important;padding:5px 4px!important;font-size:10.5px!important;line-height:1.4!important}
  #meeting-minutes .mm-table td{min-width:0!important;padding:5px 4px!important;overflow:hidden!important}
  #meeting-minutes .mm-editable{height:250px!important;min-height:250px!important;max-height:250px!important;padding:8px!important;overflow-wrap:anywhere!important}
  #meeting-minutes .mm-signature{
    display:grid!important;width:100%!important;min-width:0!important;max-width:100%!important;gap:5px!important;
    margin:0!important;padding:8px!important;font-size:10px!important;overflow:hidden!important
  }
  #meeting-minutes .mm-signature label{
    display:grid!important;grid-template-columns:auto minmax(0,1fr)!important;width:100%!important;min-width:0!important;
    gap:4px!important;align-items:center!important;white-space:normal!important;writing-mode:horizontal-tb!important
  }
  #meeting-minutes .mm-signature input,#meeting-minutes .mm-signature input[type=date]{width:100%!important;min-width:0!important;max-width:100%!important}
  #meeting-minutes .mm-notes{font-size:9px!important;line-height:1.45!important}

  /* 通知目录：每条记录改为单列信息，操作区另起一行，避免内容互相挤压。 */
  #inspection-notice #fileListViewTZ{padding:10px 7px 14px!important}
  #inspection-notice .notice-current-card{margin-bottom:10px!important;padding:10px!important;gap:7px!important}
  #inspection-notice .notice-create-actions{gap:6px!important}
  #inspection-notice .notice-create-actions .btn{height:32px!important;min-height:32px!important;font-size:10.5px!important}
  #inspection-notice .notice-archive-heading h3{font-size:14px!important}
  #inspection-notice #noticeMonthFilterTZ{width:110px!important;height:32px!important;font-size:11px!important}
  #inspection-notice .notice-type-tabs button{height:32px!important;min-height:32px!important;font-size:10.5px!important}
  #inspection-notice #fileTableBodyTZ .notice-record-row{
    display:grid!important;grid-template-columns:minmax(0,1fr)!important;min-height:0!important;padding:9px!important;gap:4px!important
  }
  #inspection-notice #fileTableBodyTZ .notice-record-row td,
  #inspection-notice #fileTableBodyTZ .notice-record-row .file-name,
  #inspection-notice #fileTableBodyTZ .notice-record-row .file-date,
  #inspection-notice #fileTableBodyTZ .notice-record-row .file-actions{
    grid-column:1!important;grid-row:auto!important;width:100%!important;min-width:0!important;max-width:100%!important
  }
  #inspection-notice #fileTableBodyTZ .notice-record-row .file-name button{font-size:11.5px!important;line-height:1.4!important}
  #inspection-notice #fileTableBodyTZ .notice-record-row .file-date{font-size:10px!important}
  #inspection-notice #fileTableBodyTZ .notice-record-row .file-actions{justify-content:flex-end!important;margin-top:3px!important}
  #inspection-notice .notice-context-menu{width:104px!important;min-width:104px!important;height:max-content!important;min-height:0!important;max-height:none!important;padding:4px!important}
  #inspection-notice .notice-context-menu button{height:30px!important;min-height:30px!important;font-size:10.5px!important}

  /* 通知编辑：手机端将双列签章区改为上下两段，防止机构名称和日期被裁掉。 */
  #inspection-notice .notice-a4-page{width:100%!important;max-width:100%!important;padding:10px 7px!important;overflow:hidden!important}
  #inspection-notice .notice-form-title{font-size:15px!important;letter-spacing:2px!important}
  #inspection-notice .notice-form-number{font-size:10.5px!important}
  #inspection-notice .notice-form-table,#inspection-notice .notice-form-table input,#inspection-notice .notice-form-table textarea{font-size:10.5px!important;line-height:1.45!important}
  #inspection-notice #normalNoticeFieldsTZ,#inspection-notice #normalNoticeFieldsTZ>tbody,
  #inspection-notice #rectificationFieldsTZ,#inspection-notice #rectificationFieldsTZ>tbody{
    display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;table-layout:auto!important
  }
  #inspection-notice #normalNoticeFieldsTZ>tbody>tr,
  #inspection-notice #rectificationFieldsTZ>tbody>tr{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important}
  #inspection-notice #normalNoticeFieldsTZ>tbody>tr>td,
  #inspection-notice #rectificationFieldsTZ>tbody>tr>td{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important}
  #inspection-notice #normalNoticeFieldsTZ>tbody>tr:last-child,
  #inspection-notice #rectificationFieldsTZ>tbody>tr.notice-signature-row{
    display:block!important;width:100%!important;min-width:0!important
  }
  #inspection-notice #normalNoticeFieldsTZ>tbody>tr:last-child>td,
  #inspection-notice #rectificationFieldsTZ>tbody>tr.notice-signature-row>td{
    display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;height:auto!important;
    min-height:92px!important;padding:10px 8px!important;border:1px solid #000!important;border-top:0!important;
    font-size:10.5px!important;line-height:1.45!important;overflow:hidden!important;white-space:normal!important
  }
  #inspection-notice #normalNoticeFieldsTZ>tbody>tr:last-child>td+td,
  #inspection-notice #rectificationFieldsTZ>tbody>tr.notice-signature-row>td+td{border-top:0!important}
  #inspection-notice #normalNoticeFieldsTZ>tbody>tr:last-child table,
  #inspection-notice #normalNoticeFieldsTZ>tbody>tr:last-child tbody,
  #inspection-notice #normalNoticeFieldsTZ>tbody>tr:last-child tr,
  #inspection-notice #normalNoticeFieldsTZ>tbody>tr:last-child td{width:100%!important;min-width:0!important;max-width:100%!important}
  #inspection-notice #normalNoticeFieldsTZ>tbody>tr:last-child table td{padding:0!important;border:0!important;font-size:10.5px!important}
  #inspection-notice #normalNoticeFieldsTZ[hidden],
  #inspection-notice #rectificationFieldsTZ[hidden]{display:none!important}
  #inspection-notice .notice-form-note{font-size:9.5px!important;line-height:1.45!important}
}

/* 2026-09-13 test13: 现场监管三个模块共用的手机归档与表格修正。 */
@media(max-width:768px){
  /* 归档记录在一行内显示：名称 / 日期 / 状态 / 更多。 */
  #field-supervision .fs-directory{overflow:visible!important}
  #field-supervision .fs-record-table,
  #field-supervision .fs-record-table tbody{display:grid!important;width:100%!important;gap:7px!important}
  #field-supervision .fs-record-table tr{
    display:grid!important;grid-template-columns:minmax(0,1fr) auto auto 32px!important;
    align-items:center!important;width:100%!important;min-height:44px!important;
    padding:6px 7px!important;gap:5px 7px!important
  }
  #field-supervision .fs-record-table td{
    display:block!important;width:auto!important;min-width:0!important;padding:0!important;
    border:0!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important
  }
  #field-supervision .fs-record-table td:first-child{grid-column:1!important;grid-row:1!important}
  #field-supervision .fs-record-table td:nth-child(2){grid-column:2!important;grid-row:1!important}
  #field-supervision .fs-record-table td:nth-child(3){grid-column:3!important;grid-row:1!important}
  #field-supervision .fs-record-table td:last-child{
    grid-column:4!important;grid-row:1!important;overflow:visible!important;align-self:center!important
  }
  #field-supervision .fs-row-actions>.fs-more>div{right:0!important;top:34px!important}

  /* 文号只保留适合年份和流水号的短输入区，避免被通用 input 宽度撑开。 */
  #field-supervision .fs-number{display:flex!important;align-items:center!important;justify-content:center!important;gap:2px!important;white-space:nowrap!important}
  #field-supervision .fs-number input{
    display:inline-block!important;flex:0 0 38px!important;width:38px!important;min-width:38px!important;
    max-width:38px!important;padding:0 2px!important;text-align:center!important
  }
  #field-supervision .fs-number input[data-fs-field="serialNumber"]{
    flex-basis:46px!important;width:46px!important;min-width:46px!important;max-width:46px!important
  }

  /* 保留原表格的 colspan/rowspan 关系；此前转成 Grid 会裁掉正文和签字区域。 */
  #field-supervision .fs-paper{overflow:visible!important}
  #field-supervision .fs-table-scroll{width:100%!important;max-width:100%!important;overflow:visible!important}
  #field-supervision .fs-table{
    display:table!important;width:100%!important;min-width:0!important;max-width:100%!important;
    table-layout:fixed!important;border-collapse:collapse!important
  }
  #field-supervision .fs-table colgroup{display:table-column-group!important}
  #field-supervision .fs-table col{display:table-column!important}
  #field-supervision .fs-table>tbody{display:table-row-group!important;width:auto!important}
  #field-supervision .fs-table>tbody>tr,
  #field-supervision .fs-standing .fs-table>tbody>tr:nth-child(2),
  #field-supervision .fs-safety .fs-table>tbody>tr:nth-child(1),
  #field-supervision .fs-safety .fs-table>tbody>tr:nth-child(2),
  #field-supervision .fs-table>tbody>tr.fs-sign-row{
    display:table-row!important;width:auto!important;border:0!important
  }
  #field-supervision .fs-table>tbody>tr>td,
  #field-supervision .fs-table>tbody>tr>td.fs-label,
  #field-supervision .fs-table>tbody>tr>td[colspan],
  #field-supervision .fs-table>tbody>tr>td.fs-signature,
  #field-supervision .fs-table>tbody>tr.fs-sign-row>td{
    display:table-cell!important;width:auto!important;min-width:0!important;max-width:none!important;
    padding:5px!important;border:1px solid #000!important;overflow:visible!important;
    vertical-align:middle!important;font-size:10.5px!important;line-height:1.45!important
  }
  #field-supervision .fs-table>tbody>tr>td.fs-label{text-align:center!important}
  #field-supervision .fs-table input,
  #field-supervision .fs-table textarea{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;box-sizing:border-box!important}
  #field-supervision .fs-table textarea{overflow:auto!important;resize:vertical!important}
  #field-supervision .fs-table>tbody>tr>td.fs-signature{height:auto!important;min-height:88px!important;padding:10px 7px!important}
}

/* 2026-09-13 test14: 会议纪要、监理通知手机归档和通知正文排版。 */
@media(max-width:768px){
  /* 会议纪要归档：标题、日期、状态、更多保持同一行。 */
  #meeting-minutes .file-list,
  #meeting-minutes .file-list tbody{display:grid!important;width:100%!important;gap:7px!important}
  #meeting-minutes .mm-record-row{
    display:grid!important;grid-template-areas:"name date size action"!important;
    grid-template-columns:minmax(0,1fr) auto auto 32px!important;align-items:center!important;
    width:100%!important;height:auto!important;min-height:44px!important;padding:6px 7px!important;gap:5px 7px!important
  }
  #meeting-minutes .mm-record-row td{
    display:block!important;width:auto!important;min-width:0!important;padding:0!important;border:0!important;
    white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important
  }
  #meeting-minutes .mm-record-row .file-name{grid-area:name!important}
  #meeting-minutes .mm-record-row .file-name button{
    display:block!important;width:100%!important;max-width:100%!important;font-size:11px!important;
    white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important
  }
  #meeting-minutes .mm-record-row .file-date{grid-area:date!important;font-size:9.5px!important}
  #meeting-minutes .mm-record-row .file-size{grid-area:size!important;font-size:9.5px!important}
  #meeting-minutes .mm-record-row .file-actions{grid-area:action!important;overflow:visible!important}

  /* 通知归档：类型、标题、日期、状态和操作压成一条紧凑记录。 */
  #inspection-notice #fileTableBodyTZ .notice-record-row{
    display:grid!important;grid-template-columns:auto minmax(0,1fr) auto auto auto!important;
    align-items:center!important;width:100%!important;min-height:44px!important;padding:6px!important;gap:4px 6px!important
  }
  #inspection-notice #fileTableBodyTZ .notice-record-row>td,
  #inspection-notice #fileTableBodyTZ .notice-record-row .file-name,
  #inspection-notice #fileTableBodyTZ .notice-record-row .file-date,
  #inspection-notice #fileTableBodyTZ .notice-record-row .file-actions{
    grid-column:auto!important;grid-row:1!important;display:block!important;width:auto!important;min-width:0!important;
    max-width:none!important;margin:0!important;padding:0!important;border:0!important;
    white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important
  }
  #inspection-notice .notice-type-badge{min-width:0!important;padding:2px 5px!important;font-size:9.5px!important}
  #inspection-notice #fileTableBodyTZ .notice-record-row .file-name button{
    display:block!important;width:100%!important;max-width:100%!important;font-size:10.5px!important;
    white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important
  }
  #inspection-notice #fileTableBodyTZ .notice-record-row .file-date,
  #inspection-notice #fileTableBodyTZ .notice-record-row .notice-status{font-size:9.5px!important}
  #inspection-notice #fileTableBodyTZ .notice-record-row .file-actions{
    display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:4px!important;overflow:visible!important
  }
  #inspection-notice #fileTableBodyTZ .notice-record-row .file-actions .btn-table{
    width:auto!important;min-width:0!important;height:28px!important;min-height:28px!important;padding:0 6px!important;font-size:9.5px!important
  }
  #inspection-notice .notice-more-button{width:28px!important;min-width:28px!important;height:28px!important;padding:0!important}

  /* 通知正文前三项保持模板的左对齐关系。 */
  #inspection-notice #normalNoticeFieldsTZ>tbody>tr:nth-child(1)>td{
    display:flex!important;align-items:center!important;gap:4px!important;text-align:left!important
  }
  #inspection-notice #normalNoticeFieldsTZ>tbody>tr:nth-child(1)>td>strong{
    display:inline-block!important;flex:0 0 auto!important;width:auto!important;text-align:left!important;white-space:nowrap!important
  }
  #inspection-notice #normalNoticeFieldsTZ #autoContractorNameTZ{
    display:block!important;flex:1 1 auto!important;width:auto!important;min-width:0!important;margin:0!important;text-align:left!important
  }
  #inspection-notice #normalNoticeFieldsTZ>tbody>tr:nth-child(2)>td,
  #inspection-notice #normalNoticeFieldsTZ>tbody>tr:nth-child(3)>td{text-align:left!important}
  #inspection-notice #normalNoticeFieldsTZ>tbody>tr:nth-child(2)>td>strong,
  #inspection-notice #normalNoticeFieldsTZ>tbody>tr:nth-child(3)>td>strong{
    display:block!important;width:100%!important;text-align:left!important
  }
}

