/* Count in quick bursts without Smart Zoom. Keep pan/pinch on the board.
   Some iPad Safari builds need 'none' on the actual repeat-tap targets. */
.pp-table .pp-table-board,.pp-table button,.pp-table [role="button"]{touch-action:manipulation}
.pp-table button:is([data-act="life"],[data-act="command"],[data-act="poison"],[data-act="red"],[data-act="custom-counter"],[data-act="mana"]){touch-action:none;user-select:none;-webkit-user-select:none}
/* Retain the resting background, lift just a cropped copy over its owner's UI. */
.pp-player>.pp-magic-source-art{
  position:absolute;inset:0;z-index:5;overflow:hidden;border-radius:inherit;
  pointer-events:none;user-select:none;
  -webkit-mask-image:radial-gradient(ellipse at 45% 47%,#000 28%,#000e 53%,transparent 97%);
  mask-image:radial-gradient(ellipse at 45% 47%,#000 28%,#000e 53%,transparent 97%);
  opacity:calc(.81 * var(--spell-art-amount,0));
  transform:translateY(calc(1.6% - 3.2% * var(--spell-art-amount,0))) scale(calc(1 + .05 * var(--spell-art-amount,0)));
}
.pp-magic-source-art-image{display:block;width:100%;height:100%;object-fit:cover;object-position:center;pointer-events:none}
.pp-magic-source-art::after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(148deg,color-mix(in srgb,var(--spell-art-tone) 20%,transparent),transparent 52%)}
.pp-player-phased .pp-magic-source-art-image{filter:saturate(.37) grayscale(.36)}
.pp-magic-layer{position:fixed;inset:0;z-index:9;pointer-events:none;overflow:hidden;user-select:none}
.pp-magic-layer .pp-magic-beam>path{fill:none;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:.22 1.3;stroke-dashoffset:.22;opacity:0;animation:pp-magic-flight var(--spell-flight) var(--spell-ease) var(--spell-delay) both,pp-magic-spark var(--spell-flight) linear var(--spell-delay) both}
.pp-magic-ambient{stroke:var(--spell-tone);stroke-width:11;stroke-opacity:.2}
.pp-magic-thread{stroke:var(--spell-tone);stroke-width:4.6;stroke-opacity:.88}
.pp-magic-core{stroke:#fffcf7;stroke-width:1.65}
.pp-magic-comet{fill:#fffbf5;opacity:0;animation:pp-magic-spark var(--spell-flight) linear var(--spell-delay) both}
.pp-magic-impact{pointer-events:none}
.pp-magic-ring,.pp-magic-halo,.pp-magic-star,.pp-magic-particle{opacity:0;animation-delay:var(--spell-delay);animation-fill-mode:both}
.pp-magic-ring,.pp-magic-halo{fill:none;stroke:var(--spell-tone);stroke-width:1.8;animation:pp-magic-ring 400ms ease-out var(--spell-delay) both}
.pp-magic-halo{stroke-width:.9;stroke-dasharray:2.8 3.7;animation-duration:425ms}
.pp-magic-star{fill:#fffcf5;animation:pp-magic-star 340ms ease-out var(--spell-delay) both}
.pp-magic-particle{fill:#fff6eb;animation:pp-magic-particle 400ms ease-out var(--spell-delay) both}
@keyframes pp-magic-flight{from{stroke-dashoffset:.22}to{stroke-dashoffset:-.78}}
@keyframes pp-magic-spark{0%,100%{opacity:0}10%{opacity:.93}84%{opacity:.88}}
@keyframes pp-magic-ring{0%{transform:scale(.58);opacity:0}14%{opacity:.78}100%{transform:scale(2.6);opacity:0}}
@keyframes pp-magic-star{0%{transform:scale(.42);opacity:0}17%{transform:scale(1.15);opacity:.96}100%{transform:rotate(22deg) scale(.32);opacity:0}}
@keyframes pp-magic-particle{0%{transform:translate(0);opacity:0}14%{opacity:.8}100%{transform:translate(var(--spell-x),var(--spell-y));opacity:0}}
.pp-magic-static-highlight{outline:2px solid #e9c4ff;outline-offset:-2px}
@media(prefers-reduced-motion:reduce){.pp-magic-layer,.pp-magic-source-art{display:none}}
/* Four different projectile silhouettes/trails; all stay inside the same capped overlay. */
.pp-magic-cast[data-fx-theme=lair] .pp-magic-beam>path{stroke-linejoin:bevel}
.pp-magic-cast[data-fx-theme=lair] .pp-magic-thread{stroke:#c7ff73;stroke-width:5.5}
.pp-magic-cast[data-fx-theme=lair] .pp-magic-star{fill:#ffd27a}
.pp-magic-cast[data-fx-theme=lair] .pp-magic-ambient{stroke-width:17;stroke-opacity:.32}
.pp-magic-cast[data-fx-theme=pixel] .pp-magic-beam>path{stroke-linecap:square;stroke-linejoin:miter;shape-rendering:crispEdges}
.pp-magic-cast[data-fx-theme=pixel] .pp-magic-ring,.pp-magic-cast[data-fx-theme=pixel] .pp-magic-star,.pp-magic-cast[data-fx-theme=pixel] .pp-magic-comet{shape-rendering:crispEdges}
.pp-magic-cast[data-fx-theme=pixel] .pp-magic-core{stroke:#fbe29a;stroke-width:2}
.pp-magic-cast[data-fx-theme=pixel] .pp-magic-halo{display:none}
.pp-magic-cast[data-fx-theme=cyberpunk] .pp-magic-thread{stroke-width:4;stroke:#66f5ff}
.pp-magic-cast[data-fx-theme=cyberpunk] .pp-magic-ambient{stroke:#ff47ca;stroke-width:13;stroke-opacity:.4}
.pp-magic-cast[data-fx-theme=cyberpunk] .pp-magic-core{stroke:#dbfcff;stroke-width:1.15}
.pp-magic-cast[data-fx-theme=cyberpunk] .pp-magic-star{fill:none;stroke:#49f6ff;stroke-width:1.5}
.pp-magic-cast[data-fx-theme=surreal] .pp-magic-ambient{stroke:#e09bdc;stroke-width:20;stroke-opacity:.29}
.pp-magic-cast[data-fx-theme=surreal] .pp-magic-thread{stroke:#ffd8ae;stroke-width:3.2}
.pp-magic-cast[data-fx-theme=surreal] .pp-magic-star{fill:none;stroke:#ffe1c4;stroke-width:1.35}
.pp-magic-cast[data-fx-theme=surreal] .pp-magic-halo{stroke:#aeeeff}
