/**
 * BossDraw arena styles, shared by the draw page and the stream export:
 * the arena, sides, players, toasts, boss, banners and the winner screen.
 * Pixel fonts: Press Start 2P for numbers, Pixelify Sans for words (it keeps
 * Portuguese accents readable at small sizes).
 *
 * @author Henrique Cezar
 * @license MIT
 */

:root {
    --line: #37324a;
    --text: #e9e6f2;
    --muted: #9993ad;
    --accent: #f5c542;
    --hp: #e52521;
    --heal: #4ade80;
}

.draw-arena {
    --font-px: 'Press Start 2P', monospace;
    --font-name: 'Pixelify Sans', monospace;
    --outline: 1px 0 #000, -1px 0 #000, 0 1px #000, 0 -1px #000, 1px 1px #000, -1px -1px #000, 1px -1px #000, -1px 1px #000;
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    grid-template-rows: 44% 1fr;
    align-items: start;
    gap: 0 16px;
    height: 600px;
    padding: 24px 16px;
    background: #6ec6f0 url('../imagens/land.png') center 34% / cover no-repeat;
    image-rendering: pixelated;
    border: 1px solid var(--line);
    overflow: hidden;
    font-family: var(--font-name);
    font-variant-ligatures: none;
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: grayscale;
    font-smooth: never;
}

.draw-toasts {
    position: absolute;
    left: 12px;
    top: 12px;
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    pointer-events: none;
}

.draw-toast {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px 6px 8px;
    background: rgba(0, 0, 0, .72);
    border-left: 4px solid var(--hp);
    font: 700 20px/1 var(--font-name);
    text-shadow: var(--outline);
    white-space: nowrap;
    animation: draw-toast var(--toast-ms, 3500ms) linear forwards;
}

.draw-toast-name { overflow: hidden; text-overflow: ellipsis; }

.draw-skull {
    flex: none;
    width: 21px;
    height: 21px;
    background: var(--icon-skull) center / contain no-repeat;
}

.draw-army {
    position: relative;
    display: flex;
    gap: 24px;
    align-items: center;
    min-width: 0;
}

.draw-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.draw-side-head {
    display: flex;
    gap: 8px;
    font: 700 15px/1 var(--font-name);
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text);
    text-shadow: var(--outline);
}

.draw-side-count { color: var(--accent); font: 11px/15px var(--font-px); }

.draw-side-body {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 2px 0;
    justify-content: center;
    align-content: center;
    width: 100%;
}

.draw-player {
    position: relative;
    width: 124px;
    text-align: center;
    transition: opacity .6s, filter .6s;
}

.draw-clip {
    position: relative;
    width: 124px;
    height: 84px;
    margin: 0 auto;
    transition: filter .2s;
}

.draw-clip .draw-sprite { position: absolute; text-align: left; line-height: 0; }

.draw-flip { transform: scaleX(-1); }

/* one frame after a hidden tab's catch-up: the new state shows at once, nothing slides into it */
.draw-snap, .draw-snap * { transition: none !important; }

.draw-targeted .draw-clip { filter: drop-shadow(0 0 3px #ff3b30); }
.draw-facing-left .draw-clip { transform: scaleX(-1); }
.draw-walking { z-index: 2; }
.draw-layer { position: absolute; inset: 0; pointer-events: none; }
.draw-layer .draw-player { position: absolute; left: 0; top: 0; transition: none; }

.draw-hearts {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    gap: 2px;
    height: 12px;
    transform: translateY(var(--hearts-drop, 0px));
}

.draw-heart {
    width: 14px;
    height: 12px;
    background: var(--icon-heart) center / contain no-repeat;
}

.draw-heart-empty { background-image: var(--icon-heart-empty); }

/* Shields (extra hearts from the rules): a row above the hearts, lost first. Both rows sit just above the hero's head (--hearts-drop). */
.draw-shields {
    position: absolute;
    z-index: 1;
    top: calc(-14px + var(--hearts-drop, 0px));
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 2px;
    height: 12px;
}
.draw-shield { width: 14px; height: 12px; background: var(--icon-shield) center / contain no-repeat; }
.draw-shield-empty { background-image: var(--icon-shield-empty); }

/* Option: the dead fade out of the field (their cell stays, so nobody moves). */
.draw-hide-dead .draw-dead { opacity: 0; transition: opacity .8s ease 1.4s; }

.draw-name {
    display: inline-block;
    max-width: 122px;
    margin-top: 1px;
    padding: 1px 5px 2px;
    border-radius: 4px;
    background: rgba(0, 0, 0, .58);
    font: 700 max(19px, calc(14px / var(--army-zoom, 1)))/1.1 var(--font-name);
    text-shadow: var(--outline);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: top;
}

.draw-poof {
    position: absolute;
    left: 30px;
    top: 18px;
    width: 64px;
    height: 64px;
    pointer-events: none;
    background: radial-gradient(circle, #fff 0 22%, #d9d4ec 23% 42%, rgba(160, 150, 190, .7) 43% 60%, transparent 61%);
    animation: draw-poof .5s steps(5) forwards;
}

.draw-dead { opacity: .3; filter: grayscale(1); }
.draw-hit { animation: draw-hit .45s; }
.draw-healed .draw-hearts { animation: draw-heal .45s; }
.draw-winner { opacity: 1; filter: drop-shadow(0 0 6px var(--accent)); }
.draw-winner .draw-name { font-weight: 700; }

.draw-boss-zone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.draw-boss-label {
    font: 700 18px/1 var(--font-name);
    letter-spacing: 2px;
    color: var(--accent);
    text-transform: uppercase;
    text-shadow: var(--outline);
}

.draw-hp {
    position: relative;
    margin: 12px 0 8px 24px;
    background-repeat: no-repeat;
}

.draw-hp-track { position: absolute; overflow: hidden; }

.draw-hp-fill {
    height: 100%;
    background-repeat: no-repeat;
    transition: width .2s steps(8);
}

.draw-hp-emblem {
    position: absolute;
    left: -30px;
    top: 50%;
    transform: translateY(-50%);
    background-repeat: no-repeat;
}

.draw-hp-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font: 600 12px/1 var(--font-name);
    text-shadow: var(--outline);
    white-space: nowrap;
}

.draw-scenery { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.draw-scenery > div, .draw-hp, .draw-hp div, .draw-boss, .draw-player { image-rendering: pixelated; }
.draw-wall { position: absolute; left: 0; right: 0; bottom: 54%; background-repeat: repeat-x; }
.draw-floor { position: absolute; left: 0; right: 0; top: 46%; bottom: 0; background-repeat: repeat; }
.draw-shade { position: absolute; inset: 0; }
.draw-wall-foot { position: absolute; left: 0; right: 0; top: 46%; background-repeat: repeat-x; }
.draw-deco { position: absolute; background-repeat: no-repeat; }
/* animated scene decorations: a strip of frames slid frame by frame (--strip-end = minus the strip's width) */
@keyframes draw-strip { from { background-position-x: 0; } to { background-position-x: var(--strip-end); } }
.draw-toasts, .draw-army, .draw-boss-zone { position: relative; z-index: 1; }
.draw-toasts { z-index: 3; }
.draw-army { grid-column: 1; grid-row: 2; }
.draw-boss-zone { grid-column: 2; grid-row: 2; align-self: start; margin-top: -40px; }

.draw-boss {
    position: relative;
    transition: opacity .8s;
}

.draw-boss .draw-sprite { position: absolute; left: 0; top: 0; }

.draw-boss-dead { opacity: .5; }

.draw-float {
    position: absolute;
    top: 30%;
    pointer-events: none;
    font: 12px/1 var(--font-px);
    text-shadow: var(--outline);
    animation: draw-float linear forwards;
}

.draw-float-damage { color: #fff; }
.draw-float-miss { color: var(--accent); top: 0; left: 50% !important; transform: translateX(-50%); font-size: 10px; }

.draw-banner {
    position: absolute;
    left: 50%;
    top: 12px;
    transform: translateX(-50%);
    padding: 8px 14px;
    background: rgba(0, 0, 0, .8);
    border: 2px solid var(--accent);
    color: var(--accent);
    font: 700 18px/1.3 var(--font-name);
    letter-spacing: 1px;
    text-shadow: var(--outline);
    opacity: 0;
    transition: opacity .3s;
    white-space: nowrap;
}

.draw-banner-show { opacity: 1; }
.draw-shake { animation: draw-shake .35s; }

.draw-result {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: radial-gradient(circle at 50% 45%, rgba(20, 14, 4, .55), rgba(6, 4, 10, .88) 70%);
    text-align: center;
}

.draw-result-title { font: 700 22px/1 var(--font-name); letter-spacing: 4px; text-transform: uppercase; color: var(--text); text-shadow: var(--outline); }
.draw-coin { width: 128px; height: 128px; }
.draw-result-names { padding: 0 16px; font: 700 40px/1.2 var(--font-name); text-shadow: var(--outline), 0 3px 0 #000; }
.draw-result-meta { margin-top: 10px; color: var(--muted); font: 14px/1 var(--font-name); }

@keyframes draw-float { to { transform: translateY(-60px); opacity: 0; } }
@keyframes draw-toast {
    0% { transform: translateX(-110%); opacity: 0; }
    6% { transform: none; opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}
@keyframes draw-poof {
    0% { transform: scale(.3); opacity: 1; }
    100% { transform: scale(1.4); opacity: 0; }
}
@keyframes draw-hit { 50% { filter: brightness(2) sepia(1) hue-rotate(-50deg) saturate(5); } }
@keyframes draw-heal { 50% { color: var(--heal); transform: scale(1.4); } }
@keyframes draw-shake {
    25% { transform: translate(-4px, 2px); }
    50% { transform: translate(4px, -2px); }
    75% { transform: translate(-2px, 1px); }
}

@media (max-width: 720px) {
    .draw-arena { grid-template-columns: minmax(0, 1fr); }
    .draw-toasts { left: 8px; top: 8px; width: 240px; }
}

.draw-banner { z-index: 3; }
.draw-result { z-index: 4; }

.draw-side.draw-warn .draw-player:not(.draw-dead) .draw-clip { animation: draw-warn .3s steps(1) infinite; }
.draw-side.draw-warn .draw-side-head { animation: draw-warn-text .3s steps(1) infinite; }

@keyframes draw-warn {
    50% { filter: brightness(.85) sepia(1) saturate(14) hue-rotate(-52deg) drop-shadow(0 0 3px #ff0000) drop-shadow(0 0 7px #ff2a2a); }
}

@keyframes draw-warn-text {
    50% { color: #ff4040; }
}

.draw-champions { display: flex; gap: 40px; justify-content: center; }
.draw-champion { display: flex; flex-direction: column; align-items: center; }
.draw-champion-stage { position: relative; width: 320px; height: 320px; }
.draw-champion-stage .draw-sprite { position: absolute; text-align: left; line-height: 0; }

.draw-rays {
    position: absolute;
    inset: -70px;
    border-radius: 50%;
    background: repeating-conic-gradient(from 0deg, rgba(255, 210, 80, .6) 0deg 7deg, rgba(255, 210, 80, 0) 7deg 18deg);
    -webkit-mask-image: radial-gradient(circle, #000 18%, transparent 68%);
    mask-image: radial-gradient(circle, #000 18%, transparent 68%);
    animation: draw-spin 9s linear infinite;
}

.draw-glow {
    position: absolute;
    inset: 30px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 236, 160, .85), rgba(255, 196, 60, .3) 45%, transparent 70%);
    animation: draw-pulse 1.4s ease-in-out infinite alternate;
}

.draw-particle {
    position: absolute;
    line-height: 0;
    text-align: left;
    opacity: 0;
    filter: sepia(1) saturate(7) hue-rotate(-14deg) brightness(1.25) drop-shadow(0 0 3px rgba(255, 200, 60, .9));
    animation: draw-particle 2.8s ease-in-out infinite;
}

.draw-champion-name { margin-top: -18px; font: 700 44px/1.1 var(--font-name); text-shadow: var(--outline), 0 3px 0 #000; }

@keyframes draw-spin { to { transform: rotate(360deg); } }
@keyframes draw-pulse { from { opacity: .65; transform: scale(.94); } to { opacity: 1; transform: scale(1.06); } }
@keyframes draw-particle {
    0% { opacity: 0; transform: translateY(14px) scale(.8); }
    25% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-46px) scale(1.15); }
}

/* Only a player's own grid cell takes clicks (their sprite overflows it onto the neighbours). */
.draw-lobby .draw-layer .draw-player, .draw-lobby .draw-layer .draw-player * { pointer-events: none; }
.draw-lobby .draw-layer .draw-player::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: var(--slot-w, 100%);
    height: var(--slot-h, 100%);
    pointer-events: auto;
    cursor: pointer;
}
.draw-lobby .draw-layer .draw-kick-menu, .draw-lobby .draw-layer .draw-kick-menu * { pointer-events: auto; }
.draw-kick-armed .draw-clip { filter: drop-shadow(0 0 3px #ff3030) drop-shadow(0 0 6px #ff3030); }
.draw-kick-armed { z-index: 6; }
.draw-kick-menu {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 4px);
    z-index: 6;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transform: translateX(-50%) scale(calc(1 / var(--army-zoom, 1)));
    transform-origin: 50% 100%;
}
.draw-kick-menu button {
    min-width: 110px;
    padding: 4px 12px 6px;
    border: 3px solid #0d0a10;
    border-radius: 0;
    color: #fff;
    font: 700 16px/1 var(--font-name);
    text-shadow: var(--outline);
    white-space: nowrap;
    cursor: pointer;
    box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .35), 0 3px 0 rgba(0, 0, 0, .4);
}
.draw-kick-yes { background: #c62828; }
.draw-kick-no { background: #3a2f45; }
.draw-kick-menu button:hover { filter: brightness(1.2); }

/* Time to speak: the winners under a countdown while the boss closes in. */
.draw-showdown {
    position: absolute;
    inset: 0;
    z-index: 4;
    overflow: hidden;
    background: radial-gradient(ellipse at 30% 70%, rgba(40, 6, 10, .55), rgba(4, 2, 8, .92) 75%);
    animation: draw-showdown-in .6s ease-out;
}
.draw-countdown {
    position: absolute;
    top: calc(max(96px, 14%) + var(--top-offset, 0px));
    left: 0;
    right: 0;
    text-align: center;
    font: 64px/1 var(--font-px);
    color: #ffe9a8;
    text-shadow: var(--outline), 0 4px 0 #000;
}
.draw-countdown-hurry { color: #ff4a3a; animation: draw-countdown-beat 1s ease-out infinite; }
.draw-showdown-prompt {
    position: absolute;
    top: calc(max(96px, 14%) + 88px + var(--top-offset, 0px));
    left: 0;
    right: 0;
    padding: 0 24px;
    text-align: center;
    font: 700 28px/1.2 var(--font-name);
    color: var(--text);
    text-shadow: var(--outline);
}
.draw-showdown-lane { position: absolute; left: 0; right: 0; bottom: 70px; height: 0; }
.draw-lane-sprite { position: absolute; top: 0; width: 0; height: 0; }
.draw-lane-sprite .draw-sprite { position: absolute; line-height: 0; text-align: left; }
.draw-lane-name {
    position: absolute;
    top: 10px;
    left: 0;
    transform: translateX(-50%);
    white-space: nowrap;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    font: 700 26px/1 var(--font-name);
    text-shadow: var(--outline), 0 3px 0 #000;
}
.draw-lane-boss { z-index: 1; }
.draw-lane-dead { animation: draw-boss-fade 1.8s ease-in 0.6s forwards; }
.draw-flare .draw-sprite { animation: draw-flare 1.2s ease-out forwards; }
.draw-flare-spark { animation-duration: 1.6s; }
.draw-executed .draw-sprite { filter: grayscale(1) brightness(.6); transition: filter .6s; }
.draw-stamp {
    position: absolute;
    top: -150px;
    left: 0;
    transform: translateX(-50%) rotate(-12deg);
    padding: 6px 14px;
    border: 4px solid #ff3a2a;
    font: 24px/1 var(--font-px);
    color: #ff3a2a;
    white-space: nowrap;
    text-shadow: 0 2px 0 #000;
    animation: draw-stamp .35s cubic-bezier(.2, 1.6, .4, 1);
}
.draw-lost-name { margin-top: 16px; color: #ff6a5a; text-decoration: line-through; }
.draw-lost-line { color: #ff8a7a; }

@keyframes draw-showdown-in { from { opacity: 0; } }
@keyframes draw-countdown-beat { 0% { transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes draw-flare {
    0% { filter: brightness(1); }
    30% { filter: brightness(2.4) sepia(1) saturate(4) hue-rotate(-12deg) drop-shadow(0 0 14px #ffd84a); }
    100% { filter: brightness(1.15) drop-shadow(0 0 8px #ffd84a); }
}
@keyframes draw-boss-fade { to { opacity: 0; } }
@keyframes draw-stamp { from { transform: translateX(-50%) rotate(-12deg) scale(3); opacity: 0; } }
.draw-in-showdown .draw-army,
.draw-in-showdown .draw-boss-zone,
.draw-in-showdown .draw-toasts { opacity: 0; transition: opacity .6s; }

.draw-bolt, .draw-blast { position: absolute; top: 0; left: 0; width: 0; height: 0; z-index: 2; }
.draw-bolt .draw-sprite, .draw-blast .draw-sprite { position: absolute; line-height: 0; text-align: left; }
.draw-bolt .draw-sprite { filter: sepia(1) saturate(6) hue-rotate(-12deg) brightness(1.5) drop-shadow(0 0 8px #ffe066) drop-shadow(0 0 16px #ffb020); }
.draw-blast .draw-sprite { filter: sepia(1) saturate(5) hue-rotate(-18deg) brightness(1.4) drop-shadow(0 0 10px #ffd040); }
.draw-blast-flash {
    position: absolute;
    left: -120px;
    top: -120px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 230, .95), rgba(255, 210, 80, .5) 35%, transparent 70%);
    animation: draw-blast-flash .5s ease-out forwards;
}
.draw-lane-hit .draw-sprite { filter: brightness(3) saturate(0); }
@keyframes draw-blast-flash { from { transform: scale(.2); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
.draw-whiteout {
    position: absolute;
    inset: 0;
    z-index: 20;
    overflow: hidden;
    pointer-events: none;
}
.draw-whiteout-glow {
    position: absolute;
    left: calc(var(--x) - 1700px);
    top: calc(var(--y) - 1700px);
    width: 3400px;
    height: 3400px;
    border-radius: 50%;
    background: radial-gradient(circle, #fff 0, #fff 52%, rgba(255, 249, 220, .95) 58%, rgba(255, 232, 150, .55) 64%, rgba(255, 220, 120, 0) 70%);
    transform: scale(0);
    animation: draw-whiteout-grow .85s cubic-bezier(.25, .6, .3, 1) forwards;
}
.draw-whiteout-fade { animation: draw-whiteout-out 1.7s cubic-bezier(.45, 0, .55, 1) forwards; }
@keyframes draw-whiteout-grow {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}
@keyframes draw-whiteout-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* The finishing blow: the hero charges and sparks rush in (the rumble and the camera are driven from draw_view.js). */
.draw-charging { animation: draw-charge-swell 1.4s cubic-bezier(.4, 0, .6, 1) forwards; }
.draw-charging .draw-sprite { animation: draw-charge-glow .18s steps(2) infinite; }
.draw-release { animation: draw-release .35s ease-out; }
/* The spectral sword finale: holy light, the hero's blue glow, the sword and its white slash. */
.draw-holy {
    position: absolute;
    width: 0;
    height: 0;
    z-index: 2;
    pointer-events: none;
    mix-blend-mode: screen;
}
.draw-holy > * { position: absolute; pointer-events: none; }
/* a soft beam pouring from above the screen onto the hero, fading towards the top */
.draw-holy-beam {
    left: -130px;
    bottom: -20px;
    width: 260px;
    height: 1000px;
    background: linear-gradient(90deg, rgba(255, 244, 214, 0), rgba(255, 244, 214, .16) 22%, rgba(255, 248, 228, .5) 50%, rgba(255, 244, 214, .16) 78%, rgba(255, 244, 214, 0));
    -webkit-mask-image: linear-gradient(to top, #000, #000 35%, transparent);
    mask-image: linear-gradient(to top, #000, #000 35%, transparent);
    filter: blur(10px);
    transform-origin: 50% 0;
    animation: draw-holy-pour .9s cubic-bezier(.2, .7, .3, 1) both, draw-holy-breathe 3.2s ease-in-out .9s infinite;
}
.draw-holy-core {
    left: -34px;
    bottom: -10px;
    width: 68px;
    height: 1000px;
    background: linear-gradient(90deg, rgba(255, 255, 245, 0), rgba(255, 255, 245, .75), rgba(255, 255, 245, 0));
    -webkit-mask-image: linear-gradient(to top, #000, #000 25%, transparent 90%);
    mask-image: linear-gradient(to top, #000, #000 25%, transparent 90%);
    filter: blur(5px);
    transform-origin: 50% 0;
    animation: draw-holy-pour .8s cubic-bezier(.2, .7, .3, 1) .1s both, draw-holy-flicker 1.7s ease-in-out 1s infinite;
}
/* faint shafts drifting inside the beam */
.draw-holy-shafts {
    left: -110px;
    bottom: 0;
    width: 220px;
    height: 900px;
    background: repeating-linear-gradient(90deg, rgba(255, 250, 230, 0) 0 14px, rgba(255, 250, 230, .2) 19px, rgba(255, 250, 230, 0) 26px 40px);
    -webkit-mask-image: linear-gradient(to top, #000, rgba(0, 0, 0, .8) 30%, transparent);
    mask-image: linear-gradient(to top, #000, rgba(0, 0, 0, .8) 30%, transparent);
    filter: blur(3px);
    transform-origin: 50% 0;
    animation: draw-holy-pour 1s cubic-bezier(.2, .7, .3, 1) .15s both, draw-holy-shimmer 5s linear infinite;
}
/* the glow behind the hero, and the light pooling on the ground */
.draw-holy-bloom {
    left: -150px;
    top: calc(-1 * var(--hero-h) - 70px);
    width: 300px;
    height: calc(var(--hero-h) + 140px);
    background: radial-gradient(ellipse at 50% 58%, rgba(255, 250, 232, .6), rgba(255, 236, 170, .22) 42%, rgba(255, 230, 150, 0) 70%);
    filter: blur(6px);
    animation: draw-holy-bloom-in .8s ease-out .2s both, draw-holy-breathe 2.4s ease-in-out 1s infinite;
}
.draw-holy-halo {
    left: -140px;
    top: -26px;
    width: 280px;
    height: 52px;
    background: radial-gradient(ellipse at 50% 50%, rgba(255, 252, 235, .85), rgba(255, 236, 170, .38) 42%, rgba(255, 220, 130, 0) 72%);
    filter: blur(3px);
    animation: draw-holy-halo-in .7s ease-out .3s both, draw-holy-breathe 2s ease-in-out 1s infinite;
}
.draw-holy-motes { left: 0; top: 0; }
.draw-holy-motes i {
    position: absolute;
    top: -12px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #fffbe8;
    box-shadow: 0 0 6px 2px rgba(255, 236, 170, .9);
    opacity: 0;
    animation: draw-holy-mote 2.2s ease-in infinite;
}
.draw-holy-brief { animation: draw-holy-out .8s ease-in .7s forwards; }
@keyframes draw-holy-pour { from { opacity: 0; transform: scaleY(0); } to { opacity: 1; transform: scaleY(1); } }
@keyframes draw-holy-breathe { 50% { opacity: .78; } }
@keyframes draw-holy-flicker { 0%, 100% { opacity: 1; } 40% { opacity: .8; } 70% { opacity: .95; } }
@keyframes draw-holy-shimmer { to { background-position: 40px 0; } }
@keyframes draw-holy-bloom-in { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes draw-holy-halo-in { from { opacity: 0; transform: scaleX(.3); } to { opacity: 1; transform: none; } }
@keyframes draw-holy-mote {
    0% { opacity: 0; transform: translate(0, 0) scale(.6); }
    20% { opacity: 1; }
    100% { opacity: 0; transform: translate(var(--drift), -260px) scale(1); }
}
@keyframes draw-holy-out { to { opacity: 0; } }
.draw-holy-glow .draw-sprite { filter: drop-shadow(0 0 4px #9be7ff) drop-shadow(0 0 12px #3b9bff); }
.draw-swordfx { position: absolute; width: 0; height: 0; z-index: 4; pointer-events: none; }
.draw-swordfx-turn { position: absolute; left: 0; top: 0; width: 0; height: 0; }
.draw-swordfx .draw-sprite { filter: drop-shadow(0 0 6px #8fe3ff) drop-shadow(0 0 16px #2f8fff); }
.draw-swordfx-charged .draw-sprite { filter: brightness(1.6) drop-shadow(0 0 10px #c8f4ff) drop-shadow(0 0 26px #3fa0ff); }
/* a boss struck by a heavy blow: a pure white silhouette for the hit and its freeze */
.draw-lane-white .draw-sprite { filter: brightness(0) invert(1) drop-shadow(0 0 6px #fff) !important; }
.draw-impact { position: absolute; width: 0; height: 0; z-index: 5; pointer-events: none; }
/* the holy finale: angel cats, their bolts and sparks, the power gathering into the healer, the boss lighting up, the explosion */
.draw-angelcat, .draw-catshot, .draw-holyboom { position: absolute; width: 0; height: 0; pointer-events: none; }
.draw-angelcat { z-index: 4; }
/* the dark pact finale */
.draw-ground-clip { position: absolute; top: 0; width: 0; height: 0; pointer-events: none; clip-path: inset(-3000px -3000px 0 -3000px); }
.draw-pact-ghost { position: absolute; left: 0; top: 0; width: 0; height: 0; }
.draw-pact-ghost .draw-sprite { opacity: .82; filter: drop-shadow(0 0 5px #c9b8ff) drop-shadow(0 0 14px rgba(120, 70, 255, .6)); }
.draw-pact-fire { position: absolute; width: 0; height: 0; z-index: 4; pointer-events: none; transform-origin: 0 0; }
.draw-pact-fire .draw-sprite { filter: drop-shadow(0 0 6px #ff7a1a) drop-shadow(0 0 16px rgba(255, 60, 0, .6)); }
.draw-pact-dark { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 60%, rgba(20, 0, 30, .35), rgba(5, 0, 12, .7)); pointer-events: none; }
.draw-pact-circle { position: absolute; width: 0; height: 0; z-index: 0; pointer-events: none; }
.draw-pact-circle .draw-sprite { filter: drop-shadow(0 0 6px #b24bff) drop-shadow(0 0 18px rgba(170, 60, 255, .7)); }
.draw-pact-flame { position: absolute; width: 0; height: 0; pointer-events: none; }
.draw-pact-flame .draw-sprite { filter: drop-shadow(0 0 5px #ff8a2a); }
.draw-pact-glow .draw-sprite { animation: draw-pact-glow 1.1s ease-in-out infinite alternate; }
@keyframes draw-pact-glow {
    from { filter: drop-shadow(0 0 2px #ff5a2a) drop-shadow(0 0 6px rgba(140, 30, 255, .5)); }
    to { filter: drop-shadow(0 0 5px #ff7a2a) drop-shadow(0 0 16px rgba(160, 40, 255, .9)); }
}
.draw-pact-held .draw-sprite { animation: draw-pact-shiver .1s steps(2) infinite; }
@keyframes draw-pact-shiver { from { translate: -2px 0; } to { translate: 2px 0; } }
.draw-blackout { position: absolute; inset: 0; z-index: 30; background: #000; opacity: 0; pointer-events: none; }
.draw-angelcat .draw-sprite { filter: drop-shadow(0 0 4px #fff6c8) drop-shadow(0 0 12px #ffd86b); }
.draw-catshot { z-index: 5; }
.draw-catshot .draw-sprite { filter: drop-shadow(0 0 4px #fff) drop-shadow(0 0 8px #ff8fb0); }
.draw-angel-channel { position: absolute; width: 0; height: 0; pointer-events: none; z-index: 4; }
.draw-angel-channel .draw-sprite { filter: brightness(1.4) drop-shadow(0 0 4px #fff) drop-shadow(0 0 12px rgba(255, 255, 255, .8)); }
.draw-holyboom { z-index: 6; }
.draw-holyboom .draw-sprite { filter: drop-shadow(0 0 18px #fff3c0); }
.draw-impact .draw-sprite { filter: brightness(1.2) drop-shadow(0 0 6px #fff) drop-shadow(0 0 14px #6fd0ff); }
.draw-converge.draw-converge-blue { filter: brightness(.5) sepia(1) saturate(12) hue-rotate(165deg) brightness(1.9) drop-shadow(0 0 5px #4fc8ff); }
.draw-slash {
    position: absolute;
    width: 3200px;
    height: 6px;
    margin: 0;
    background: #fff;
    box-shadow: 0 0 16px 6px rgba(200, 240, 255, .9);
    pointer-events: none;
    z-index: 30;
}
.draw-slash-small { width: 220px; height: 5px; z-index: 5; animation: draw-holy-out .4s ease-in forwards; }

.draw-converge {
    position: absolute;
    line-height: 0;
    text-align: left;
    opacity: 0;
    filter: sepia(1) saturate(7) hue-rotate(-14deg) brightness(1.4) drop-shadow(0 0 4px rgba(255, 210, 70, .95));
    animation: draw-converge .7s ease-in infinite;
}
@keyframes draw-charge-swell {
    0% { transform: scale(1); }
    70% { transform: scale(1.22); }
    85% { transform: scale(1.18) translateY(2px); }
    100% { transform: scale(1.28); }
}
@keyframes draw-charge-glow {
    from { filter: brightness(1.6) sepia(.6) saturate(3) drop-shadow(0 0 10px #ffd84a); }
    to { filter: brightness(2.4) sepia(1) saturate(4) drop-shadow(0 0 18px #fff3a0); }
}
@keyframes draw-release {
    0% { transform: scale(1.28); }
    40% { transform: scale(.92) translateX(-6px); }
    100% { transform: scale(1); }
}
@keyframes draw-converge {
    0% { transform: translate(var(--dx), var(--dy)) scale(1.1); opacity: 0; }
    25% { opacity: 1; }
    100% { transform: translate(0, 0) scale(.25); opacity: 0; }
}


/* Four to ten winners: two rows of smaller heroes. */
.draw-champions-many { flex-wrap: wrap; gap: 0 18px; max-width: 1100px; }
.draw-champions-many .draw-rays { inset: -30px; }
.draw-champions-many .draw-glow { inset: 20px; }
.draw-champions-many .draw-champion-name { margin-top: -14px; max-width: 200px; font-size: 24px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.draw-showdown-many .draw-lane-name { top: 6px; max-width: 116px; font-size: 17px; }
.draw-showdown-many .draw-showdown-prompt { font-size: 22px; }


/* More than five hearts: one heart and "hp/max". */
.draw-heart-count { margin-left: 3px; font: 700 12px/12px var(--font-name); color: #fff; text-shadow: var(--outline); white-space: nowrap; }

/* Added effects from a player's profile (cosmetic). */
.draw-effect { position: absolute; left: 50%; top: 96px; width: 0; height: 0; pointer-events: none; z-index: 1; }
/* its filter and twinkle come from DRAW_GAME.cosmetics.effectLooks (drawEffectLook) */
.draw-effect-spark { position: absolute; line-height: 0; text-align: left; opacity: 0; }
.draw-dead .draw-effect { display: none; }
