/* Scheme 01 · OA focus correction. The original finance focus flag owns scope.
 * No node, business action, permission or controller changes. Leaving the
 * original OA focus restores all finance-only guides through the cascade.
 */
@layer plan01 {
  body.erp-plan01 #financeView[data-wecom-oa-focus="true"] > :is(
    .finance-section-bar,
    details.finance-overview-assist[data-finance-overview-tool],
    details.finance-advanced-nav[data-finance-overview-tool],
    details.finance-export-panel[data-finance-overview-tool],
    details.plan01-more:has(> .plan01-more-body > .finance-analysis-tabs-primary)
  ) {
    display: none !important;
  }

  /* highlightFinanceTarget runs before the VI rail's next animation frame.
   * Do not wait for data-vi-module or the presentation adapter's marker. */
  body.erp-plan01 #financeView[data-wecom-oa-focus="true"] > #wecomOaSection {
    scroll-margin-top: calc(var(--plan01-topbar, 74px) + var(--plan01-subnav, 60px) + 16px) !important;
  }
}

/* Only focused narrow OA constrains the original workspace height to restore user scrolling; existing records, controls and handlers are unchanged. */
@layer plan01 {
  @media (max-width: 980px) {
    body.erp-plan01[data-active-view="finance"]:not(.mobile-nav-open):not(:has(dialog[open])) > .app-shell > .workspace:has(> #financeView.active[data-wecom-oa-focus="true"]:not([hidden])) {
      height: 100dvh !important;
      min-height: 0 !important;
      overflow-y: auto !important;
    }
  }
}
