/* Jaisandar 315 · Demography mobile polish */
.migration-route-guide{display:none!important}

@media(max-width:900px){
  body.home [data-economy-window="demography"] .migration-flow-shell{
    border-radius:18px!important;
    border:1px solid #e2ebe8!important;
    background:linear-gradient(180deg,#ffffff 0%,#f7fbf9 100%)!important;
    box-shadow:0 12px 34px rgba(17,48,43,.06)!important;
    overflow:hidden!important;
  }
  body.home [data-economy-window="demography"] .migration-flow-head{
    padding:14px 14px 10px!important;
    gap:9px!important;
  }
  body.home [data-economy-window="demography"] .migration-flow-copy{width:100%!important;max-width:none!important}
  body.home [data-economy-window="demography"] .migration-flow-kicker{font-size:9px!important;margin-bottom:5px!important}
  body.home [data-economy-window="demography"] .migration-flow-head h2{font-size:1.18rem!important;line-height:1.08!important;letter-spacing:-.025em!important}
  body.home [data-economy-window="demography"] .migration-flow-head p{margin-top:6px!important;font-size:.75rem!important;line-height:1.42!important;color:#6f7f7b!important}
  body.home [data-economy-window="demography"] .migration-flow-balance{
    display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important;
    width:100%!important;min-width:0!important;padding:9px 11px!important;border-radius:13px!important;
    background:#f6faf8!important;box-shadow:none!important
  }
  body.home [data-economy-window="demography"] .migration-flow-balance span{font-size:8px!important;grid-column:1/2!important}
  body.home [data-economy-window="demography"] .migration-flow-balance strong{grid-column:2/3!important;grid-row:1/3!important;font-size:1.2rem!important;margin:0!important;white-space:nowrap!important}
  body.home [data-economy-window="demography"] .migration-flow-balance small{font-size:9px!important;text-align:left!important;margin-top:2px!important}

  body.home [data-economy-window="demography"] .migration-flow-controls{
    display:grid!important;grid-template-columns:1fr!important;gap:7px!important;padding:9px 10px 10px!important;
    background:rgba(255,255,255,.96)!important;border-top:1px solid #edf2f0!important;border-bottom:1px solid #edf2f0!important
  }
  body.home [data-economy-window="demography"] .migration-flow-view-toggle{
    display:grid!important;grid-template-columns:1fr 1fr!important;width:100%!important;padding:3px!important;gap:3px!important
  }
  body.home [data-economy-window="demography"] .migration-flow-view-toggle button{min-width:0!important;padding:0 8px!important;font-size:10px!important}
  body.home [data-economy-window="demography"] .migration-metric-tabs-top{
    display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;width:100%!important;gap:4px!important;padding:3px!important
  }
  body.home [data-economy-window="demography"] .migration-metric-tabs-top button{
    min-width:0!important;min-height:42px!important;padding:5px 4px!important;font-size:9px!important;line-height:1.08!important;white-space:normal!important
  }
  body.home [data-economy-window="demography"] .migration-flow-regions-toggle{width:100%!important;min-height:40px!important;order:3!important}
  body.home [data-economy-window="demography"] .migration-flow-period-control{width:100%!important;min-width:0!important;order:4!important}
  body.home [data-economy-window="demography"] .migration-control-label{font-size:8px!important}
  body.home [data-economy-window="demography"] .migration-flow-years{
    display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;gap:6px!important;padding-bottom:2px!important;scrollbar-width:none!important
  }
  body.home [data-economy-window="demography"] .migration-flow-years::-webkit-scrollbar{display:none!important}
  body.home [data-economy-window="demography"] .migration-flow-years button{flex:0 0 auto!important;min-width:70px!important;min-height:38px!important;font-size:10px!important}
  body.home [data-economy-window="demography"] .migration-flow-target{width:100%!important;order:5!important;margin:0!important}
  body.home [data-economy-window="demography"] .migration-flow-target select{width:100%!important;min-height:42px!important;font-size:11px!important}
  body.home [data-economy-window="demography"] .migration-flow-playback{
    order:6!important;display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;gap:6px!important;padding:2px 0 3px!important;scrollbar-width:none!important
  }
  body.home [data-economy-window="demography"] .migration-flow-playback::-webkit-scrollbar{display:none!important}
  body.home [data-economy-window="demography"] .migration-flow-playback button{flex:0 0 auto!important;min-height:38px!important;padding:0 10px!important;font-size:10px!important}
  body.home [data-economy-window="demography"] .migration-flow-controls .migration-flow-video{min-width:132px!important}
  body.home [data-economy-window="demography"] .migration-flow-controls .migration-flow-png{min-width:88px!important;min-height:38px!important}
  body.home [data-economy-window="demography"] .migration-flow-status{padding:7px 11px 5px!important;min-height:0!important;font-size:9px!important;line-height:1.35!important}

  /* Map gets a compact mobile stage; ECharts itself keeps the country proportion. */
  body.home [data-economy-window="demography"] .migration-flow-visual.is-map-view{
    width:100%!important;height:clamp(330px,92vw,420px)!important;min-height:330px!important;max-height:420px!important;aspect-ratio:auto!important;
    background:linear-gradient(180deg,#fbfefd 0%,#f3f8f6 100%)!important
  }
  body.home [data-economy-window="demography"] .migration-flow-visual.is-dots-view{
    width:100%!important;height:clamp(500px,142vw,610px)!important;min-height:500px!important;max-height:610px!important;aspect-ratio:auto!important;
    background:linear-gradient(180deg,#fbfefd 0%,#f5faf8 100%)!important
  }
  body.home [data-economy-window="demography"] .migration-flow-chart,
  body.home [data-economy-window="demography"] .migration-flow-dots{
    position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;transform:none!important
  }
  body.home [data-economy-window="demography"] .jai309-enlarge{
    right:9px!important;top:9px!important;min-height:36px!important;padding:0 9px!important;border-radius:10px!important;font-size:10px!important
  }
  body.home [data-economy-window="demography"] .migration-flow-note{
    display:grid!important;grid-template-columns:1fr!important;gap:7px!important;padding:9px 11px 12px!important;font-size:9px!important
  }
  body.home [data-economy-window="demography"] .migration-flow-legend{gap:7px!important}
  body.home [data-economy-window="demography"] .migration-flow-legend span{
    padding:5px 7px!important;border:1px solid #e1ebe8!important;border-radius:999px!important;background:#fff!important;font-size:9px!important
  }

  /* When the same stage is moved into the fullscreen overlay, keep graphics proportional and centered. */
  .jai309-fullscreen-body>.migration-flow-visual{
    width:100%!important;height:calc(100dvh - 78px)!important;min-height:0!important;max-height:none!important;aspect-ratio:auto!important;
    background:#f6faf8!important
  }
  .jai309-fullscreen-body>.migration-flow-visual .migration-flow-chart,
  .jai309-fullscreen-body>.migration-flow-visual .migration-flow-dots{width:100%!important;height:100%!important;transform:none!important}
}

@media(max-width:430px){
  body.home [data-economy-window="demography"] .migration-flow-head p{display:none!important}
  body.home [data-economy-window="demography"] .migration-flow-visual.is-map-view{height:clamp(315px,88vw,365px)!important;min-height:315px!important}
  body.home [data-economy-window="demography"] .migration-flow-visual.is-dots-view{height:clamp(470px,136vw,560px)!important;min-height:470px!important}
  body.home [data-economy-window="demography"] .migration-metric-tabs-top button{font-size:8.4px!important}
}
