/* v3.18 mobile thermal guard
   Keep gameplay information and card/map styling, but stop effects that keep the
   mobile GPU repainting continuously while the player is simply reading the map.
   Battle fire animation is intentionally preserved while the fire state is active. */

@media (hover: none), (pointer: coarse) {
  /* Later map styles re-enable these with !important, so this file is loaded last. */
  #campaign-map .route-group.attackable-route .route-highlight,
  #campaign-map .route-group.active-route .route-highlight,
  #campaign-map .route-travel,
  #campaign-map .node.ai-source .city-node-icon,
  #campaign-map .node.ai-target .city-node-icon,
  #campaign-map .node.selected .node-halo,
  #campaign-map .danger-badge,
  #campaign-map .plague-cloud,
  #campaign-map .storm-ring,
  #campaign-map .storm-ring::before,
  #campaign-map .storm-ring::after,
  #campaign-map .storm-ring i,
  #campaign-map .storm-ring b,
  #campaign-map .blessing-rays,
  #campaign-map .map-effect.occupation,
  #campaign-map .administrator-map-dot::after,
  .turn-banner.ai,
  .occupation-banner,
  .city-skill-badge.ready,
  .ruler-portrait-frame::after,
  .loyalty-glow,
  .battle-round-track i.current {
    animation: none !important;
  }

  /* Preserve the original animated battle-fire cue. It only runs while a fire
     effect is actually active, unlike the persistent map animations above. */
  .battle-screen.battle-visual-upgraded .visual-fire-active .fighter-visual-slot::after {
    animation: visual-fire-flicker .42s ease-in-out infinite alternate !important;
  }

  .battle-screen.battle-visual-upgraded .visual-fire-active .fighter-visual-slot::before {
    animation: visual-fire-embers .72s linear infinite !important;
  }

  /* SVG filters force costly offscreen rendering. Route colors remain visible. */
  #campaign-map .route-group .route-base,
  #campaign-map .route-group .route-highlight,
  #campaign-map .route-travel {
    filter: none !important;
  }

  /* Keep weather/event cues as static artwork rather than composited layers. */
  #campaign-map .storm-ring,
  #campaign-map .storm-ring::before,
  #campaign-map .storm-ring::after,
  #campaign-map .plague-cloud::before,
  #campaign-map .plague-cloud::after,
  #campaign-map .plague-cloud i {
    filter: none !important;
    mix-blend-mode: normal !important;
  }

  /* Reinforce the earlier mobile rules even when later styles change cascade order. */
  #campaign-map .map-mist,
  .battle-atmosphere .battle-smoke,
  .battle-atmosphere .battle-embers {
    display: none !important;
    animation: none !important;
  }

  /* Live backdrop blur is particularly expensive on iOS Safari while scrolling. */
  .top,
  .overlay,
  .phase-dock,
  .battle-card-draft .card-draft-footer,
  .battle-screen.battle-visual-upgraded .battle-buttons,
  .battle-tooltip-overlay {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  #campaign-map .route-group .route-highlight,
  #campaign-map .route-travel,
  #campaign-map .node-halo,
  #campaign-map .city-node-icon,
  #campaign-map .incident-effect,
  .turn-banner,
  .occupation-banner,
  .city-skill-badge.ready,
  .ruler-portrait-frame::after,
  .loyalty-glow,
  .battle-round-track i.current {
    animation: none !important;
  }
}
