/* Desktop module headings: match the live after-sales title and description.
   Scoped to page headers; card titles, tabs, actions and mobile are unaffected. */
@media (min-width:769px) {
  html body :is(.wnc-module-title-text, #tickets-container .title-text,
    #customer-center-container .cui-heading-copy,
    #org-container .ov-page-head > div:first-child,
    #page-permissions .ov-page-head > div:first-child,
    #renovation-root .rov-module-copy,
    #renovation-root header.reno-heading > div:first-child,
    #funds-overview-v2 .fov-heading > div:first-child,
    #funds-platform-settlement .fps-heading > div:first-child,
    #funds-account-overview .fao-heading > div:first-child,
    #mall-container .mh-page-head) {
    display:flex!important;align-items:baseline!important;
    flex-wrap:wrap!important;gap:4px 12px!important;min-width:0!important;
  }
  html body :is(.wnc-module-title-text > h1, #tickets-container .title-text > h1,
    #customer-center-container .cui-heading-copy > h1,
    #org-container .ov-page-head > div:first-child > h1,
    #page-permissions .ov-page-head > div:first-child > h1,
    #renovation-root .rov-module-copy > strong,
    #renovation-root header.reno-heading > div:first-child > h2,
    #funds-overview-v2 .fov-heading > div:first-child > h1,
    #funds-platform-settlement .fps-heading > div:first-child > h1,
    #funds-account-overview .fao-heading > div:first-child > h1,
    #mall-container .mh-page-head > .mh-title),
  html body .spp .sp-content .sc-heading #sc-heading-title {
    font:600 20px/28px -apple-system,"PingFang SC","Helvetica Neue","Microsoft YaHei","Noto Sans SC",sans-serif!important;
    color:#1e3a8a!important;letter-spacing:normal!important;margin:0!important;
  }
  html body :is(.wnc-module-title-text > p, #tickets-container .title-text > p,
    #customer-center-container .cui-heading-copy > p,
    #org-container .ov-page-head > div:first-child > p,
    #page-permissions .ov-page-head > div:first-child > p,
    #renovation-root .rov-module-copy > small,
    #renovation-root header.reno-heading > div:first-child > .reno-muted,
    #funds-overview-v2 .fov-heading > div:first-child > p,
    #funds-platform-settlement .fps-heading > div:first-child > p,
    #funds-account-overview .fao-heading > div:first-child > p,
    #mall-container .mh-page-head > .mh-subtitle),
  html body .spp .sp-content .sc-heading #sc-heading-note {
    font:400 13px/19.5px -apple-system,"PingFang SC","Helvetica Neue","Microsoft YaHei","Noto Sans SC",sans-serif!important;
    color:#64748b!important;letter-spacing:normal!important;margin:0!important;
  }
  html body .spp .sp-content .sc-heading > div {
    display:flex!important;align-items:baseline!important;flex-wrap:wrap!important;
    gap:4px 12px!important;min-width:0!important;
  }
}

/* Stable desktop title-to-tab geometry, using the live after-sales layout. */
@media (min-width:769px) {
  html body :is(.wnc-module-title-line,
    #page-tickets #tickets-container .title-line,
    #page-customer-center #customer-center-container .cui-heading,
    #page-organization #org-container .ov-page-head,
    #page-permissions .ov-page-head,
    #page-wallet #funds-overview-v2 .fov-heading,
    #page-wallet #funds-platform-settlement .fps-heading,
    #page-wallet #funds-account-overview .fao-heading,
    #page-renovation #renovation-root .rov-module-title,
    #page-renovation #renovation-root header.reno-heading,
    #page-mall #mall-container .mh-page-head),
  html body .spp .sp-content .sc-heading {
    align-items:center!important;min-height:34px!important;
    height:auto!important;margin:0 0 12px!important;padding:0!important;box-sizing:border-box!important;
  }
  /* Dashboard already provides the same 12px interval through its grid. */
  html body #page-dashboard .wnc-module-title-line {margin-bottom:0!important}
  html body #page-mall #mall-container .mh-page-head {align-items:baseline!important;align-content:center!important}
  html body :is(.wnc-module-title-text,
    #tickets-container .title-text,#customer-center-container .cui-heading-copy,
    #org-container .ov-page-head > div:first-child,#page-permissions .ov-page-head > div:first-child,
    #renovation-root .rov-module-copy,#renovation-root header.reno-heading > div:first-child,
    #funds-overview-v2 .fov-heading > div:first-child,
    #funds-platform-settlement .fps-heading > div:first-child,
    #funds-account-overview .fao-heading > div:first-child),
  html body .spp .sp-content .sc-heading > div {
    flex:1!important;flex-wrap:nowrap!important;min-width:0!important;
  }
  html body :is(.wnc-module-title-text > h1,#tickets-container .title-text > h1,
    #customer-center-container .cui-heading-copy > h1,#org-container .ov-page-head h1,
    #renovation-root .rov-module-copy > strong,#renovation-root header.reno-heading h2,
    #funds-overview-v2 .fov-heading h1,#funds-platform-settlement .fps-heading h1,
    #funds-account-overview .fao-heading h1,#mall-container .mh-title),
  html body .spp .sp-content .sc-heading #sc-heading-title {
    flex:none!important;white-space:nowrap!important;
  }
  html body :is(.wnc-module-title-text > p,#tickets-container .title-text > p,
    #customer-center-container .cui-heading-copy > p,#org-container .ov-page-head p,
    #renovation-root .rov-module-copy > small,#renovation-root header.reno-heading .reno-muted,
    #funds-overview-v2 .fov-heading p,#funds-platform-settlement .fps-heading p,
    #funds-account-overview .fao-heading p,#mall-container .mh-subtitle),
  html body .spp .sp-content .sc-heading #sc-heading-note {
    min-width:0!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
  }
  html body #page-mall #mall-container .mh-page-head {flex-wrap:nowrap!important}
  html body :is(.wnc-module-title-action,
    #page-tickets #tickets-container .title-actions > button,
    #page-customer-center #customer-center-container .cui-heading-actions > button,
    #page-organization #org-container .ov-page-head button,
    #page-wallet #funds-account-overview .fao-heading > button,
    #page-renovation #renovation-root header.reno-heading > select) {
    height:34px!important;min-height:34px!important;box-sizing:border-box!important;
    padding-top:0!important;padding-bottom:0!important;font-size:12.5px!important;
  }
  html body #page-wallet #wallet-container :is(.fov-page.fov-desktop,#funds-platform-settlement,#funds-account-overview) {padding-top:16px!important}
  html body #page-renovation #renovation-root {padding-top:16px!important}
  html body #page-mall #mall-container {padding-top:16px!important}
  html body #page-organization #org-container .org-tab-bar,
  html body #page-permissions .org-tab-bar,
  html body #page-wallet #wallet-container :is(.fov-tabs,.fps-tabs,.fao-funds-tabs),
  html body #page-renovation #renovation-root :is(.rov-center-tabs,.reno-tabs) {
    padding-top:0!important;padding-bottom:0!important;height:36px!important;min-height:36px!important;
    box-sizing:border-box!important;align-items:center!important;
  }
  html body #page-organization #org-container .org-tab-bar > .org-tab-item,
  html body #page-permissions .org-tab-bar > .org-tab-item,
  html body #page-renovation #renovation-root :is(.rov-center-tabs,.reno-tabs) > button {
    height:36px!important;min-height:36px!important;box-sizing:border-box!important;
    padding-top:0!important;padding-bottom:0!important;
  }
}

@media(min-width:769px){html body .spp .sp-content .sc-heading{display:flex!important}}

@media(min-width:769px){
  /* Remove obsolete duplicate headings whenever the current native heading exists. */
  html body #app #main-area :is(
    #customer-center-container:has(.cui-heading),
    #org-container:has(.ov-page-head),
    #wallet-container:has(.fov-heading,.fps-heading,.fao-heading),
    #mall-container:has(.mh-page-head),
    #tickets-container:has(.title-line)
  ) > .wnc-module-title-line[data-wnc-module-heading],
  html body #app #main-area #customer-center-container .ccb-page-title,
  html body .spp .sp-content:has(.sc-heading) > .wnc-module-title-line[data-wnc-module-heading] {
    display:none!important;
  }
  /* Merchant renderer sets a stronger zero-padding rule; override only its top inset. */
  html body #app #main-area #page-mall.page #mall-container.page-content {padding-top:16px!important}
}
