/* Battle clash (battle-clash.js): a see-through layer over the two streams while two Pips collide in the middle. At the
   moment they meet (.is-impact) a flash, a shockwave ring and sparks burst from the centre and the layer shakes. */
.battle-clash{position:fixed;z-index:1500;pointer-events:none;overflow:hidden}
.battle-clash-canvas{display:block;width:100%;height:100%}
.battle-clash-burst{position:absolute;left:50%;top:50%;width:0;height:0}
.battle-clash-flash,.battle-clash-ring,.battle-clash-spark{position:absolute;left:0;top:0;opacity:0}
.battle-clash-flash{width:220px;height:220px;margin:-110px 0 0 -110px;border-radius:50%;background:radial-gradient(circle,#fff 0,#fff7d6 22%,#fbbf24aa 40%,#60a5fa55 58%,transparent 70%)}
.battle-clash-ring{width:120px;height:120px;margin:-60px 0 0 -60px;border-radius:50%;border:4px solid #fff;box-shadow:0 0 18px #fbbf24,inset 0 0 12px #60a5fa}
.battle-clash-spark{width:6px;height:22px;margin:-11px 0 0 -3px;border-radius:3px;background:linear-gradient(#fff,#fbbf24 45%,#f97316);transform:rotate(var(--a)) translateY(0)}
.battle-clash-spark:nth-child(odd){background:linear-gradient(#fff,#93c5fd 45%,#3b82f6)}
.battle-clash.is-impact{animation:battle-clash-shake .36s cubic-bezier(.36,.07,.19,.97) both}
.battle-clash.is-impact .battle-clash-flash{animation:battle-clash-flash .45s ease-out both}
.battle-clash.is-impact .battle-clash-ring{animation:battle-clash-ring .55s cubic-bezier(.2,.8,.2,1) both}
.battle-clash.is-impact .battle-clash-spark{animation:battle-clash-spark .6s cubic-bezier(.15,.85,.3,1) both}
@keyframes battle-clash-flash{0%{opacity:1;transform:scale(.2)}35%{opacity:1}100%{opacity:0;transform:scale(1.6)}}
@keyframes battle-clash-ring{0%{opacity:.95;transform:scale(.2)}100%{opacity:0;transform:scale(2.6)}}
@keyframes battle-clash-spark{0%{opacity:1;transform:rotate(var(--a)) translateY(0) scaleY(1)}100%{opacity:0;transform:rotate(var(--a)) translateY(calc(-130px * var(--d))) scaleY(.4)}}
@keyframes battle-clash-shake{10%,90%{transform:translateX(-2px)}20%,80%{transform:translateX(5px)}30%,50%,70%{transform:translate(-7px,2px)}40%,60%{transform:translate(7px,-2px)}}
/* The owner's impact clip (November 22, 2026): its own layer over the streams, screen-blended so the clip's dark storm
   drops away and only the burst, lightning, sparks and spray show. The layer reaches a little above and below the
   streams; the clip is about as tall as the streams (--clash-h), centred on its spark (45% down the clip) where the Pips
   meet, with its edges faded; hidden until the hit. While it plays, the coded flash, ring and sparks stay hidden. */
.battle-clash-impact{position:fixed;z-index:1501;pointer-events:none;overflow:hidden;mix-blend-mode:screen}
.battle-clash-video{position:absolute;left:50%;top:50%;height:calc(var(--clash-h,100%)*1.05);width:auto;aspect-ratio:16/9;max-width:none;translate:-50% -45%;opacity:0;filter:contrast(1.25) brightness(.86);-webkit-mask:radial-gradient(ellipse 50% 50% at 50% 45%,#000 45%,transparent 100%);mask:radial-gradient(ellipse 50% 50% at 50% 45%,#000 45%,transparent 100%)}
.battle-clash-impact.is-playing .battle-clash-video{opacity:1}
.battle-clash-impact.is-playing{animation:battle-clash-shake .36s cubic-bezier(.36,.07,.19,.97) both}
.battle-clash.is-video .battle-clash-flash,.battle-clash.is-video .battle-clash-ring,.battle-clash.is-video .battle-clash-spark{display:none}
@media (prefers-reduced-motion:reduce){.battle-clash.is-impact,.battle-clash.is-impact *{animation:none!important}.battle-clash-impact{display:none}}
