/* V1.326: device-agnostic safety layer for phones and lower-powered PCs.
   Keep combat meaning (target line, local impact core, numbers) while removing
   transient compositing layers that do not change the outcome. */

html body:not(.maintenance-mode):is(
  [data-vfx-quality="low"],
  [data-battle-load="team"],
  [data-battle-load="crowded"],
  [data-vfx-performance-limited="true"]
) :is(
  .vfx-action-beat,
  .vfx-combat-telegraph,
  .vfx-impact-punctuation,
  .vfx-material-aftermath,
  .card-vfx-impact-echo
) {
  contain: layout paint style;
  mix-blend-mode: normal !important;
  filter: none !important;
}

html body:not(.maintenance-mode):is(
  [data-vfx-quality="low"],
  [data-battle-load="team"],
  [data-battle-load="crowded"],
  [data-vfx-performance-limited="true"]
) :is(
  .vfx-action-beat,
  .vfx-combat-telegraph,
  .vfx-impact-punctuation,
  .vfx-material-aftermath,
  .card-vfx-impact-echo
) * {
  filter: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

html body:not(.maintenance-mode):is(
  [data-vfx-quality="low"],
  [data-battle-load="team"],
  [data-battle-load="crowded"],
  [data-vfx-performance-limited="true"]
) :is(
  .vfx-action-beat-ring-b,
  .vfx-action-beat-brackets,
  .vfx-action-beat-sweep,
  .vfx-combat-telegraph-source,
  .vfx-impact-vignette,
  .vfx-impact-trajectory,
  .vfx-impact-ring-outer,
  .vfx-impact-cut,
  .vfx-impact-after-ring,
  .vfx-impact-reticle,
  .vfx-material-aftermath
) {
  display: none !important;
  animation: none !important;
}

html body:not(.maintenance-mode):is(
  [data-vfx-quality="low"],
  [data-battle-load="team"],
  [data-battle-load="crowded"],
  [data-vfx-performance-limited="true"]
) :is(.vfx-action-beat-mote, .vfx-impact-shard):nth-of-type(n + 7) {
  display: none !important;
  animation: none !important;
}

html body:not(.maintenance-mode):is(
  [data-vfx-quality="low"],
  [data-battle-load="team"],
  [data-battle-load="crowded"],
  [data-vfx-performance-limited="true"]
) #battle.battle:not([hidden]) .target-reticle,
html body:not(.maintenance-mode):is(
  [data-vfx-quality="low"],
  [data-battle-load="team"],
  [data-battle-load="crowded"],
  [data-vfx-performance-limited="true"]
) #battle.battle:not([hidden]) .target-reticle::before,
html body:not(.maintenance-mode):is(
  [data-vfx-quality="low"],
  [data-battle-load="team"],
  [data-battle-load="crowded"]
) #battle.battle:not([hidden]) .target-reticle::after {
  filter: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

html body:not(.maintenance-mode).battle-controls-active:is(
  [data-vfx-quality="low"],
  [data-battle-load="team"],
  [data-battle-load="crowded"]
) :is(#appRoot, #battle, #sidePanel, #sidePanel > section) {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

/* Persistent battle loops are kept visually legible but rendered as static cues.
   One-shot hit, critical, block, damage-number and target-commit animations are
   deliberately excluded from this constrained-runtime list. */
html body:not(.maintenance-mode):is(
  [data-vfx-quality="low"],
  [data-battle-load="team"],
  [data-battle-load="crowded"],
  [data-vfx-performance-limited="true"]
)
#appRoot#appRoot#appRoot#appRoot#appRoot#appRoot#appRoot.app
#battle.battle:not([hidden])
:is(
  .battle-command-state-readiness i[data-state="thinking"]::after,
  .skill-label:not(.skill-became-ready)[data-skill-readiness="ready"] > .inline-skill-cooldown,
  .skill-label[data-skill-readiness="cooldown"] > .inline-skill-cooldown::before,
  .energy[data-momentum-state="full"]:not(.momentum-ready)::after,
  .critical-health-cue,
  .meter[data-health-state="critical"]::after,
  .action-card:not(:disabled):not(.action-became-playable):not(.round-ready-option):not(.card-vfx-attacking):not(.card-vfx-casting):not(.card-vfx-state-casting):not(.card-vfx-state-damaged):not(.card-vfx-blocked),
  .inline-skill-action:not(:disabled):not(.card-vfx-attacking):not(.card-vfx-casting),
  .target-candidate:not(.selected-target) .target-reticle,
  .target-candidate .target-reticle::before,
  .selected-target .target-reticle::before,
  .is-target-preview:not(.is-target-committing) .target-reticle,
  .team-fighter:is(.target-candidate, .selected-target)::after,
  .fighter:is(.target-candidate, .selected-target) .character-face::after,
  .rimeblade-path-preview,
  .rimeblade-path-flow,
  #rimebladeDirectionDialog [data-direction-pending]::after
) {
  animation: none !important;
  animation-name: none !important;
}

html body:not(.maintenance-mode):is(
  [data-vfx-quality="low"],
  [data-battle-load="team"],
  [data-battle-load="crowded"],
  [data-vfx-performance-limited="true"]
)
#appRoot#appRoot#appRoot#appRoot#appRoot#appRoot#appRoot.app
#battle.battle:not([hidden])
:is(
  .target-candidate:not(.selected-target) .target-reticle,
  .target-candidate .target-reticle::before,
  .team-fighter.target-candidate,
  .fighter.target-candidate .character-face,
  .rimeblade-path-flow
) {
  filter: none !important;
  mix-blend-mode: normal !important;
}

/* Preserve the shield silhouette, without its continuously rotating conic layer. */
html body:not(.maintenance-mode):is(
  [data-vfx-quality="low"],
  [data-battle-load="team"],
  [data-battle-load="crowded"],
  [data-vfx-performance-limited="true"]
)
#appRoot#appRoot#appRoot#appRoot#appRoot#appRoot#appRoot.app
#battle.battle:not([hidden])
:is(.fighter, .team-fighter).security-ward-active
:is(.avatar, .team-art)::before {
  animation: none !important;
  filter: none !important;
  mix-blend-mode: normal !important;
  box-shadow:
    inset 0 0 12px rgba(255, 255, 255, .18),
    0 0 10px rgba(255, 226, 118, .34) !important;
}

html body:not(.maintenance-mode):is(
  [data-vfx-quality="low"],
  [data-battle-load="team"],
  [data-battle-load="crowded"],
  [data-vfx-performance-limited="true"]
)
#appRoot#appRoot#appRoot#appRoot#appRoot#appRoot#appRoot.app
#battle.battle:not([hidden])
:is(.fighter, .team-fighter).security-ward-active
:is(.avatar, .team-art)::after {
  content: none !important;
  display: none !important;
  animation: none !important;
}

html body:not(.maintenance-mode):is(
  [data-vfx-quality="low"],
  [data-battle-load="team"],
  [data-battle-load="crowded"],
  [data-vfx-performance-limited="true"]
)
.targeting-trajectory-layer.is-active
:is(.targeting-trajectory-flow, .targeting-trajectory-node-target) {
  animation: none !important;
  filter: none !important;
}

@media (prefers-reduced-motion: reduce) {
  html body:not(.maintenance-mode) :is(
    .vfx-action-beat,
    .vfx-combat-telegraph,
    .vfx-impact-punctuation,
    .vfx-material-aftermath
  ) {
    animation: none !important;
  }
}
