/* Tablet geometry only; retain every module's current visual tokens and actions. */
@layer wncTabletLayout {
 @media(min-width:769px) and (max-width:1366px) {
  #wnc-global-shell-v2 .header-v2{gap:10px!important;padding-inline:16px!important;min-width:0!important}
  #wnc-global-shell-v2 .global-search{min-width:40px!important;flex:1 1 160px!important;max-width:360px!important}
  #wnc-global-shell-v2 .header-right-v2{gap:8px!important;min-width:0!important}
  #wnc-global-shell-v2 .company-picker{min-width:130px!important;max-width:180px!important;flex:0 1 180px!important}
  #wnc-global-shell-v2 .company-picker select{min-width:0!important;text-overflow:ellipsis!important}
  #wnc-global-shell-v2 .account-button{min-width:0!important;max-width:138px!important}
  #wnc-global-shell-v2 .account-button>div{min-width:0!important}
  #wnc-global-shell-v2 .account-button strong{max-width:68px!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
 }
 @media(min-width:769px) and (max-width:1099px) {
  #wnc-global-shell-v2 .global-search :is(span,kbd,em){display:none!important}
  #wnc-global-shell-v2 .global-search{flex:0 0 40px!important;width:40px!important;padding:0!important;justify-content:center!important}
  #wnc-global-shell-v2 .header-right-v2{flex:1 1 auto!important;justify-content:flex-end!important}
 }
 @media(min-width:600px) and (max-width:1366px) {
  #settings-overview-v1 :is(.stats,.tabs),#renovation-root :is(.reno-stats,.rov-stats,.rli-stats,.rac-stats){display:flex!important;flex-wrap:nowrap!important;gap:12px!important;max-width:100%!important;overflow-x:auto!important;overflow-y:hidden!important;padding-bottom:5px!important;-webkit-overflow-scrolling:touch}
  #settings-overview-v1 .stats>.stat,#renovation-root :is(.reno-stats,.rov-stats,.rli-stats,.rac-stats)>*{flex:0 0 188px!important;min-width:188px!important;max-width:188px!important;box-sizing:border-box!important}
  #settings-overview-v1 .tabs>.tab{flex:0 0 auto!important}
  #settings-overview-v1 :is(.scope-control,.panel-heading,.toolbar,.sbr-toolbar,.compare-controls),#renovation-root :is(.reno-filters,.rov-filterbar,.reno-toolbar,.rli-searchbar){flex-wrap:wrap!important;gap:8px!important;min-width:0!important;max-width:100%!important}
  #settings-overview-v1 .scope-control select{min-width:0!important;max-width:100%!important}
  #settings-overview-v1 :is(.workspace,.sbr-workspace,.page-column,.panel,.module-panel,.sbr-list),#renovation-root :is(.reno-card,.rov-panel,.rli-panel){min-width:0!important}
  #settings-overview-v1 :is(.table-wrap,.record-table-wrap,.sbr-table-wrap),#renovation-root :is(.reno-table-wrap,.rli-table-wrap){max-width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch}
  #settings-overview-v1-dialog :is(.modal,.drawer),#wnc-ai-settings-dialog :is(.modal,.drawer),#wnc-security-dialog .modal,#wnc-records-dialog .modal,#wnc-notifications-dialog .modal{max-width:calc(100vw - 32px)!important;max-height:calc(100dvh - 32px)!important}
  #renovation-root :is(.reno-grid,.rov-project-grid){grid-template-columns:repeat(2,minmax(0,1fr))!important}
  #renovation-root .rli-document-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  #renovation-root :is(.reno-bom-quantities,.rli-searchbar){min-width:0!important}
 }
 @media(min-width:769px) and (max-width:1099px) {
  #settings-overview-v1 .lower-grid{grid-template-columns:minmax(0,1fr)!important}
  #settings-overview-v1 :is(.workspace,.sbr-workspace),#wnc-dictionary-live .wd-wrap,#wnc-tenant-brand-live .wb-grid{grid-template-columns:minmax(0,1fr)!important}
  #settings-overview-v1 :is(.module-nav,.sbr-side),#wnc-dictionary-live .wd-side{position:static!important;min-height:0!important;max-width:100%!important}
  #settings-overview-v1 .module-nav :is(nav,.nav-group),#wnc-business-live .sbr-nav,#wnc-dictionary-live .wd-side{display:flex!important;flex-wrap:wrap!important;gap:6px!important}
  #settings-overview-v1 .module-nav button,#wnc-business-live .sbr-nav button,#wnc-dictionary-live .wd-side-item{width:auto!important;flex:0 0 auto!important;min-height:40px!important}
  #settings-overview-v1 :is(.overview-grid,.split,.bottom-grid,.sbr-bottom),#wnc-tenant-brand-live .wb-grid{grid-template-columns:minmax(0,1fr)!important}
  #settings-overview-v1 :is(.agent-grid,.channel-cards,.quick-grid,.sbr-quick,.three,.four){grid-template-columns:repeat(2,minmax(0,1fr))!important}
  #settings-overview-v1 :is(.phone-panel,.preview-panel),#wnc-tenant-brand-live .wb-side{position:static!important;width:auto!important;max-width:100%!important}
  #wnc-notifications-live .preview-panel{max-width:320px!important}
  #wnc-records-live .compare-controls{grid-template-columns:1fr 1fr!important}
  #wnc-records-live .detail-grid{grid-template-columns:minmax(0,1fr)!important}
  #wnc-records-live .risk-cards{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  #renovation-root :is(.rov-analysis-grid,.rov-bottom-grid,.rli-layout,.rli-detail-layout){grid-template-columns:minmax(0,1fr)!important}
  #renovation-root .reno-bom-quantities{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 }
 @media(min-width:600px) and (max-width:768px) {
  #renovation-root :is(.rov-analysis-grid,.rov-bottom-grid){grid-template-columns:minmax(0,1fr)!important}
 }
}

/* Finance / Funds tablet supplement, audited against 2026-10-27 production.
   Layout only. Native permissions, values, handlers and UI v2 colors remain owned
   by their current modules. All rules are bounded to the top-document width.
   Current audited finance/funds renderers use native DOM; no iframe rules here. */
@layer wncTabletLayout {
 @media (min-width:600px) and (max-width:1366px) {
  :is(#finance-container,#wallet-container,#finance-tab-content,#wallet-tab-content,#finance-shell-v2) {min-width:0!important;max-width:100%!important;box-sizing:border-box!important}
  #finance-container :is(#finance-primary-nav,.finance-tabs),
  #wallet-container :is(.funds-main-tabs,.fov-tabs,.center-tabs,.fao-tabs),
  #finance-tab-content :is(.sv-nav,.sv-record-tabs,.pv-subtabs,.fr-tabs),
  #wallet-container :is(.fpr-tabs,.fps-tabs) {
   display:flex!important;flex-wrap:nowrap!important;max-width:100%!important;overflow-x:auto!important;overflow-y:hidden!important;white-space:nowrap!important;-webkit-overflow-scrolling:touch;
  }
  #finance-container :is(#finance-primary-nav,.finance-tabs)>.finance-tab-btn,
  #wallet-container :is(.funds-main-tabs,.fov-tabs,.center-tabs,.fao-tabs,.fpr-tabs,.fps-tabs)>button,
  #finance-tab-content :is(.sv-nav,.sv-record-tabs,.pv-subtabs)>button {flex:0 0 auto!important;min-height:40px!important;white-space:nowrap!important}

  /* Existing top statistic containers only: one scroll row, no card or amount rewrite. */
  #finance-container :is(.bv-kpis,.fpv2-kpis,.rv-kpis,.f4r-kpis,.sv-kpis,.pv-kpis,.fr-primary-kpis,.rc-kpis,.p7-kpis,.p6-kpis,.p8-kpis),
  #finance-container.fo-overview-v2 :is(.mg-grid,.f2-ov-kpis),
  #wallet-container :is(.fo3-kpis,.fac-stats,.fao-stats,.fs-stats,.fon-stats,.faw-stats) {
   display:flex!important;flex-wrap:nowrap!important;gap:12px!important;max-width:100%!important;overflow-x:auto!important;overflow-y:hidden!important;padding-bottom:6px!important;overscroll-behavior-x:contain!important;-webkit-overflow-scrolling:touch;
  }
  #finance-container :is(.bv-kpis,.fpv2-kpis,.rv-kpis,.f4r-kpis,.sv-kpis,.pv-kpis,.fr-primary-kpis,.rc-kpis,.p7-kpis,.p6-kpis,.p8-kpis)>*,
  #finance-container.fo-overview-v2 :is(.mg-grid,.f2-ov-kpis)>*,
  #wallet-container :is(.fo3-kpis,.fac-stats,.fao-stats,.fs-stats,.fon-stats,.faw-stats)>* {flex:0 0 190px!important;min-width:190px!important;box-sizing:border-box!important}

  /* Bills: the six resource fields and five conditions retain their existing order. */
  #finance-container.bills-reference-pc :is(.bv-resource-row,.bv-condition-row) {grid-template-columns:repeat(3,minmax(0,1fr))!important}
  #finance-container.bills-reference-pc :is(.f6-search-row,.bv-date-row) {flex-wrap:wrap!important;min-width:0!important}
  #finance-container.bills-reference-pc .f2-status-bar {flex-wrap:nowrap!important;max-width:100%!important;overflow-x:auto!important;overflow-y:hidden!important}
  #finance-container.bills-reference-pc .f2-status-chip {flex:0 0 auto!important;min-height:40px!important}
  #finance-container.bills-reference-pc .fv2-table-wrap {max-width:100%!important;overflow-x:auto!important;min-width:0!important;-webkit-overflow-scrolling:touch}

  /* Cashflow: wrap only the real query controls, keep the financial table intact. */
  #finance-container.finance-payments-pc-v2 :is(.fpv2-search-row,.fpv2-mode-tabs) {flex-wrap:wrap!important;min-width:0!important;gap:8px!important}
  #finance-container.finance-payments-pc-v2 :is(.fpv2-native-controls,.f-advanced-grid) {grid-template-columns:repeat(3,minmax(0,1fr))!important}
  #finance-container.finance-payments-pc-v2 :is(.fpv2-table-wrap,.f3-table-wrap) {min-width:0!important;max-width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch}

  /* Settlement / property accounting use their current sidebar and detail panels. */
  #finance-container .sv-filter,
  #finance-container .pv-filterbar {flex-wrap:wrap!important;min-width:0!important;gap:8px!important}
  #finance-container .sv-search {min-width:160px!important;flex:1 1 180px!important}
  #finance-container .sv-table {min-width:0!important;max-width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch}
  #finance-container .pv-table {min-width:0!important;max-width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch}
  #finance-container .pv-table>table {min-width:780px!important}
  #finance-container :is(.pv-right,.sv-card,.rc-workspace,.rc-panel,.rx-panel,.fr-panel) {min-width:0!important;max-width:100%!important}
  #finance-container :is(.p6-filter-grid,.p6-fadv-grid) {grid-template-columns:repeat(2,minmax(0,1fr))!important}
  #finance-container .pv-root .p6-fadv-grid {grid-template-columns:repeat(2,minmax(0,1fr))!important}

  /* Reconciliation has fixed 370px evidence columns; collapse the known workspace only. */
  #finance-container.rc-finance :is(.rc-layout,.rf-ai-layout) {grid-template-columns:minmax(0,1fr)!important}
  #finance-container.rc-finance :is(.rf-history-filters,.rc-toolbar,.rc-head) {flex-wrap:wrap!important;min-width:0!important}
  #finance-container.rc-finance :is(.rc-table-wrap,.rc-table-scroll,.rc-grid-scroll,.rc-history-scroll,.rf-history-table) {min-width:0!important;max-width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch}

  /* Reports / recycle: preserve the native data columns inside their own scrollers. */
  #finance-container #p8-root.fr-root .fr-toolbar {grid-template-columns:minmax(130px,.8fr) minmax(0,1.5fr) auto auto!important}
  #finance-container #p8-root :is(.fr-table-wrap,.fr-report-appendix) {max-width:100%!important;min-width:0!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch}
  #finance-container .rx-toolbar {flex-wrap:wrap!important;min-width:0!important}
  #finance-container .rx-root :is(.rx-table-wrap,.rx-table-scroll) {max-width:100%!important;min-width:0!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch}

  /* New funds overview / account / payment adapters share these real query classes. */
  #wallet-container :is(.fo3-root,.ac2-root,.fpr-root,.fl2-root,.fpo-root,.rc2-root,.fps1-root) {min-width:0!important;max-width:100%!important}
  #wallet-container :is(.fo3-bar,.fpr-bar,.fo3-advp,.fo3-f,.fo3-t,.fao-heading,.fao-heading-actions) {flex-wrap:wrap!important;min-width:0!important;max-width:100%!important}
  #wallet-container .fo3-bar .fo3-q {min-width:160px!important;flex:1 1 200px!important}
  #wallet-container :is(.fo3-dates,.fo3-rf) {flex-wrap:wrap!important;min-width:0!important}
  #wallet-container .fo3-dates input {min-width:0!important;max-width:100%!important}
  #wallet-container :is(.fo3-tw,.fc-table-wrap,.fl-table-wrap,.po-table-wrap,.rc-table-wrap,.fao-table-wrap) {min-width:0!important;max-width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch}
  #wallet-container :is(.fao-filter-grid,.fao-base-fields) {grid-template-columns:repeat(3,minmax(0,1fr))!important}
  #wallet-container :is(.faw-fields,.po-filter-grid,.po-advanced,.fpr-expanded-filter) {grid-template-columns:repeat(3,minmax(0,1fr))!important}
  #wallet-container :is(.fao-filter-grid,.fao-base-fields,.faw-fields) :is(input,select,label) {min-width:0!important;max-width:100%!important;box-sizing:border-box!important}
  #wallet-container .rc-advanced .rc-filter-fields {grid-template-columns:repeat(3,minmax(0,1fr))!important}
  #wallet-container .ac2-mgrid {grid-template-columns:repeat(auto-fill,minmax(min(100%,260px),1fr))!important}
  #wallet-container .fao-distributions {grid-template-columns:repeat(2,minmax(0,1fr))!important}
  #wallet-container .fao-health {grid-template-columns:repeat(3,minmax(0,1fr))!important}
  #wallet-container .fao-lower {grid-template-columns:minmax(0,1fr)!important}

  /* Portal dialogs are restricted to their owning active center. */
  body:has(#page-finance.active) .fcu-dialog,
  body:has(#page-wallet.active) :is(.fao-dialog,.fs-dialog,.fon-dialog,.fo3-modal) {max-width:calc(100vw - 32px)!important;max-height:calc(100dvh - 32px)!important;box-sizing:border-box!important}
  body:has(#page-finance.active) :is(.fcu-dialog-foot,.sv-dialog>footer,.rx-modal>footer),
  body:has(#page-wallet.active) :is(.fo3-modal footer,.fpr-dwp footer,.fl2-dwp footer,.rc2-dwp footer) {flex-wrap:wrap!important;gap:8px!important;padding-bottom:max(12px,env(safe-area-inset-bottom))!important}
  body:has(#page-wallet.active) :is(.fpr-dwp,.fl2-dwp,.rc2-dwp) {max-width:100vw!important;max-height:100dvh!important;box-sizing:border-box!important}
 }
 @media (min-width:600px) and (max-width:1099px) {
  #finance-container.fo-overview-v2 :is(.fo-row,.fo-row.fo-equal),
  #finance-container .finance-payments-pc-v2 .fpv2-content-grid,
  #finance-container.finance-payments-pc-v2 .fpv2-content-grid,
  #finance-container :is(.sv-layout,.sv-bottom,.pv-layout,.pv-bottom,.pv-utility-grid,.u-chart-row,.u-metrics-row),
  #finance-container #p8-root :is(.fr-grid,.fr-risk-report),
  #finance-container .rx-root :is(.rx-layout,.rx-heading),
  #wallet-container :is(.fo3-grid,.fc-dashboard-grid,.ac2-two,.fs-layout.with-detail,.fon-work.has-detail,.faw-work.has-detail) {grid-template-columns:minmax(0,1fr)!important}
  #finance-container #p8-root.fr-root .fr-toolbar {grid-template-columns:repeat(2,minmax(0,1fr))!important}
  #finance-container.bills-reference-pc :is(.bv-resource-row,.bv-condition-row),
  #finance-container.finance-payments-pc-v2 :is(.fpv2-native-controls,.f-advanced-grid),
  #wallet-container :is(.fao-filter-grid,.fao-base-fields,.faw-fields,.po-filter-grid,.po-advanced,.fpr-expanded-filter),
  #wallet-container .rc-advanced .rc-filter-fields {grid-template-columns:repeat(2,minmax(0,1fr))!important}
  #finance-container.fo-overview-v2 #f2c-fund {grid-template-columns:minmax(0,1fr)!important}
  #finance-container .rx-root .rx-toolbar {display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}
  #wallet-container :is(.fao-health,.ac2-flow ol) {grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body:has(#page-finance.active) .sv-formula {grid-template-columns:repeat(3,minmax(0,1fr))!important}
  body:has(#page-wallet.active) .fpr-bl>div {grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:8px!important}
 }
 @media (min-width:1100px) and (max-width:1366px) {
  #finance-container :is(.sv-layout,.pv-layout) {grid-template-columns:220px minmax(0,1fr)!important}
  #finance-container :is(.fpv2-content-grid,.fr-grid) {grid-template-columns:minmax(0,1fr)!important}
 }
 @media (min-width:600px) and (max-width:1366px) and (pointer:coarse) {
  #finance-container :is(.finance-tab-btn,.sv-btn,.pv-btn,.fr-btn,.bv-btn,.fpv2-button),
  #wallet-container :is(.fo3-btn,.fo3-adv,.fo3-ok,.fo3-link,.fpr-go,.ac2-btn) {min-height:40px!important;touch-action:manipulation}
 }
}

/* 20261027: remaining centers. Presentation only; all rules require top-level
   viewport 600–1366px. These centers render in the main document. The contract
   document iframe is intentionally untouched. Keep native colors, typography,
   data visibility, permissions, actions and DOM order. */
@layer wncTabletLayout {
  @media (min-width:600px) and (max-width:1366px) {
    :is(#org-container,#permissions-container,#contracts-container,#mall-container,#devices-container,#nw-root) {
      min-width:0!important;max-width:100%;box-sizing:border-box;
    }

    /* Single-row tablet summaries; card internals retain the latest UI theme. */
    :is(#org-container,#permissions-container) :is(.ov-stats,.orgu-summary),
    #contracts-container :is(.contracts-stats-row,.ccv-stats),
    #devices-container.dm-unified .dm-unified-stats,
    #mall-container :is(.mpm-stats,.msm-stats,.mom-stats,.mas-stats,.man-stats,.mse-stats),
    #nw-root .kpis {
      display:flex!important;flex-wrap:nowrap!important;grid-template-columns:none!important;
      overflow-x:auto!important;overflow-y:hidden!important;max-width:100%!important;
      height:auto!important;min-height:0!important;gap:12px!important;align-items:stretch!important;
      padding-bottom:3px!important;scrollbar-width:thin;-webkit-overflow-scrolling:touch;
    }
    :is(#org-container,#permissions-container) :is(.ov-stats,.orgu-summary) > *,
    #contracts-container :is(.contracts-stats-row,.ccv-stats) > *,
    #mall-container :is(.mpm-stats,.msm-stats,.mom-stats,.mas-stats,.man-stats,.mse-stats) > *,
    #nw-root .kpis > .kpi {
      flex:0 0 188px!important;width:188px!important;min-width:188px!important;
      max-width:188px!important;box-sizing:border-box!important;
    }
    #devices-container.dm-unified .dm-unified-stats > .dm-unified-stat:not([hidden]) {
      display:flex!important;flex:0 0 188px!important;width:188px!important;
      min-width:188px!important;max-width:188px!important;height:88px!important;
      min-height:88px!important;max-height:88px!important;align-items:center!important;
      text-align:left!important;box-sizing:border-box!important;
    }
    #devices-container.dm-unified .dm-unified-stat > span {flex-shrink:0!important}
    #devices-container.dm-unified .dm-unified-stat > div {min-width:0!important}

    /* Top and second-level tabs scroll locally; never shrink individual labels. */
    :is(#org-container,#permissions-container) :is(.org-tab-bar,.ov-tabs,.perm-subtabs,.org-member-subtabs,.mem-sub),
    #contracts-container :is(.ctv-category-nav,.ccv-config-tabs),
    #mall-container .mh-merchant-tabs,
    #devices-container .dm-tabs,
    #nw-root :is(.platform-tabs,.subtabs) {
      display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;
      overflow-y:hidden!important;max-width:100%!important;min-width:0!important;
      scrollbar-width:thin;-webkit-overflow-scrolling:touch;
    }
    :is(#org-container,#permissions-container) :is(.org-tab-bar,.ov-tabs,.perm-subtabs,.org-member-subtabs,.mem-sub) > *,
    #contracts-container :is(.ctv-category-nav,.ccv-config-tabs) > *,
    #mall-container .mh-merchant-tabs > *,#devices-container .dm-tabs > *,
    #nw-root :is(.platform-tabs,.subtabs) > * {flex-shrink:0!important;white-space:nowrap!important}

    /* Existing local table scrollers keep their native columns and interactions. */
    #contracts-container :is(.cs-table-wrap,.cce-table-wrap,.ccv-table-wrap),
    :is(#org-container,#permissions-container) :is(.ov-table-wrap,.org-table-wrap,.orgu-table-wrap),
    #mall-container :is(.mpm-table-wrap,.msm-table-wrap,.mom-table-wrap,.mas-table-wrap,.mse-table-wrap),
    #devices-container :is(.dv-table-wrap,.dln-table-wrap,.dmw-table-wrap,.dwa-table-wrap,.dac-table-wrap,.dai-table-wrap),
    #nw-root :is(.am-table-wrap,.tl-table-wrap,.pc-table-wrap,.na-table-wrap) {
      min-width:0!important;max-width:100%!important;overflow-x:auto!important;
      -webkit-overflow-scrolling:touch;
    }

    /* Filter groups can wrap without moving primary actions off-screen. */
    #contracts-container :is(.ctv-compact-filters,.contracts-search-row,.cce-toolbar,.cce-help),
    #mall-container :is(.man-toolbar,.man-actions,.mse-toolbar,.mse-actions),
    #devices-container :is(.dm-unified-search-row,.dai-topline,.dai-controls,.dwa-topbar),
    #nw-root :is(.filter-line,.scope-line,.heading-actions,.chart-toolbar,.card-head) {
      flex-wrap:wrap!important;min-width:0!important;height:auto!important;
    }
    #devices-container .dm-unified-search-row {row-gap:8px!important}
    #devices-container .dm-unified-search {height:auto!important}
    #devices-container :is(.dv-filter,.dai-fields,.dln-fields,.dmw-fields,.dwa-fields,.dac-fields) {
      grid-template-columns:repeat(3,minmax(0,1fr))!important;
    }
    #nw-root :is(.filter-line,.scope-line) > * {max-width:100%;box-sizing:border-box}
    #nw-root .filter-line label {min-width:0!important;flex:1 1 180px!important}
    #nw-root .filter-line select {min-width:0!important;max-width:100%!important}
    #nw-root :is(.staff-row,.date-range,.pc-dates,.tl-dates,.na-dates) {min-width:0!important;max-width:100%!important}

    /* A fixed-width account toolbar must not consume the device tab strip. */
    #devices-container.dm-unified .dm-wrap:has(.dm-unified-account-actions) > .dm-tabs,
    #devices-container.dm-unified .dm-wrap:has(.dwa-topbar) > .dm-tabs {width:100%!important}
    #devices-container.dm-unified .dm-unified-account-actions {position:static!important;justify-content:flex-end!important}
  }

  @media (min-width:769px) and (max-width:1366px) {
    /* Organization: the native tree is flex-basis:300px. Grid-template alone
       cannot resize it, so define the existing two panels as a bounded grid. */
    :is(#org-container,#permissions-container) :is(.orgc3-layout,.ov-role-layout,.ov-team-layout) {
      display:grid!important;grid-template-columns:240px minmax(0,1fr)!important;
      min-width:0!important;align-items:start!important;
    }
    :is(#org-container,#permissions-container) :is(.orgc3-tree,.ov-role-list,.ov-team-list) {
      width:auto!important;max-width:100%!important;min-width:0!important;
    }
    :is(#org-container,#permissions-container) :is(.orgc3-detail,.ov-role-detail,.ov-team-detail,.orgc3-co) {
      min-width:0!important;max-width:100%!important;box-sizing:border-box;
    }
    #mall-container :is(.mh-main,.mh-aside,.mpm-main,.mpm-aside,.msm-main,.msm-aside,.mom-main,.mom-aside,.mas-main,.mas-aside,.mst-main,.mst-aside,.mse-main,.mse-aside) {min-width:0!important;max-width:100%!important}
    #mall-container :is(.mpm-toolbar,.msm-toolbar,.mom-toolbar,.mas-toolbar) {
      grid-template-columns:minmax(160px,1fr) minmax(100px,130px) minmax(100px,130px) auto!important;
    }
    #mall-container :is(.mpm-toolbar,.msm-toolbar,.mom-toolbar,.mas-toolbar) > * {min-width:0!important;max-width:100%!important}
    #nw-root :is(.nc-layout,.pc-layout,.am-layout,.tl-layout,.na-dashboard),
    #nw-root :is(.nc-library,.nc-assets,.nc-generator,.nc-preview,.nc-tools,.pc-left,.pc-right,.am-left,.am-main,.am-right,.tl-main,.tl-right) {min-width:0!important;max-width:100%!important}
    #nw-root :is(.first-row,.second-row,.last-row) {grid-template-columns:repeat(auto-fit,minmax(280px,1fr))!important}
    #nw-root .np-room-grid:not(.list-view) {grid-template-columns:repeat(auto-fill,minmax(240px,1fr))!important}
    #nw-root :is(.pc-right,.am-right,.tl-right) {grid-template-columns:repeat(auto-fit,minmax(240px,1fr))!important}
  }

  @media (min-width:600px) and (max-width:1099px) {
    /* The merchant center keeps all original sections; narrow tablets move the
       existing aside below the primary panel instead of squeezing its table. */
    #mall-container :is(.mh-layout,.mpm-layout,.msm-layout,.mom-layout,.mas-layout,.mst-layout,.mse-layout) {
      display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:12px!important;
    }
    #mall-container :is(.mh-aside,.mpm-aside,.msm-aside,.mom-aside,.mas-aside,.mst-aside,.mse-aside) {
      display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
      min-width:0!important;max-width:100%!important;
    }
    #mall-container .mh-hero.wnc-uiv2-mh .mh-hero-copy {grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto!important}
    #mall-container .mh-hero.wnc-uiv2-mh .mh-benefits {grid-column:1!important;grid-row:auto!important;margin-top:10px!important}
    #mall-container .mh-type-grid {grid-template-columns:repeat(2,minmax(0,1fr))!important}
    #mall-container :is(.mpm-toolbar,.msm-toolbar,.mom-toolbar,.mas-toolbar) {grid-template-columns:repeat(2,minmax(0,1fr))!important}
    #mall-container :is(.mpm-search,.msm-search,.mom-search,.mas-search) {grid-column:1/-1!important;min-width:0!important}
    #devices-container.dm-unified :is(.dm-unified-charts,.dai-bottom-grid) {grid-template-columns:repeat(2,minmax(0,1fr))!important}
    #devices-container.dm-unified :is(.dm-unified-charts,.dai-bottom-grid) > :first-child {grid-column:1/-1!important}
    #contracts-container .ccv-quick-grid {grid-template-columns:repeat(3,minmax(0,1fr))!important}
    #contracts-container .ccv-template-layout {grid-template-columns:210px minmax(0,1fr)!important}
    #contracts-container .ccs-bottom {grid-template-columns:minmax(0,1fr)!important}
    #nw-root .nc-layout {grid-template-columns:190px minmax(0,1fr)!important}
    #nw-root .nc-library {grid-column:1!important;grid-row:1/4!important}
    #nw-root .nc-assets {grid-column:2!important;grid-row:1!important}
    #nw-root .nc-generator {grid-column:2!important;grid-row:2!important}
    #nw-root .nc-preview {grid-column:2!important;grid-row:3!important}
    #nw-root .nc-tools {grid-column:1/-1!important;grid-row:4!important}
    #nw-root .pc-layout {grid-template-columns:160px minmax(0,1fr)!important}
    #nw-root .am-work-columns {grid-template-columns:150px minmax(0,1fr)!important}
  }

  @media (min-width:600px) and (max-width:999px) {
    :is(#org-container,#permissions-container) :is(.orgc3-layout,.ov-role-layout,.ov-team-layout) {grid-template-columns:minmax(0,1fr)!important}
    :is(#org-container,#permissions-container) .orgc3-treelist {max-height:240px!important;overflow:auto!important}
    #contracts-container .ctv-configuration-layout {grid-template-columns:170px minmax(0,1fr)!important}
    #contracts-container .ccv-template-layout {grid-template-columns:minmax(0,1fr)!important}
    #contracts-container .ccv-template-list {max-height:320px;overflow:auto}
    #nw-root :is(.am-layout,.tl-layout,.na-dashboard) {grid-template-columns:minmax(0,1fr)!important}
    #nw-root .np-results {grid-template-columns:minmax(0,1fr)!important}
  }

  @media (min-width:600px) and (max-width:768px) {
    /* Keep the current compact/mobile body format in split view. Only summaries
       and multi-column analysis panels need tablet geometry here. */
    #nw-root .nc-layout {grid-template-columns:minmax(0,1fr)!important}
    #nw-root :is(.nc-library,.nc-assets,.nc-generator,.nc-preview,.nc-tools) {grid-column:1!important;grid-row:auto!important}
    #nw-root .nc-library {min-height:0!important;max-height:300px!important;overflow:auto!important}
    #devices-container :is(.dv-filter,.dai-fields,.dln-fields,.dmw-fields,.dwa-fields,.dac-fields) {grid-template-columns:repeat(2,minmax(0,1fr))!important}
    #contracts-container .ctv-configuration-layout {grid-template-columns:minmax(0,1fr)!important}
  }

  @media (min-width:600px) and (max-width:1366px) and (pointer:coarse) {
    :is(#org-container,#permissions-container) :is(.orgc3-op,.orgc3-card .ops) {opacity:1!important}
    :is(#org-container,#permissions-container) :is(.org-tab-item,.perm-subtab,.org-action-btn,.member-action-btn),
    #contracts-container :is(.ctv-status-filter,.ccv-config-tabs button),
    #mall-container :is(.mh-tab,.mpm-btn,.msm-btn,.mom-btn,.mas-btn,.mse-btn),
    #devices-container :is(.dm-tab,.dm-btn,.dln-btn,.dmw-btn,.dwa-btn,.dac-btn),
    #nw-root :is(.pt-tab,.primary,.secondary) {min-height:44px!important;touch-action:manipulation}
  }
}

/* 20261027 iPad cockpit layout. Must be injected inside each same-origin
   cockpit frame. The top document bridge owns the gate: compact=600–1099,
   wide=1100–1366. Frame width alone must never enable these rules.
   No chart series, permissions, routing, colors or typography are changed. */
@layer wncTabletLayout {
  html[data-wnc-ipad-frame],html[data-wnc-ipad-frame] body,
  html[data-wnc-ipad-frame] :is(#root,#cockpit-shell,#cockpit-panel,main) {
    min-width:0!important;max-width:100%!important;box-sizing:border-box!important;
  }
  html[data-wnc-ipad-frame] main:is(.expansion-page,.pc-content,.production-page,.app) {
    margin-left:0!important;width:auto!important;
  }
  html[data-wnc-ipad-frame] :is(.shell-heading,.page-heading,.heading-title,.title-line,.heading-filters,.scope-filters,.global-controls,.head-actions) {
    min-width:0!important;max-width:100%!important;flex-wrap:wrap!important;
    height:auto!important;
  }
  html[data-wnc-ipad-frame] .shell-heading p {
    white-space:normal!important;min-width:0!important;
  }

  /* Keep the shell's main navigation and each leaf's sub-navigation intact.
     Do not set display on leaf primary nav: the shell intentionally hides it. */
  html[data-wnc-ipad-frame] :is(.boss-tabs,.platform-tabs,.primary-tabs) {
    flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important;
    max-width:100%!important;min-width:0!important;scrollbar-width:thin;
  }
  html[data-wnc-ipad-frame] :is(.boss-tabs,.platform-tabs,.primary-tabs) > * {
    flex-shrink:0!important;white-space:nowrap!important;
  }
  html[data-wnc-ipad-frame] :is(.business-tabs,.secondary-tabs) {
    display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;
    overflow-y:hidden!important;max-width:100%!important;min-width:0!important;
    scrollbar-width:thin;
  }
  html[data-wnc-ipad-frame] :is(.business-tabs,.secondary-tabs) > * {
    flex:0 0 auto!important;white-space:nowrap!important;
  }

  /* Local single-row statistical strips, preserving each existing card's
     icon, number, unit, status and theme. */
  html[data-wnc-ipad-frame] :is(.kpis,.kpi-grid,.metric-band) {
    display:flex!important;flex-wrap:nowrap!important;grid-template-columns:none!important;
    max-width:100%!important;min-width:0!important;overflow-x:auto!important;
    overflow-y:hidden!important;height:auto!important;gap:12px!important;
    align-items:stretch!important;scrollbar-width:thin;padding-bottom:3px!important;
    -webkit-overflow-scrolling:touch;
  }
  html[data-wnc-ipad-frame] :is(.kpis,.kpi-grid,.metric-band) > :is(.kpi,.metric) {
    flex:0 0 188px!important;min-width:188px!important;width:188px!important;
    max-width:188px!important;box-sizing:border-box!important;
  }

  html[data-wnc-ipad-frame] :is(.overview-grid,.main-column,.right-column,.dashboard-grid,.dashboard-left,.dashboard-right,.card,.bossv-card,.agent-tile) {
    min-width:0!important;max-width:100%!important;box-sizing:border-box!important;
  }
  html[data-wnc-ipad-frame] :is(.search-row,.filter-row,.filters form,.cockpit-filter-host,.cockpit-scope-toolbar,.agent-filter,.model-filter,.cce-toolbar) {
    min-width:0!important;max-width:100%!important;flex-wrap:wrap!important;
    height:auto!important;row-gap:8px!important;
  }
  html[data-wnc-ipad-frame] :is(.search-field,.agent-search,.model-search,.search) {
    min-width:0!important;max-width:100%!important;
  }
  html[data-wnc-ipad-frame] :is(.scope-filters,.heading-filters,.cockpit-scope-toolbar,.search-row) :is(input,select) {
    min-width:0!important;max-width:100%!important;box-sizing:border-box;
  }
  html[data-wnc-ipad-frame] :is(.advanced-grid,.org-advanced) {
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
  html[data-wnc-ipad-frame] :is(.record-table,.table-scroll,.table-wrap,.agent-table-wrap,.model-table-wrap,.bossv-table-wrap) {
    min-width:0!important;max-width:100%!important;overflow-x:auto!important;
    -webkit-overflow-scrolling:touch;
  }

  /* Existing risk-legend line-height fix remains authoritative. Only its
     enclosing card/row grows, so labels do not collide with the next card. */
  html[data-wnc-ipad-frame] :is(.risk-page,.operating-page,.organization-risk-page,.asset-device-risk-page) .risk-grid > .card:has(.human-legend) {
    height:auto!important;min-height:220px!important;
  }
  html[data-wnc-ipad-frame] :is(.risk-page,.operating-page,.organization-risk-page,.asset-device-risk-page) .human-ring-layout {
    flex-wrap:wrap!important;gap:14px!important;min-height:0!important;
    height:auto!important;align-content:center!important;
  }
  html[data-wnc-ipad-frame] :is(.risk-page,.operating-page,.organization-risk-page,.asset-device-risk-page) .human-legend {
    min-width:0!important;flex:1 1 140px!important;
  }
  html[data-wnc-ipad-frame] :is(.unknown-ring-layout,.command-ring-row) {
    flex-wrap:wrap!important;height:auto!important;min-height:165px!important;
    row-gap:12px!important;
  }

  /* Preserve original card order, retain local chart/table dimensions. */
  html[data-wnc-ipad-frame="wide"] :is(.analysis-row,.table-row,.traffic-analysis,.traffic-tables,.traffic-bottom,.org-grid,.human-grid,.top-grid,.middle-grid,.bottom-grid,.agent-bottom-grid,.model-bottom-grid) {
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  html[data-wnc-ipad-frame="wide"] :is(.risk-page,.operating-page,.organization-risk-page,.asset-device-risk-page) .risk-grid {
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  html[data-wnc-ipad-frame="wide"] :is(.agent-grid,.agents) {
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
  html[data-wnc-ipad-frame="wide"] :is(.model-main-grid,.overview-grid) {
    grid-template-columns:minmax(0,1fr) 272px!important;
  }
  html[data-wnc-ipad-frame="wide"] .three-cards {
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  html[data-wnc-ipad-frame="wide"] .three-cards > :first-child {grid-column:1/-1!important}

  html[data-wnc-ipad-frame="compact"] :is(.overview-grid,.dashboard-grid,.analysis-row,.table-row,.traffic-analysis,.traffic-tables,.traffic-bottom,.org-grid,.human-grid,.top-grid,.middle-grid,.bottom-grid,.three-cards,.agent-bottom-grid,.model-main-grid,.model-bottom-grid) {
    grid-template-columns:minmax(0,1fr)!important;
  }
  html[data-wnc-ipad-frame="compact"] :is(.risk-page,.operating-page,.organization-risk-page,.asset-device-risk-page) .risk-grid {
    grid-template-columns:minmax(0,1fr)!important;
  }
  html[data-wnc-ipad-frame="compact"] :is(.agent-grid,.agents,.source-facts>div) {
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  html[data-wnc-ipad-frame="compact"] .chain {
    display:flex!important;overflow-x:auto!important;min-width:0!important;
    max-width:100%!important;padding-bottom:6px!important;
  }
  html[data-wnc-ipad-frame="compact"] .chain-node {flex:0 0 118px!important}
  html[data-wnc-ipad-frame="compact"] .chain-arrow {flex:0 0 auto!important}
  html[data-wnc-ipad-frame="compact"] :is(.scope-filters,.heading-filters) {
    max-width:100%!important;min-width:0!important;
  }

  /* The gate still comes from the parent. This media query only handles an
     unusually narrow nested frame while its parent remains a wide tablet. */
  @media (max-width:900px) {
    html[data-wnc-ipad-frame="wide"] :is(.overview-grid,.model-main-grid,.three-cards) {
      grid-template-columns:minmax(0,1fr)!important;
    }
    html[data-wnc-ipad-frame] :is(.advanced-grid,.org-advanced) {
      grid-template-columns:repeat(2,minmax(0,1fr))!important;
    }
  }
}

@layer wncTabletLayout {
/* iPad service centers: existing presentation only. Top document: 600–1366px.
 * Same-origin child documents require data-wnc-ipad-frame, maintained by the parent
 * only while its viewport is 600–1366px. No data, visibility permission, or action changes. */
@media (min-width:600px) and (max-width:1366px){
html body #page-performance #performance-container,
html body #page-performance #sales-board-frame,
html body #page-customer-service #cs-live-host,
html body #page-customer-service #cs-live-frame,
html body #page-customer-service #cs-live-frame-pending{min-width:0!important;max-width:100%!important;box-sizing:border-box!important}
html body #page-customer-center .cc-hist .cc-stats6{display:grid!important;grid-template-columns:none!important;grid-auto-flow:column!important;grid-auto-columns:148px!important;overflow-x:auto!important;max-width:100%!important;-webkit-overflow-scrolling:touch}
html body #page-customer-center .cc-hist .cc-search,
html body #page-customer-center .cc-hist .ccb-adv-grid{min-width:0!important}
html body #page-customer-center .cc-hist .cc-search input,
html body #page-customer-center .cc-hist .cc-search select{min-width:0!important;max-width:100%!important;box-sizing:border-box!important}
html body #page-customer-center .cc-hist .cc-detail,
html body #page-customer-center .cc-hist .cc-list-pane{min-width:0!important;max-width:100%!important}
html body #page-customer-center .cc-hist .lease-head,
html body #page-customer-center .cc-hist .dh-top{flex-wrap:wrap!important;gap:8px!important}
html body #page-customer-center .cc-hist .cc-d-stats,
html body #page-customer-center .cc-hist .fin-summary{grid-template-columns:repeat(2,minmax(0,1fr))!important}
html body #page-tickets #aso .ao-person-table{max-width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch}
html body #page-tickets #aso .ao-person-table table{min-width:650px!important}
html body #page-tickets #aso .ao-heading,
html body #page-tickets #aso .ao-toolbar,
html body #page-tickets .desktop-workspace .tk-sc-header{flex-wrap:wrap!important;height:auto!important;gap:8px!important}
html body #page-tickets #aso .ao-search,
html body #page-tickets .desktop-workspace .tk-search-wrap{min-width:160px!important;max-width:100%!important;flex:1 1 220px!important}
html body #page-tickets .desktop-pool .list-panel,
html body #page-tickets .desktop-workspace .list-panel{min-width:0!important;max-width:100%!important}
html body #page-tickets .desktop-pool .list-layout{grid-template-columns:190px minmax(0,1fr)!important;gap:12px!important}
html body #page-tickets .desktop-pool .tk-sc-header{flex-wrap:wrap!important;gap:8px!important}
html body #page-tickets #tk-ui-pool-layout #tk-list article.work-row.desktop-ticket{grid-template-columns:minmax(0,1.25fr) minmax(0,1fr)!important;height:auto!important;min-height:0!important;gap:10px 16px!important}
html body #page-tickets #tk-ui-pool-layout #tk-list article.work-row.desktop-ticket .work-right{grid-column:1/-1!important;display:flex!important;justify-content:space-between!important;min-width:0!important}
html body #page-tickets #tk-content-area .desktop-zone-list article.work-row.desktop-ticket{grid-template-columns:40px minmax(0,1fr) minmax(0,1fr)!important;height:auto!important;min-height:0!important;gap:10px 14px!important}
html body #page-tickets #tk-content-area .desktop-zone-list article.work-row.desktop-ticket .work-right{grid-column:2/-1!important;display:flex!important;justify-content:space-between!important;min-width:0!important}
html body #page-tickets .desktop-workspace .work-right .row-actions,
html body #page-tickets .desktop-pool .work-right .row-actions{flex-wrap:wrap!important;min-width:0!important}
html body #page-tickets #tk-content-area > .tk-advanced-filters-wrap .tk-adv-inner{grid-template-columns:minmax(0,1fr)!important}
html body #page-tickets #tk-content-area > .tk-advanced-filters-wrap .tk-filters-row{grid-template-columns:repeat(2,minmax(0,1fr))!important}
html body .ao-dialog.ax-screen,
html body .ao-dialog{max-width:calc(100vw - 32px)!important;max-height:calc(100dvh - 32px)!important}
html body .ax-screen .ax-task{grid-template-columns:minmax(0,1fr) 170px!important;grid-template-areas:"top meta" "title meta" "address risks" "foot foot" "near near"!important;gap:8px 12px!important}
html body .ax-screen .ax-task-foot{flex-direction:row!important;justify-content:space-between!important;flex-wrap:wrap!important;white-space:normal!important}
}
@media (min-width:600px) and (max-width:1099px){
html body #page-tickets #aso .ao-workspace,
html body #page-tickets #tk-content-area .desktop-dashboard{grid-template-columns:minmax(0,1fr)!important}
html body #page-tickets #aso .ao-side{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}
html body #page-tickets #aso .ao-bottom{grid-template-columns:repeat(2,minmax(0,1fr))!important}
html body #page-tickets #aso .ao-bottom > .ao-card:first-child{grid-column:1/-1!important}
html body #page-tickets .desktop-pool .list-layout{grid-template-columns:minmax(0,1fr)!important}
html body #page-tickets .desktop-pool .advanced-sidebar .tk-adv-inner{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
html body #page-tickets .desktop-pool .advanced-sidebar .tk-adv-actions{grid-column:1/-1!important}
html body #page-customer-center .cc-hist .cc-shell{grid-template-columns:minmax(0,1fr)!important;gap:14px!important}
html body #page-customer-center .cc-hist .cc-detail{max-height:none!important;min-height:0!important;overflow:visible!important}
}
@media (min-width:600px) and (max-width:800px){
html body #page-tickets #aso .ao-side,
html body #page-tickets #aso .ao-bottom{grid-template-columns:minmax(0,1fr)!important}
html body #page-tickets #aso .ao-workspace > section.ao-card{overflow-x:auto!important;-webkit-overflow-scrolling:touch}
html body #page-tickets #aso .ao-task-head,
html body #page-tickets #aso .ao-task-row{min-width:535px!important}
html body #page-tickets #aso .ao-task-head,
html body #page-tickets #aso .ao-task-row{grid-template-columns:43px 47px minmax(135px,1fr) 60px 62px 56px 44px!important;gap:6px!important;padding-left:10px!important;padding-right:10px!important}
html body .ax-screen .ax-body[data-kind=roster],
html body .ax-screen .ax-body[data-kind=metrics]{grid-template-columns:minmax(0,1fr)!important}
}
html[data-wnc-ipad-frame] body #main-area,
html[data-wnc-ipad-frame] body .cs-workspace{min-width:0!important;max-width:100%!important;box-sizing:border-box!important}
html[data-wnc-ipad-frame] body #cs-shared-header .toolbar-right{grid-template-columns:repeat(2,minmax(0,1fr))!important;max-width:100%!important;min-width:0!important;gap:8px!important}
html[data-wnc-ipad-frame] body #cs-shared-header .title-block,
html[data-wnc-ipad-frame] body #cs-shared-header .heading-copy,
html[data-wnc-ipad-frame] body #cs-shared-header .cs-shared-controls{min-width:0!important;max-width:100%!important;flex-wrap:wrap!important;height:auto!important}
html[data-wnc-ipad-frame] body #cs-shared-header .scope-company,
html[data-wnc-ipad-frame] body #cs-shared-header .scope-company select,
html[data-wnc-ipad-frame] body #cs-shared-header select{min-width:0!important;max-width:100%!important}
html[data-wnc-ipad-frame] body #main-tabs,
html[data-wnc-ipad-frame] body #phone-subtabs,
html[data-wnc-ipad-frame] body .sales-tabs,
html[data-wnc-ipad-frame] body .sc-subnav,
html[data-wnc-ipad-frame] body .sc-mine-nav,
html[data-wnc-ipad-frame] body .csan-tabs{max-width:100%!important;min-width:0!important;overflow-x:auto!important;flex-wrap:nowrap!important;-webkit-overflow-scrolling:touch}
html[data-wnc-ipad-frame] body #main-tabs > *,
html[data-wnc-ipad-frame] body #phone-subtabs > *,
html[data-wnc-ipad-frame] body .sales-tabs > *,
html[data-wnc-ipad-frame] body .sc-subnav > *{flex-shrink:0!important;white-space:nowrap!important}
html[data-wnc-ipad-frame] body #order-list .sc-order-designed{grid-template-columns:minmax(0,1fr) 116px minmax(210px,.9fr) 100px!important;min-width:0!important}
html[data-wnc-ipad-frame] body #order-list .sc-designed-copy,
html[data-wnc-ipad-frame] body #order-list .sc-designed-money,
html[data-wnc-ipad-frame] body #order-list .sc-designed-state,
html[data-wnc-ipad-frame] body #order-list .sc-designed-term{min-width:0!important;max-width:100%!important}
html[data-wnc-ipad-frame] body .sc-lead-layout{grid-template-columns:170px minmax(0,1fr)!important}
html[data-wnc-ipad-frame] body .sc-team-layout,
html[data-wnc-ipad-frame] body .sc-rank-layout,
html[data-wnc-ipad-frame] body .sc-pay-layout,
html[data-wnc-ipad-frame] body .sx-mine-columns{grid-template-columns:minmax(0,1fr) minmax(220px,.65fr)!important}
html[data-wnc-ipad-frame] body .sx6-member-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
html[data-wnc-ipad-frame] body .sx6-rule-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
html[data-wnc-ipad-frame] body .sx6-record-lines,
html[data-wnc-ipad-frame] body .sx6-profile-bottom,
html[data-wnc-ipad-frame] body .sc-tools,
html[data-wnc-ipad-frame] body .pay-filter,
html[data-wnc-ipad-frame] body .pv2-filter,
html[data-wnc-ipad-frame] body .sales-ui-team-filter{flex-wrap:wrap!important;min-width:0!important}
html[data-wnc-ipad-frame] body .sc-tools input,
html[data-wnc-ipad-frame] body .sc-tools select,
html[data-wnc-ipad-frame] body .sales-ui-team-filter select,
html[data-wnc-ipad-frame] body .pay-filter input,
html[data-wnc-ipad-frame] body .pay-filter select,
html[data-wnc-ipad-frame] body .pv2-filter input,
html[data-wnc-ipad-frame] body .pv2-filter select{min-width:0!important;max-width:100%!important;box-sizing:border-box!important}
html[data-wnc-ipad-frame] body #bi-workspace .bi-table-scroll,
html[data-wnc-ipad-frame] body .csan-table,
html[data-wnc-ipad-frame] body .csrc-table-wrap,
html[data-wnc-ipad-frame] body .ct-list-wrap,
html[data-wnc-ipad-frame] body .ct-table-wrap{max-width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch}
html[data-wnc-ipad-frame] body #bi-workspace .bi-layout,
html[data-wnc-ipad-frame] body #ai-runtime .ar-layout{grid-template-columns:minmax(0,1fr) 240px!important}
html[data-wnc-ipad-frame] body #hi-workspace .hi-layout{grid-template-columns:minmax(190px,.8fr) minmax(0,1.2fr)!important}
html[data-wnc-ipad-frame] body #hi-workspace .hi-aside{grid-column:1/-1!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}
html[data-wnc-ipad-frame] body .csam-grid,
html[data-wnc-ipad-frame] body .csmo-grid,
html[data-wnc-ipad-frame] body .csan-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
html[data-wnc-ipad-frame] body .csam-agents,
html[data-wnc-ipad-frame] body .csam-models,
html[data-wnc-ipad-frame] body .csdv-grid,
html[data-wnc-ipad-frame] body .csap-list{grid-template-columns:repeat(auto-fit,minmax(min(260px,100%),1fr))!important}
html[data-wnc-ipad-frame] body .ct-workspace{grid-template-columns:minmax(0,1fr) 270px!important}
html[data-wnc-ipad-frame] body .ct-detail,
html[data-wnc-ipad-frame] body .ct-workspace > *,
html[data-wnc-ipad-frame] body #bi-workspace .bi-layout > *,
html[data-wnc-ipad-frame] body #hi-workspace .hi-layout > *{min-width:0!important;max-width:100%!important}
html[data-wnc-ipad-frame] body .csam-form select,
html[data-wnc-ipad-frame] body .csam-form input:not([type]),
html[data-wnc-ipad-frame] body #ct-task-dialog .cssc-pick select{min-width:0!important;max-width:100%!important}
html[data-wnc-ipad-frame] body .csam-form label{min-width:0!important;flex-wrap:wrap!important}
html[data-wnc-ipad-frame] body #ct-task-dialog,
html[data-wnc-ipad-frame] body #bi-dialog,
html[data-wnc-ipad-frame] body #hi-dialog,
html[data-wnc-ipad-frame] body #ar-dialog,
html[data-wnc-ipad-frame] body #csap-dialog,
html[data-wnc-ipad-frame] body #cs-chat-control-dialog{max-width:calc(100vw - 24px)!important;max-height:calc(100dvh - 24px)!important;box-sizing:border-box!important}
@media (max-width:1000px){
html[data-wnc-ipad-frame] body #order-list .sc-order-designed{grid-template-columns:minmax(0,1fr) 104px!important;gap:10px 12px!important}
html[data-wnc-ipad-frame] body #order-list .sc-designed-copy{grid-column:1!important;grid-row:1!important}
html[data-wnc-ipad-frame] body #order-list .sc-designed-title{padding-right:0!important}
html[data-wnc-ipad-frame] body #order-list .sc-designed-state{grid-column:2!important;grid-row:1/3!important;align-self:start!important}
html[data-wnc-ipad-frame] body #order-list .sc-designed-term{display:flex!important;grid-column:1!important;grid-row:2!important;flex-wrap:wrap!important;gap:4px 8px!important;padding-left:0!important;border-left:0!important}
html[data-wnc-ipad-frame] body #order-list .sc-designed-money{grid-column:1/-1!important;grid-row:3!important;grid-template-columns:repeat(3,minmax(0,1fr))!important}
html[data-wnc-ipad-frame] body .sc-team-layout,
html[data-wnc-ipad-frame] body .sc-rank-layout,
html[data-wnc-ipad-frame] body .sc-pay-layout,
html[data-wnc-ipad-frame] body .sx-mine-columns,
html[data-wnc-ipad-frame] body .sc-mine-layout,
html[data-wnc-ipad-frame] body .sx6-analysis-grid,
html[data-wnc-ipad-frame] body .sx6-personal-row{grid-template-columns:minmax(0,1fr)!important}
html[data-wnc-ipad-frame] body .sx6-rule-grid,
html[data-wnc-ipad-frame] body .sx6-rule-other .sx6-rule-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
html[data-wnc-ipad-frame] body #tab-mine{grid-template-columns:minmax(0,1fr)!important;gap:12px!important}
html[data-wnc-ipad-frame] body #tab-mine > *{grid-column:1!important;grid-row:auto!important;min-width:0!important;box-sizing:border-box!important}
html[data-wnc-ipad-frame] body .workspace-content{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto auto auto!important;overflow-y:auto!important;overflow-x:hidden!important}
html[data-wnc-ipad-frame] body .workspace-content > #conversation-stats{grid-column:1!important;grid-row:1!important}
html[data-wnc-ipad-frame] body .workspace-content > .staff-search{grid-column:1!important;grid-row:2!important;justify-content:flex-start!important}
html[data-wnc-ipad-frame] body .workspace-content > .chat-workbench{grid-column:1!important;grid-row:3!important;grid-template-columns:minmax(180px,.75fr) minmax(0,1.25fr)!important;grid-template-rows:minmax(420px,1fr) auto!important;min-height:640px!important;overflow:visible!important}
html[data-wnc-ipad-frame] body .chat-workbench > .list-panel{grid-column:1!important;grid-row:1!important}
html[data-wnc-ipad-frame] body .chat-workbench > .chat-panel{grid-column:2!important;grid-row:1!important;min-width:0!important}
html[data-wnc-ipad-frame] body .chat-workbench > .context-panel{grid-column:1/-1!important;grid-row:2!important;max-height:300px!important;min-height:180px!important}
html[data-wnc-ipad-frame] body #bi-workspace .bi-layout,
html[data-wnc-ipad-frame] body #ai-runtime .ar-layout,
html[data-wnc-ipad-frame] body .ct-workspace{grid-template-columns:minmax(0,1fr)!important}
html[data-wnc-ipad-frame] body #bi-workspace .bi-aside,
html[data-wnc-ipad-frame] body #ai-runtime .ar-aside{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}
html[data-wnc-ipad-frame] body .csam-grid,
html[data-wnc-ipad-frame] body .csmo-grid,
html[data-wnc-ipad-frame] body .csan-grid{grid-template-columns:minmax(0,1fr)!important}
html[data-wnc-ipad-frame] body .ct-detail{max-height:none!important}
}
@media (max-width:700px){
html[data-wnc-ipad-frame] body #cs-shared-header .title-block{gap:10px!important;align-items:flex-start!important}
html[data-wnc-ipad-frame] body #cs-shared-header .heading-copy{flex-basis:100%!important}
html[data-wnc-ipad-frame] body #cs-shared-header .toolbar-right{grid-template-columns:repeat(2,minmax(0,1fr))!important;width:100%!important}
html[data-wnc-ipad-frame] body .sc-lead-layout{grid-template-columns:minmax(0,1fr)!important}
html[data-wnc-ipad-frame] body .sx6-member-grid,
html[data-wnc-ipad-frame] body .sx6-commission-people,
html[data-wnc-ipad-frame] body .sx6-commission-grid{grid-template-columns:minmax(0,1fr)!important}
html[data-wnc-ipad-frame] body .workspace-content > .chat-workbench{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:240px 440px auto!important;min-height:860px!important}
html[data-wnc-ipad-frame] body .chat-workbench > .list-panel{grid-column:1!important;grid-row:1!important}
html[data-wnc-ipad-frame] body .chat-workbench > .chat-panel{grid-column:1!important;grid-row:2!important}
html[data-wnc-ipad-frame] body .chat-workbench > .context-panel{grid-column:1!important;grid-row:3!important}
html[data-wnc-ipad-frame] body #hi-workspace .hi-layout,
html[data-wnc-ipad-frame] body #hi-workspace .hi-aside,
html[data-wnc-ipad-frame] body #bi-workspace .bi-aside,
html[data-wnc-ipad-frame] body #ai-runtime .ar-aside{grid-template-columns:minmax(0,1fr)!important}
html[data-wnc-ipad-frame] body .csmo-res{grid-template-columns:32px minmax(0,1fr) 40px!important;gap:8px!important}
html[data-wnc-ipad-frame] body .csmo-res > :last-child{grid-column:2/-1!important}
}
@media(max-width:800px){html[data-wnc-ipad-frame].csov1 body #page-content{grid-template-columns:minmax(0,1fr)!important}}

}
@layer wncTabletLayout {
 @media(min-width:600px) and (max-width:1366px) {
  #page-tickets #aso .ao-stats{display:flex!important;flex-wrap:nowrap!important;max-width:100%!important;overflow-x:auto!important;overflow-y:hidden!important;gap:12px!important;padding-bottom:5px!important}
  #page-tickets #aso .ao-stats>*{flex:0 0 188px!important;min-width:188px!important;box-sizing:border-box!important}
  #finance-container .bv-type-row{display:flex!important;flex-wrap:nowrap!important;max-width:100%!important;min-width:0!important;overflow-x:auto!important;overflow-y:hidden!important}
  #finance-container .bv-type-row>.bv-type-tab{flex:0 0 auto!important}
  #finance-container .wf3-fin-bar .wf3-row{flex-wrap:wrap!important}
  /* Amount cards need room for the unchanged icon and monetary typography. */
  #finance-container#finance-container :is(.mg-grid,.f2-ov-kpis,.bv-kpis,.fpv2-kpis,.rv-kpis,.sv-kpis,.pv-kpis,.fr-primary-kpis,.rc-kpis,.p7-kpis,.p6-kpis,.p8-kpis)>*,
  #wallet-container#wallet-container :is(.fo3-kpis,.fac-stats,.fao-stats,.fs-stats,.fon-stats,.faw-stats)>*{flex-basis:248px!important;min-width:248px!important}
 }
 @media(min-width:769px) and (max-width:1099px) {
  #settings-overview-v1 .module-nav,#wnc-business-live .sbr-categories{display:flex!important;flex-wrap:nowrap!important;gap:6px!important;overflow-x:auto!important;max-width:100%!important;min-width:0!important;align-items:center!important}
  #settings-overview-v1 .module-nav>:is(h3,button,nav),#wnc-business-live .sbr-categories>button{flex:0 0 auto!important;width:auto!important;min-width:0!important}
  #settings-overview-v1 .module-nav nav{flex-wrap:nowrap!important}
  #settings-overview-v1 .module-nav h3{margin:0!important;padding:8px!important}
 }
 @media(min-width:600px) and (max-width:768px) {
  #wnc-global-shell-v2 .header-v2{grid-template-columns:36px minmax(0,1fr) 36px 36px 36px auto!important;gap:8px!important}
  #wnc-global-shell-v2 .global-search{grid-column:3!important;grid-row:1!important}
  #wnc-global-shell-v2 .header-right-v2>.icon-button[aria-label="通知"]{grid-column:4!important;grid-row:1!important}
  #wnc-global-shell-v2 .header-right-v2>.icon-button[aria-label="帮助"]{grid-column:5!important;grid-row:1!important}
  #wnc-global-shell-v2 .account-wrap{grid-column:6!important;grid-row:1!important}
 }
 @media(min-width:600px) and (max-width:1099px) {
  #devices-container .dm-unified-search-row>input{flex:1 1 calc(100% - 32px)!important;min-width:180px!important;max-width:calc(100% - 32px)!important}
  #devices-container .dm-unified-search-row>select{flex:1 1 120px!important;min-width:110px!important}
  #page-customer-center .cc-hist .cc-search{grid-template-columns:minmax(0,1fr) auto!important}
  #page-customer-center .cc-hist .cc-search .kw-row{min-width:0!important}
  #page-customer-center .cc-hist .ccb-adv-grid:not([hidden]){display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-column:1/-1!important;gap:8px!important}
  #page-customer-center .cc-hist .ccb-adv-grid>div{min-width:0!important}
  #page-customer-center .cc-hist .ccb-adv-grid select{width:100%!important;min-width:0!important}
  #page-customer-center .cc-hist :is(.ccb-adv-panel,.cc-chain-label){grid-column:1/-1!important}
  #devices-container .dm-search-row{flex-wrap:wrap!important}
  #devices-container .dm-search-input{flex:1 1 240px!important;min-width:180px!important}
 }
 @media(min-width:600px) and (max-width:1366px) {
  #devices-container .dv-table-wrap{max-width:100%!important;overflow-x:auto!important}
  #devices-container .dv-table-wrap>table{min-width:960px!important}
  #devices-container .dv-table-wrap th{white-space:nowrap!important}
 }
 html[data-wnc-ipad-frame] .cs-workspace{grid-template-rows:auto minmax(0,1fr)!important}
 html[data-wnc-ipad-frame] #cs-shared-header{height:auto!important;min-height:0!important;max-height:none!important;flex:none!important}
 html[data-wnc-ipad-frame] .cs-dashboard-primary-metrics{display:flex!important;flex-wrap:nowrap!important;max-width:100%!important;overflow-x:auto!important;overflow-y:hidden!important;gap:12px!important;padding-bottom:5px!important}
 html[data-wnc-ipad-frame] .cs-dashboard-primary-metrics>button{flex:0 0 188px!important;min-width:188px!important;box-sizing:border-box!important}
 html[data-wnc-ipad-frame] .vc-stat-bar{display:flex!important;flex-wrap:nowrap!important;max-width:100%!important;overflow-x:auto!important;overflow-y:hidden!important;gap:12px!important;padding-bottom:5px!important}
 html[data-wnc-ipad-frame] .vc-stat-bar>.vc-stat-item{flex:0 0 188px!important;min-width:188px!important;box-sizing:border-box!important}
 /* The cockpit replaces its old statistic source with verified business cards. */
 html[data-wnc-ipad-frame] .bossv-hidden-stat{display:none!important}
 html[data-wnc-ipad-frame] .bossv-stats:not(.bossv-hidden-stat):not([hidden]){display:flex!important;flex-wrap:nowrap!important;max-width:100%!important;min-width:0!important;overflow-x:auto!important;overflow-y:hidden!important;gap:12px!important;padding-bottom:5px!important}
 html[data-wnc-ipad-frame] .bossv-stats>.bossv-stat{flex:0 0 188px!important;min-width:188px!important;box-sizing:border-box!important}
}

/* Keep an empty actions group from wrapping below the tablet heading. */
@layer wncTabletLayout { html[data-wnc-ipad-frame] #cs-shared-header>.page-heading{flex-wrap:nowrap!important} }
