/* V15: suppress off-screen decorative work, preserve authored scenes. */
#engine .fm-e14-original-source{display:flex!important;flex:1 1 auto;min-height:0;flex-direction:column;overflow:hidden;}
#engine .fm-e14-original-source .flow-visual{display:flex!important;flex:1 1 auto;min-height:0;height:100%!important;flex-direction:column;}
#engine .fm-e14-original-source .premium-logic{min-height:0;flex:1 1 auto;}
#engine .fm-e14-original-source .logic-svg{max-height:min(34vh,340px);width:100%;}
#engine .fm-e14-visual-viewport{display:none!important;}
#engine .fm-e14-pin{contain:layout paint;}
[data-fm-inactive="true"] .fm-engine-wave,
[data-fm-inactive="true"] .fm-engine-reactor *,
[data-fm-inactive="true"] .fm-inside-scanner,
[data-fm-inactive="true"] .fm-inside-focus,
[data-fm-inactive="true"] .fmq-app *,
[data-fm-inactive="true"] .hx3 *{animation-play-state:paused!important;}
@media(max-width:590px){#engine .fm-e14-original-source .flow-visual{padding:3px 5px!important;}#engine .fm-e14-original-source .logic-svg{max-height:32vh;}#engine .fm-e14-pin{contain:layout paint;}}

/* V16: the model playback controls must remain clickable after tab switching.
   This only corrects stacking/hit testing, not animation timing or layout. */
#model .model-image-pane .image-top-label{position:relative;z-index:4}
#model .fm-inside-command{position:relative;z-index:32;isolation:isolate}
#model .fm-inside-actions{position:relative;z-index:33;pointer-events:auto}
#model #fmInsideRestart,#model #fmInsideToggle{position:relative;z-index:34;pointer-events:auto;touch-action:manipulation}
#model #fmInsideRestart{scroll-margin-block:125px}

/* V16 Chromium QA: ensure the four operational nodes fit the pinned viewport
   on phones. The original one-column global rule hid the lower nodes. */
@media(max-width:590px){
  #engine .fm-e14-slide{overflow:hidden}
  #engine .fm-e14-slide>p{width:100%;max-width:100%;overflow:hidden;overflow-wrap:anywhere;text-wrap:balance}
  body.landing-premium #impactGraph .flow-nodes{
    display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
    grid-auto-rows:minmax(93px,auto)!important;gap:7px!important;
    margin:0!important;padding:0 3px!important;
  }
  body.landing-premium #impactGraph .flow-node{
    min-height:93px!important;height:auto!important;padding:9px 8px!important;
    justify-content:center!important;
  }
  body.landing-premium #impactGraph .flow-node span{font-size:9px!important;line-height:1.25!important}
  body.landing-premium #impactGraph .flow-node strong{font-size:12px!important;line-height:1.2!important;overflow-wrap:anywhere!important}
  body.landing-premium #impactGraph .flow-node small{font-size:10px!important;line-height:1.2!important}
}
@media(max-width:590px){
  /* The desktop SVG is intentionally hidden at phone widths; it must not
     reserve the remaining space underneath the legible 2×2 flow cards. */
  #engine .fm-e14-original-source .premium-logic{display:none!important;flex:none!important}
  #engine .fm-e14-original-source .flow-visual{justify-content:center!important}
}
