/* PRE-9/9 safe profile: ambient compositing only. No clock, FPS or finite
   animation overrides; Low Power remains a separate user-owned setting. */
html.ios-performance-mode {
  /* Opt out at the four existing infinite card-animation declarations only.
     Do not override animation on cards: showdown/deal effects own it too. */
  --ponder-active-card-animation: none;
}

html.ios-performance-mode .pp-glitch-layer,
html.ios-performance-mode .pp-glitch-layer span,
html.ios-performance-mode .pp-particle-layer,
html.ios-performance-mode .pp-particle-layer span {
  display: none !important;
  animation: none !important;
  filter: none !important;
  mix-blend-mode: normal !important;
  will-change: auto !important;
}

html.ios-performance-mode #table::before,
html.ios-performance-mode #table::after {
  animation: none !important;
  mix-blend-mode: normal !important;
  filter: none !important;
  opacity: .18 !important;
  border-color: rgba(170, 74, 255, .24);
  box-shadow: inset 0 0 .5em rgba(170, 74, 255, .08);
  will-change: auto !important;
}

html.ios-performance-mode .seat.active-turn .seat-circle::before {
  animation: none !important;
  filter: none !important;
  opacity: .65;
  box-shadow: 0 0 .28em rgba(52, 236, 255, .24);
}

html.ios-performance-mode .seat:is(.active-turn, .timer-active) .seat-side::before,
html.ios-performance-mode .seat:is(.active-turn, .timer-active) .seat-side::after {
  animation: none !important;
  filter: none !important;
  mix-blend-mode: normal !important;
  will-change: auto !important;
}
html.ios-performance-mode .seat:is(.active-turn, .timer-active) .seat-side::after {
  display: none !important;
}
/* Leave the existing folded/intro/Low Power visibility owners in charge. */
html.ios-performance-mode:not(.low-power-mode) body:not(.ponder-table-intro-active):not(.ponder-table-ui-locked)
  .seat:is(.active-turn, .timer-active):not(.folded-seat) .seat-side::before {
  opacity: .45 !important;
  transform: translate(-50%, -50%) scale(.72) !important;
  border-color: rgba(52, 236, 255, .64) !important;
  background: rgba(52, 236, 255, .035) !important;
  box-shadow: 0 0 .25em rgba(52, 236, 255, .22) !important;
}
html.ios-performance-mode:not(.low-power-mode) #table .seat:is(.active-turn, .timer-active) .seat-side,
html.ios-performance-mode:not(.low-power-mode) #table .seat:is(.active-turn, .timer-active) .seat-cards {
  filter: none !important;
}
html.ios-performance-mode:not(.low-power-mode) #table .seat:is(.active-turn, .timer-active) .card-ui.seat-card,
html.ios-performance-mode:not(.low-power-mode) #table .seat:is(.active-turn, .timer-active) .card-back,
html.ios-performance-mode:not(.low-power-mode) #table .seat:not(#seat6):is(.active-turn, .timer-active):not(.showdown-loser-seat):not(.showdown-awarded-seat) .card-ui.seat-card,
html.ios-performance-mode:not(.low-power-mode) #table .seat:not(#seat6):is(.active-turn, .timer-active):not(.showdown-loser-seat):not(.showdown-awarded-seat) .card-back {
  border-color: rgba(150, 245, 255, .85) !important;
  box-shadow: 0 0 .24em rgba(52, 236, 255, .26) !important;
  filter: none !important;
}

html.ios-performance-mode #topHud,
html.ios-performance-mode #joinPanel,
html.ios-performance-mode #actions,
html.ios-performance-mode #actions button,
html.ios-performance-mode #raiseSliderWrap {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
html.ios-performance-mode #topHud {
  background-color: rgba(3, 7, 13, .64);
}

/* Only the background FX subtree, not HOME transitions/cards/buttons. */
html.ios-performance-mode #appHomeScreen .ponder-home-fx,
html.ios-performance-mode #appHomeScreen .ponder-home-fx *,
html.ios-performance-mode #appHomeScreen .ponder-home-fx *::before,
html.ios-performance-mode #appHomeScreen .ponder-home-fx *::after {
  animation: none !important;
  filter: none !important;
  mix-blend-mode: normal !important;
  will-change: auto !important;
}
html.ios-performance-mode #appHomeScreen .fx-particles,
html.ios-performance-mode #appHomeScreen .fx-mist {
  display: none !important;
}
