/* Infinimix, 14/11 battle round: the summoning card button (with its odds bar, the breakdown and the "+1 card" chip),
   the card counter in the top bar, the card that flies to it, and the flat (no WebGL) throw. After infiniworld.css. */

/* the throw: a full-width row with the button and, when cards can be bought, a small chip */
.wthr-wrap { grid-column: 1 / -1; display: flex; gap: 7px; align-items: stretch; min-width: 0; }
.wthr-wrap .wthrowmv { flex: 1 1 auto; min-width: 0; grid-column: auto; padding-bottom: 13px; }
.wthrowmv .wmv-t { flex: 1 1 auto; }
.wthrowmv .wmv-ic { position: relative; background: rgba(255, 255, 255, .2); box-shadow: none; }
.wthrowmv .wmv-ic::before { content: ""; position: absolute; inset: -3px; border-radius: 50%;
  background: conic-gradient(#fff, #ffe27a, #fff 30%, rgba(255, 255, 255, .25) 50%, #fff 75%, #ffe27a, #fff);
  -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
  mask: radial-gradient(closest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px)); animation: wthr-spin 2.4s linear infinite; }
.wthrowmv:not([disabled]) .wmv-ic svg { animation: wthr-bob 1.6s ease-in-out infinite; }
.wthrowmv .wmv-ic svg { width: 22px; height: 22px; }
.wthr-n { flex: none; align-self: center; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 4px 9px 5px; border-radius: 14px;
  background: rgba(20, 8, 60, .3); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .55); white-space: nowrap; }
.wthr-n b { font: 700 19px/1 Fredoka, sans-serif; text-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
.wthrowmv .wthr-n small { font: 800 10px/1.2 Nunito, sans-serif; color: #fff; display: block; -webkit-line-clamp: unset; }
.wthr-bar { position: absolute; left: 12px; right: 12px; bottom: 5px; height: 4px; border-radius: 99px; background: rgba(20, 8, 60, .28); overflow: hidden; font-style: normal; }
.wthr-bar > i { display: block; width: var(--p, 0%); height: 100%; border-radius: inherit; background: linear-gradient(90deg, #fff, #ffe27a); box-shadow: 0 0 8px #fff; }
.wthr-bd { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.wthr-bd i { padding: 0 6px; border-radius: 99px; background: rgba(20, 8, 60, .25); color: #fff; font: 800 9.5px/1.6 Nunito, sans-serif; font-style: normal; white-space: nowrap; }
.wthr-bd i.up { background: rgba(255, 255, 255, .3); }
.wthr-bd i.down { background: rgba(80, 0, 30, .35); }
.wthrowmv[disabled] { filter: grayscale(.55); opacity: .62; }
.wthrowmv[disabled] .wmv-ic::before { animation: none; }
.wthr-buy { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-width: 62px; padding: 6px 8px;
  border-radius: 16px; border: 2px solid #fff; cursor: pointer; color: #4a2a00; font: 800 13px/1.1 Nunito, sans-serif;
  background: linear-gradient(160deg, #fff6c8, #ffd23d 60%, #ffb000); box-shadow: 0 4px 0 #b67a00, 0 8px 16px rgba(255, 180, 40, .35); }
.wthr-buy span { padding: 1px 7px; border-radius: 99px; background: rgba(255, 255, 255, .7); font-size: 11px; }
.wthr-buy:active { transform: translateY(3px); box-shadow: 0 1px 0 #b67a00; }
.wthr-buy:disabled { opacity: .6; }
.wthr-buy.hot { animation: wthr-hot 1.1s ease-in-out infinite; }
@keyframes wthr-spin { to { transform: rotate(360deg); } }
@keyframes wthr-bob { 50% { transform: rotate(-12deg) translate(1px, -1px); } }
@keyframes wthr-hot { 50% { box-shadow: 0 4px 0 #b67a00, 0 0 0 5px rgba(255, 210, 61, .35), 0 0 20px rgba(255, 190, 40, .8); } }

/* the counter in the top bar: cards left, and what is in the backpack */
.wr-bag { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.wr-bag > i { font-style: normal; }
.wr-bag .wr-cd b { color: #e0428f; }
html:not(.light) .wr-bag .wr-cd b { color: #ff8ac0; }
.wr-bag .wr-cd.out { opacity: .55; }
.wr-bag .wr-sc { opacity: .85; }
.wr-bag.bump { animation: wbag-bump .55s cubic-bezier(.2, 1.6, .4, 1); }
.wr-bag .wr-cd.spend { display: inline-block; animation: wbag-spend .5s ease-out; }
.wr-bag .wr-cd.gain { display: inline-block; animation: wbag-gain .55s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes wbag-bump { 35% { transform: scale(1.22) rotate(-4deg); box-shadow: 0 0 0 4px rgba(255, 79, 163, .35), 0 0 18px rgba(61, 214, 255, .8); } }
@keyframes wbag-spend { 40% { transform: translateY(-4px) scale(.9); opacity: .6; } }
@keyframes wbag-gain { 40% { transform: scale(1.35); } }

/* a card flying to the backpack */
.wfly { position: fixed; z-index: 150; width: 34px; height: 50px; border-radius: 6px; pointer-events: none; transform: translate(-50%, -50%);
  background: url(/art/card-back.webp?v=2) center / cover, linear-gradient(135deg, #5ca8ff, #a470ff, #ff78c4); border: 2px solid #fff;
  box-shadow: 0 0 14px #fff, 0 0 26px rgba(255, 79, 163, .9); }
.wfly::after { content: "∞"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font: 700 20px/1 Fredoka, sans-serif; text-shadow: 0 0 6px #ff4fa3; }

/* no WebGL: the card is thrown in CSS */
.wthrow { position: absolute; z-index: 3; width: 30px; height: 44px; margin: -22px 0 0 -15px; border-radius: 5px; pointer-events: none;
  background: url(/art/card-back.webp?v=2) center / cover, linear-gradient(135deg, #5ca8ff, #a470ff, #ff78c4); border: 2px solid #fff;
  box-shadow: 0 0 12px #fff, 0 0 22px rgba(255, 79, 163, .8); animation: wthrow-fly .5s cubic-bezier(.3, .6, .4, 1) forwards; }
.wthrow::after { content: "∞"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font: 700 17px/1 Fredoka, sans-serif; }
@keyframes wthrow-fly { from { transform: translate(0, 0) rotate(0) scale(.6); } 50% { transform: translate(calc(var(--dx) * .5), calc(var(--dy) * .5 - 50px)) rotate(400deg) scale(1); }
  to { transform: translate(var(--dx), var(--dy)) rotate(720deg) scale(1); } }
.wthrow.shake { transform: translate(var(--dx), var(--dy)); animation: wthrow-shake .3s ease-in-out 3; }
@keyframes wthrow-shake { 25% { transform: translate(var(--dx), var(--dy)) rotate(-18deg); } 75% { transform: translate(var(--dx), var(--dy)) rotate(18deg); } }
.wthrow.held { animation: wthrow-held .45s ease-out forwards; }
@keyframes wthrow-held { from { transform: translate(var(--dx), var(--dy)); } 40% { transform: translate(var(--dx), var(--dy)) scale(1.4); box-shadow: 0 0 30px #ffe27a; }
  to { transform: translate(var(--dx), calc(var(--dy) - 60px)) scale(.4); opacity: 0; } }
.wthrow.burst { animation: wthrow-burst .35s ease-out forwards; }
@keyframes wthrow-burst { from { transform: translate(var(--dx), var(--dy)); } to { transform: translate(var(--dx), var(--dy)) scale(2.2) rotate(30deg); opacity: 0; filter: brightness(2) hue-rotate(-60deg); } }

/* 14/11 (balance report): a perfect catch's seal, stamped over the scene (gold / silver / bronze, the Power bonus) */
.wseal { position: absolute; left: 50%; top: 44%; z-index: 6; width: 150px; height: 150px; margin: -75px 0 0 -75px; display: grid; place-items: center;
  pointer-events: none; animation: wsealin .55s cubic-bezier(.2, 1.7, .4, 1) both; }
.wseal-rays { position: absolute; inset: -18px; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--sc) 70%, transparent) 0 7deg, transparent 7deg 20deg);
  -webkit-mask: radial-gradient(circle, transparent 40%, #000 46%, transparent 72%); mask: radial-gradient(circle, transparent 40%, #000 46%, transparent 72%);
  animation: wsealspin 4s linear infinite; }
.wseal-disc { position: relative; width: 112px; height: 112px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  border-radius: 50%; color: #2a1a00; text-align: center;
  background: radial-gradient(circle at 35% 28%, #fff 0 8%, color-mix(in srgb, var(--sc) 65%, #fff) 30%, var(--sc) 62%, color-mix(in srgb, var(--sc) 60%, #5a3a00));
  box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--sc), 0 0 34px var(--sc), inset 0 -6px 0 rgba(0, 0, 0, .12); }
.wseal-disc small { font: 800 9px/1.1 Nunito, sans-serif; letter-spacing: .8px; text-transform: uppercase; opacity: .8; }
.wseal-disc b { font: 700 24px/1 Fredoka, sans-serif; letter-spacing: .5px; text-shadow: 0 1px 0 rgba(255, 255, 255, .6); }
.wseal-disc em { font: 800 13px/1.2 Nunito, sans-serif; font-style: normal; }
.wseal.g-silver .wseal-disc { color: #26304a; }
.wseal.g-bronze .wseal-disc { color: #3a1a04; }
.wseal.out { animation: wsealout .35s ease-in both; }
@keyframes wsealin { from { transform: scale(2.2) rotate(-25deg); opacity: 0; } 60% { opacity: 1; } }
@keyframes wsealout { to { transform: scale(.6) translateY(-30px); opacity: 0; } }
@keyframes wsealspin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .wthrowmv .wmv-ic::before, .wthrowmv .wmv-ic svg, .wthr-buy.hot { animation: none; }
  .wseal, .wseal-rays, .wseal.out { animation: none; }
}

/* 15/11 (owner: "make the battle HUD smaller"): slimmer name plates that cover less of the arena (about 40% of its
   width), a thinner life bar, and skill buttons a little shorter */
.wscene.three .wfoe { width: 41%; right: 3%; }
.wscene.three .wme { width: 41%; left: 3%; }
.wscene .wplate { gap: 2px; padding: 4px 7px 5px; border-radius: 11px; border-width: 1.5px;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .5), 0 5px 12px rgba(10, 5, 40, .4); }
.wscene .wplate::before { left: 8px; right: 8px; height: 2px; }
.wscene .wp-top { gap: 4px; }
.wscene .wp-name { font-size: 12.5px; }
.wscene .wp-pw { padding: 0 5px; font-size: 9px; box-shadow: 0 1.5px 0 #c2357a; }
.wscene .wp-mid { gap: 3px; min-height: 12px; }
.wscene .wp-mid .ty { font-size: 7.5px; padding: 0 4px; line-height: 1.5; }
.wscene .wp-st { font-size: 10px; }
.wscene .wp-rib { left: 6px; bottom: calc(100% + 2px); gap: 3px; }
.wscene .wp-rib > span { padding: 0 6px; font-size: 8.5px; }
.wscene .wplate .whp { height: 9px; }
.wscene .wplate .whp b { font-size: 7.5px; line-height: 9px; letter-spacing: .2px; }
.wscene .wlog { min-height: 24px; padding: 4px 10px 4px 5px; font-size: 11.5px; }
.wscene .wlog::before { width: 17px; height: 17px; font-size: 12px; }
.wmoves { gap: 6px; }
.wmv { min-height: 46px; gap: 7px; padding: 5px 9px 5px 6px; border-radius: 14px; }
.wmv-ic { width: 29px; height: 29px; }
.wmv-ic svg { width: 17px; height: 17px; }
.wmv b, .wmv.up b { font-size: 13.5px; }
.wmv small { font-size: 9.5px; }
.wthrowmv .wmv-ic svg { width: 19px; height: 19px; }

/* 15/11 (owner: "after the attack, animate the life going down"): the bar slides down, a pale trail follows it a
   moment later (infiniworld.js lifeTo), and the plate shakes a little when it is hit */
.whp i { transition: width .45s cubic-bezier(.25, .8, .35, 1), background .3s; }
.whp .whp-tr { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: #ffffff; opacity: .85;
  box-shadow: 0 0 6px rgba(255, 255, 255, .8); transition: width .7s cubic-bezier(.5, 0, .6, 1) .4s; }
.whp.low .whp-tr { background: #ffd0d8; }
.wplate.hurt { animation: wpl-hurt .45s ease-out; }
@keyframes wpl-hurt { 15% { transform: translateX(-4px); border-color: #ff4f6f; } 35% { transform: translateX(4px); } 55% { transform: translateX(-2px); }
  75% { transform: translateX(1px); } }
@media (prefers-reduced-motion: reduce) {
  .whp i, .whp .whp-tr { transition: none; }
  .wplate.hurt { animation: none; }
}

/* 15/11 (owner: "add depth and make the life bar more in the game's style"): a glossy pill with a white rim, a deep
   track, ten notches and a shine on top; it pulses when low */
.wscene .wplate .whp { height: 11px; margin-top: 2px; overflow: hidden; border-radius: 99px; background: linear-gradient(180deg, #1c1540, #352a68);
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, .55), 0 0 0 1.5px #ffffff, 0 2px 0 1.5px rgba(40, 20, 90, .28); }
.wscene .wplate .whp i { border-radius: 99px; background: linear-gradient(180deg, #b6ffb0 0%, #4fe08e 45%, #1fae68 100%); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .2); }
.wscene .wplate .whp.mid i { background: linear-gradient(180deg, #fff1a8 0%, #ffc247 45%, #e98a12 100%); }
.wscene .wplate .whp.low i { background: linear-gradient(180deg, #ffc2cb 0%, #ff5a78 45%, #d0244a 100%); animation: whp-low .9s ease-in-out infinite; }
.wscene .wplate .whp::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: inherit;
  background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), rgba(255, 255, 255, .28) calc(10% - 1px) 10%); }
.wscene .wplate .whp::after { content: ""; position: absolute; left: 4px; right: 4px; top: 1px; height: 38%; z-index: 1; pointer-events: none; border-radius: 99px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .7), rgba(255, 255, 255, 0)); }
.wscene .wplate .whp b { z-index: 2; font: 800 7.5px/11px Nunito, sans-serif; color: #fff; letter-spacing: .3px; text-shadow: 0 1px 1px rgba(0, 0, 0, .85), 0 0 3px rgba(0, 0, 0, .6); }
.wscene .wplate .whp .whp-tr { z-index: 0; }
@keyframes whp-low { 50% { filter: brightness(1.35); } }

/* the creature's look on its plate and life bar */
.wscene .wplate.v-shiny { border-color: #ffd23d; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .6), 0 0 12px rgba(255, 210, 61, .75), 0 5px 12px rgba(10, 5, 40, .4); }
.wscene .wplate.v-shiny .whp i, .wscene .wplate.v-shiny .whp.mid i, .wscene .wplate.v-shiny .whp.low i {
  background: linear-gradient(100deg, #fff6c8 0%, #ffd23d 30%, #ffb000 50%, #fff3a8 62%, #ffc21a 80%, #ffe27a 100%); background-size: 220% 100%; animation: whp-sheen 1.8s linear infinite; }
.wscene .wplate.v-shiny .whp { box-shadow: inset 0 2px 3px rgba(0, 0, 0, .55), 0 0 0 1.5px #ffe27a, 0 0 8px rgba(255, 210, 61, .8); }
.wscene .wplate.v-prism { border-color: #ff6fd8; animation: wpl-prism 3s linear infinite; }
.wscene .wplate.v-prism .whp i, .wscene .wplate.v-prism .whp.mid i, .wscene .wplate.v-prism .whp.low i {
  background: linear-gradient(90deg, #ff5f6d, #ffb347, #ffe14a, #6ff09a, #3dd6ff, #a470ff, #ff6fd8, #ff5f6d); background-size: 300% 100%; animation: whp-sheen 2.4s linear infinite; }
.wscene .wplate.v-prism .whp { box-shadow: inset 0 2px 3px rgba(0, 0, 0, .55), 0 0 0 1.5px #fff, 0 0 9px rgba(255, 111, 216, .8); }
.wscene .wplate.v-glitch { border-color: #00e5ff; animation: wpl-glitch 2.6s steps(1) infinite; }
.wscene .wplate.v-glitch .wp-name { text-shadow: 1.5px 0 #ff00c8, -1.5px 0 #00e5ff; }
.wscene .wplate.v-glitch .whp i, .wscene .wplate.v-glitch .whp.mid i, .wscene .wplate.v-glitch .whp.low i {
  background: repeating-linear-gradient(180deg, #00e5ff 0 2px, #7af6ff 2px 3px); box-shadow: 2px 0 0 #ff00c8, -2px 0 0 rgba(0, 229, 255, .6); animation: whp-glitch 1.7s steps(1) infinite; }
.wscene .wplate.v-shadow { border-color: #7a2aff; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .35), 0 0 14px rgba(122, 42, 255, .8), 0 5px 12px rgba(10, 5, 40, .5); animation: wpl-smoke 2.2s ease-in-out infinite; }
.wscene .wplate.v-shadow .whp i, .wscene .wplate.v-shadow .whp.mid i, .wscene .wplate.v-shadow .whp.low i { background: linear-gradient(180deg, #d6a6ff 0%, #8a3dff 45%, #3a0f80 100%); }
.wscene .wplate.v-shadow .whp { box-shadow: inset 0 2px 3px rgba(0, 0, 0, .6), 0 0 0 1.5px #b06bff, 0 0 10px rgba(122, 42, 255, .9); }
.wscene .wplate.v-retro { border-color: #8bac0f; }
.wscene .wplate.v-retro .wp-name { font-family: Silkscreen, monospace; font-size: 10.5px; letter-spacing: .3px; }
.wscene .wplate.v-retro .whp { border-radius: 2px; background: #0f380f; box-shadow: inset 0 0 0 1px #306230, 0 0 0 1.5px #9bbc0f; }
.wscene .wplate.v-retro .whp i, .wscene .wplate.v-retro .whp.mid i, .wscene .wplate.v-retro .whp.low i { border-radius: 0; animation: none;
  background: repeating-linear-gradient(90deg, #9bbc0f 0 5px, #0f380f 5px 6px); }
.wscene .wplate.v-retro .whp::after { display: none; }
.wscene .wplate.v-retro .whp b { font-family: Silkscreen, monospace; font-weight: 400; color: #e8ffc0; }
.wscene .wplate.v-never { border-style: dashed; border-color: #b06bff; animation: wpl-never 1.6s ease-in-out infinite; }
.wscene .wplate.v-never .whp i, .wscene .wplate.v-never .whp.mid i, .wscene .wplate.v-never .whp.low i {
  background: linear-gradient(90deg, #b06bff, #3dd6ff, #b06bff); background-size: 200% 100%; animation: whp-sheen 2s linear infinite; }
.wscene .wplate.v-never .whp { box-shadow: inset 0 2px 3px rgba(0, 0, 0, .55), 0 0 0 1.5px #d6b8ff, 0 0 9px rgba(176, 107, 255, .8); }
.wscene .wplate.v-boss { border-width: 2px; border-color: #ff4f6f; box-shadow: 0 0 0 1.5px #ffd23d, 0 0 14px rgba(255, 79, 111, .6), 0 5px 12px rgba(10, 5, 40, .45); }
.wscene .wplate.v-boss .whp { height: 13px; }
.wscene .wplate.v-boss .whp b { line-height: 13px; }
@keyframes whp-sheen { to { background-position: -220% 0; } }
@keyframes whp-glitch { 0%, 100% { transform: none; } 12% { transform: translateX(3px); } 14% { transform: none; } 47% { transform: translateX(-2px) skewX(-8deg); } 49% { transform: none; } 81% { filter: hue-rotate(150deg); } 83% { filter: none; } }
@keyframes wpl-glitch { 0%, 100% { transform: none; } 30% { transform: translate(2px, -1px); } 31% { transform: none; } 66% { transform: translate(-2px, 1px); } 67% { transform: none; } }
@keyframes wpl-prism { to { filter: hue-rotate(360deg); } }
@keyframes wpl-smoke { 50% { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .35), 0 0 22px rgba(122, 42, 255, 1), 0 5px 12px rgba(10, 5, 40, .5); } }
@keyframes wpl-never { 50% { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .5), 0 0 16px rgba(176, 107, 255, .9), 0 5px 12px rgba(10, 5, 40, .4); } }

/* 15/11: the move panel: four moves two by two (a lone third takes the row), Defend small beside the Scancard */
.wmv.wide { grid-column: 1 / -1; }
.wthr-wrap .wdefmv { flex: 0 0 33%; min-width: 0; grid-column: auto; gap: 5px; padding-right: 6px; }
.wthr-wrap .wdefmv small { -webkit-line-clamp: 2; font-size: 9px; }
.wthr-wrap .wdefmv .wmv-ic { width: 26px; height: 26px; }
.wthr-wrap:has(> .wdefmv:only-child) .wdefmv { flex: 1 1 auto; }

@media (prefers-reduced-motion: reduce) {
  .wscene .wplate .whp i, .wscene .wplate[class*="v-"] { animation: none !important; }
}

/* 15/11 (owner: "lay the battle out Pokemon style; the life plates must not cover the monsters' art"): in the 3D
   arena the foe stands high on the right and its plate sits top left; yours stands low on the left and its plate sits
   bottom right; the turn caption sits on the right between them (battle3d.js places the creatures) */
.wscene.three .wfoe { left: 3%; right: auto; top: 3.5%; width: 41%; }
.wscene.three .wme { left: auto; right: 3%; bottom: 3.5%; width: 41%; }
.wscene.three .wfoe .wp-rib { top: calc(100% + 3px); bottom: auto; }
.wscene.three .wlog { top: auto; left: auto; right: 3%; bottom: calc(3.5% + 64px); max-width: 46%; }

/* 15/11 (owner: "the pack button covers the game and makes the HUD ugly: make it a bit smaller, and make the combat HUD
   go around it"): a 54 px orb (was 66) with its dots closer and no test label; on phones the descent fits above the
   dock (a 300 px arena, slimmer moves) and the Scancard row leaves a notch in the middle where the orb rises */
.dock-orb { top: -22px; width: 54px; height: 54px; margin-left: -27px; }
#tabs.dock .dock-orb svg { width: 26px; height: 26px; }
.dock-acts { top: 5px; }
.dock-cd { top: -58px; }
#tabs.dock .dock-main .dot { top: -13px; right: calc(50% - 18px); }
.wscene { height: min(42vh, 300px); min-height: 250px; }
.wmoves { gap: 6px; }
.wmv { min-height: 44px; }
@media (max-width: 720px) {
  .wthr-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 62px auto; align-items: stretch; gap: 6px; }
  .wthr-wrap > .wthrowmv { grid-column: 1; }
  .wthr-wrap > .wthr-buy { grid-column: 3; }
  .wthr-wrap::after { content: ""; grid-column: 2; grid-row: 1; }
  .wrun { padding-bottom: 6px; }
}

/* 15/11 (owner: "the Scancard shows a playing-card emoji: make an original card icon"): the Scancard as a little
   card in the game's colours, the ∞ lens in the middle and a sparkle in the corner (instead of the playing-card emoji) */
.scard-ic { display: inline-block; width: .9em; height: 1.17em; vertical-align: -.2em; font-style: normal;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 26'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23ff8a3d'/%3E%3Cstop offset='.5' stop-color='%23ff4fa3'/%3E%3Cstop offset='1' stop-color='%237b5cff'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect x='1.6' y='1.6' width='16.8' height='22.8' rx='3.4' fill='url%28%23g%29' stroke='%23fff' stroke-width='1.6'/%3E%3Crect x='4.2' y='4.2' width='11.6' height='17.6' rx='2' fill='none' stroke='%23fff' stroke-opacity='.5' stroke-width='.9'/%3E%3Ccircle cx='10' cy='13' r='4.7' fill='%23fff' fill-opacity='.22' stroke='%23fff' stroke-width='1.1'/%3E%3Cpath d='M6.8 13c0-.95.68-1.55 1.42-1.55 1.55 0 2.03 3.1 3.56 3.1.74 0 1.42-.6 1.42-1.55s-.68-1.55-1.42-1.55c-1.53 0-2.01 3.1-3.56 3.1-.74 0-1.42-.6-1.42-1.55z' fill='none' stroke='%23fff' stroke-width='1.2' stroke-linejoin='round'/%3E%3Cpath d='M15.6 2.9l.55 1.35 1.35.55-1.35.55-.55 1.35-.55-1.35-1.35-.55 1.35-.55z' fill='%23fff'/%3E%3C/svg%3E") center / contain no-repeat; filter: drop-shadow(0 1px 1px rgba(40, 10, 80, .35)); }

/* 15/11 (owner): the region's board between fights (board3d.js): it takes the arena's place; your plate stays */
.wboard { position: absolute; inset: 0; z-index: 1; display: none; }
.wscene.boardon .wboard { display: block; }
.wscene.boardon .wcanvas, .wscene.boardon .wfoe, .wscene.boardon .wlog, .wscene.boardon .wchest, .wscene.boardon .wsight { display: none !important; }
.wrun.boarding #wpanel, .wrun.boarding .wbench { opacity: .45; pointer-events: none; transition: opacity .3s; }

/* 15/11 (owner): a crossroads of fate (infiniworld.js fatePanel): face-down cards in the game's colours, the ones the
   explorer sees face up with an eye, a flip when one is turned; good fates glow gold, bad ones red */
.wend.fate { gap: 8px; }
.fate-sub { font: 800 11.5px/1.35 Nunito, sans-serif; color: var(--muted); text-align: center; }
.fate-row { display: flex; justify-content: center; gap: 9px; flex-wrap: wrap; }
.fcard { position: relative; width: 74px; height: 104px; padding: 0; border: 0; border-radius: 12px; cursor: pointer; perspective: 600px;
  background: none; transition: transform .25s; }
.fcard:not(.busy):active { transform: scale(.95); }
.fc-back { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 12px; border: 3px solid #fff;
  background: linear-gradient(140deg, #ff8a3d, #ff4fa3 50%, #7b5cff); box-shadow: 0 6px 14px rgba(60, 20, 120, .35), inset 0 0 0 2px rgba(255, 255, 255, .35);
  animation: fc-bob 2.4s ease-in-out infinite; }
.fcard:nth-child(2) .fc-back { animation-delay: .3s; } .fcard:nth-child(3) .fc-back { animation-delay: .6s; } .fcard:nth-child(4) .fc-back { animation-delay: .9s; }
.fc-back i { font: 700 34px/1 Fredoka, sans-serif; font-style: normal; color: #fff; text-shadow: 0 0 10px rgba(255, 255, 255, .8); }
.fc-back::after { content: ""; position: absolute; inset: 0; border-radius: 9px; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .45) 45%, transparent 60%);
  background-size: 250% 100%; animation: fc-shine 2.8s linear infinite; }
.fc-face { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px 4px; border-radius: 12px;
  border: 3px solid #ffd23d; background: linear-gradient(180deg, #fffaf0, #ffeec8); color: #4a2a00; box-shadow: 0 6px 14px rgba(255, 170, 40, .35); }
.fc-face.bad { border-color: #ff4f6f; background: linear-gradient(180deg, #fff1f3, #ffd2da); color: #6a0a20; box-shadow: 0 6px 14px rgba(255, 60, 90, .3); }
.fc-ico { font-size: 28px; line-height: 1; font-style: normal; }
.fc-ico .scard-ic { font-size: 30px; }
.fc-face b { font: 700 11px/1.1 Fredoka, sans-serif; text-align: center; }
.fc-eye { position: absolute; top: -8px; right: -8px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-style: normal; font-size: 12px;
  background: linear-gradient(135deg, #3dd6ff, #2f86ff); box-shadow: 0 0 0 2px #fff; }
.fcard.chosen { transform: translateY(-8px) scale(1.06); }
.fcard.flip { animation: fc-flip .5s ease-out; }
.fcard.dim { opacity: .55; transform: scale(.9); }
.fcard.busy { pointer-events: none; }
.fate-got { display: flex; align-items: center; gap: 12px; justify-content: center; }
.fcard.big { width: 92px; height: 128px; cursor: default; }
.fcard.big .fc-ico { font-size: 36px; }
.fcard.big .fc-face b { font-size: 13px; }
.fate-what { max-width: 170px; font: 800 14px/1.3 Nunito, sans-serif; }
.wend.fate.done.good .fate-what { color: #b36b00; }
.wend.fate.done.bad .fate-what { color: #d0244a; }
.fate-row.fsmall .fcard { width: 52px; height: 72px; cursor: default; }
.fate-row.fsmall .fc-ico { font-size: 20px; }
.fate-row.fsmall .fc-face b { font-size: 8.5px; }
.wr-fx { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; padding: 1px 8px; border-radius: 99px; font: 800 11px/1.6 Nunito, sans-serif; white-space: nowrap; }
.wr-fx.bless { background: linear-gradient(90deg, #fff3b0, #ffd23d); color: #5a3a00; }
.wr-fx.lure { background: linear-gradient(90deg, #d8f6ff, #8ee6ff); color: #08435a; }
@keyframes fc-bob { 50% { transform: translateY(-4px) rotate(-1.5deg); } }
@keyframes fc-shine { to { background-position: -250% 0; } }
@keyframes fc-flip { 0% { transform: rotateY(90deg) scale(1.05); } 100% { transform: rotateY(0deg); } }
@media (prefers-reduced-motion: reduce) { .fc-back, .fc-back::after, .fcard.flip { animation: none; } }

/* 15/11 (owner: "make the panels that open from the roguelike beautiful, and split the bonuses into tiers"): the bonus
   cards (infiniworld.js fatePanel). Each tier has its own frame: common brushed silver, rare deep blue, epic violet with
   a pulse, legendary gold with turning rays and sparkles; a big icon on a glowing disc, the name, what it gives */
.wend.boon { gap: 8px; }
.boon-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.boon-row.n4 { grid-template-columns: repeat(4, 1fr); gap: 6px; }
.bcard { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 168px;
  padding: 22px 6px 9px; border: 0; border-radius: 16px; cursor: pointer; color: #fff; text-align: center; font: inherit;
  background: var(--bg); box-shadow: 0 0 0 2px var(--edge), 0 0 0 4px rgba(255, 255, 255, .7), 0 8px 18px var(--sh); transition: transform .2s, opacity .3s; }
.bcard:not(.busy):active { transform: scale(.96); }
.bcard.chosen { transform: translateY(-6px) scale(1.05); box-shadow: 0 0 0 2px var(--edge), 0 0 0 4px #fff, 0 0 26px var(--glow), 0 10px 22px var(--sh); }
.bcard.dim { opacity: .4; transform: scale(.94); }
.bcard.busy { pointer-events: none; }
.bc-rays { position: absolute; inset: -60%; z-index: -1; background: repeating-conic-gradient(from 0deg, var(--ray) 0 8deg, transparent 8deg 22deg); opacity: .5;
  animation: rf-spin 14s linear infinite; }
.bc-tier { position: absolute; top: 0; left: 50%; transform: translateX(-50%); padding: 2px 10px 3px; border-radius: 0 0 10px 10px; font: 800 9.5px/1.2 Nunito, sans-serif;
  letter-spacing: .1em; text-transform: uppercase; color: var(--tc); background: var(--tb); box-shadow: 0 2px 6px rgba(0, 0, 0, .25); white-space: nowrap; }
.bc-art { display: grid; place-items: center; width: 58px; height: 58px; margin: 2px 0; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, rgba(255, 255, 255, .95), var(--disc) 55%, transparent 72%); box-shadow: 0 0 16px var(--glow); }
.bc-ico { font-size: 30px; line-height: 1; font-style: normal; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .3)); }
.bc-ico .scard-ic { font-size: 32px; }
.bc-name { font: 700 13px/1.1 Fredoka, sans-serif; text-shadow: 0 1px 2px rgba(0, 0, 0, .55); }
.bc-txt { font: 800 10px/1.25 Nunito, sans-serif; opacity: .95; text-shadow: 0 1px 2px rgba(0, 0, 0, .55); }
.bc-spark { position: absolute; left: var(--x); top: 30%; z-index: 1; font-style: normal; font-size: 11px; color: #fff; text-shadow: 0 0 6px var(--glow);
  animation: rf-twinkle 1.8s ease-in-out var(--d) infinite; pointer-events: none; }
.bcard.t-common { --bg: linear-gradient(160deg, #eef1f7, #b9c2d3 55%, #7d879b); --edge: #9aa4b8; --sh: rgba(60, 70, 100, .3); --glow: rgba(255, 255, 255, .7);
  --ray: rgba(255, 255, 255, .35); --tb: #e6eaf2; --tc: #4a5468; --disc: rgba(210, 218, 232, .9); color: #2c3446; }
.bcard.t-common .bc-name, .bcard.t-common .bc-txt { text-shadow: none; }
.bcard.t-rare { --bg: linear-gradient(160deg, #7fc4ff, #2f86ff 52%, #163f9e); --edge: #6fb6ff; --sh: rgba(30, 90, 220, .4); --glow: rgba(120, 190, 255, .9);
  --ray: rgba(190, 225, 255, .35); --tb: #d8ecff; --tc: #0d4ba8; --disc: rgba(150, 205, 255, .9); }
.bcard.t-epic { --bg: linear-gradient(160deg, #e2a8ff, #9b4dff 52%, #4a1696); --edge: #c58bff; --sh: rgba(130, 50, 230, .45); --glow: rgba(210, 150, 255, .95);
  --ray: rgba(240, 210, 255, .4); --tb: #f1e1ff; --tc: #6a1fc0; --disc: rgba(220, 175, 255, .9); animation: bc-pulse 2.2s ease-in-out infinite; }
.bcard.t-legendary { --bg: linear-gradient(160deg, #fff3b0, #ffc93d 40%, #ff8a3d 75%, #c2245f); --edge: #ffe27a; --sh: rgba(255, 150, 30, .5); --glow: rgba(255, 220, 90, 1);
  --ray: rgba(255, 255, 230, .6); --tb: linear-gradient(90deg, #fff3b0, #ffd23d); --tc: #7a3d00; --disc: rgba(255, 230, 140, .95); animation: bc-pulse 1.8s ease-in-out infinite; }
.bcard.t-legendary .bc-rays { opacity: .75; animation-duration: 9s; }
.bcard.big { width: 150px; min-height: 196px; margin: 0 auto; cursor: default; }
.bcard.big .bc-art { width: 72px; height: 72px; } .bcard.big .bc-ico { font-size: 38px; } .bcard.big .bc-name { font-size: 15px; } .bcard.big .bc-txt { font-size: 11.5px; }
.boon-got { display: flex; justify-content: center; }
.boon-row.n4 .bcard { min-height: 156px; padding: 22px 4px 8px; } .boon-row.n4 .bc-art { width: 48px; height: 48px; } .boon-row.n4 .bc-ico { font-size: 24px; }
.boon-row.n4 .bc-name { font-size: 11.5px; } .boon-row.n4 .bc-txt { font-size: 9px; }
@keyframes bc-pulse { 50% { box-shadow: 0 0 0 2px var(--edge), 0 0 0 4px rgba(255, 255, 255, .85), 0 0 22px var(--glow), 0 8px 18px var(--sh); } }
/* 19/11 (owner: "improve the chest prizes' layout, more in the game's style"): each prize is a ticket framed like the game's
   cards: the tier's frame with a thin inner line, a glossy window with the icon and its rays, the tier and its stars, the
   name and what it gives; two by two (a third or a lone one spans the row); a chest ribbon on top */
.wend.boon { gap: 9px; }
.boon-h { display: flex; align-items: center; gap: 9px; text-align: left; }
.boon-h > span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.boon-chest { flex: none; width: 42px; height: 38px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35)); }
.boon-t { font: 700 17px/1.1 Fredoka, sans-serif; letter-spacing: .01em; color: #ffe27a; text-shadow: 0 1px 0 #7a3d00, 0 0 12px rgba(255, 200, 80, .45); }
.wend.boon .fate-sub { text-align: left; }
.boon-row, .boon-row.n4 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.boon-row > .bcard:last-child:nth-child(odd) { grid-column: 1 / -1; }
.bcard, .boon-row.n4 .bcard { flex-direction: row; align-items: center; gap: 9px; min-height: 82px; padding: 8px 10px 8px 8px; text-align: left;
  border-radius: 16px; box-shadow: 0 0 0 2px var(--edge), inset 0 1px 0 rgba(255, 255, 255, .45), 0 3px 0 var(--sh), 0 8px 16px var(--sh); }
.bcard::before { content: ""; position: absolute; inset: 4px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .45); pointer-events: none; z-index: 2; }
.bcard.t-common::before { border-color: rgba(255, 255, 255, .8); }
.bcard.chosen { transform: translateY(-3px) scale(1.03); }
.bc-art, .boon-row.n4 .bc-art { position: relative; isolation: isolate; overflow: hidden; flex: none; width: 60px; height: 60px; margin: 0; border-radius: 13px;
  background: radial-gradient(circle at 50% 38%, rgba(255, 255, 255, .95), var(--disc) 58%, rgba(255, 255, 255, .12));
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .75), 0 2px 6px rgba(0, 0, 0, .28), 0 0 14px var(--glow); }
.bc-art .bc-rays { inset: -40%; z-index: -1; }
.bc-ico, .boon-row.n4 .bc-ico { font-size: 32px; }
.bc-body { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bc-tier { position: static; transform: none; display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; padding: 2px 8px; border-radius: 99px;
  font: 800 9.5px/1.3 Nunito, sans-serif; letter-spacing: .08em; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.bc-stars { font-style: normal; letter-spacing: 0; color: var(--tc); opacity: .85; }
.bc-name, .boon-row.n4 .bc-name { font: 700 15px/1.05 Fredoka, sans-serif; }
.bc-txt, .boon-row.n4 .bc-txt { font: 800 11px/1.25 Nunito, sans-serif; }
.bc-spark { top: 14%; }
.bcard.big { width: min(330px, 100%); min-height: 96px; margin: 0 auto; }
.bcard.big .bc-art { width: 76px; height: 76px; } .bcard.big .bc-ico { font-size: 40px; } .bcard.big .bc-name { font-size: 18px; } .bcard.big .bc-txt { font-size: 12.5px; }
.wend.boon.done { gap: 10px; }
@media (min-width: 900px) { .boon-row.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .boon-row.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .boon-row > .bcard:last-child:nth-child(odd) { grid-column: auto; } }
@media (prefers-reduced-motion: reduce) { .bc-rays, .bc-spark, .bcard.t-epic, .bcard.t-legendary { animation: none; } }
/* ==== 15/11 (owner: "go straight to the board; the battle only after OK; make the combat screen bigger and improve
   the layout; animate leaving the battle back to the board and the other way") ==================================== */
/* a bigger stage: it takes what the phone has left after the header, the moves and the dock */
.wscene { height: clamp(320px, calc(100dvh - 462px), 560px); min-height: 0; }
@media (min-width: 721px) { .wscene { height: clamp(400px, 64vh, 620px); } }
.wscene.three .wfoe { width: 50%; right: 3%; }
.wscene.three .wme { width: 50%; }
.wscene .wp-name { font-size: 14px; }
.wscene .wplate .whp { height: 12px; }
.wscene .wplate .whp b { font-size: 8.5px; line-height: 12px; }
.wscene.boardon .wme > img { visibility: hidden; }
/* the header in two short lines: region + coins at stake, then the stage */
.wr-top .wr-st { font-size: 19px; margin-top: 2px; }
.wr-top > .wr-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.wr-fxs { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.wr-fxs:empty { display: none; }
.wr-top .wr-stake, .wr-top .wr-fx { font-size: 11px; padding: 1px 8px; }
.wtrail { height: 20px; margin: 0 2px 6px; }
/* the Scancard row: the button and the +1 chip side by side, no gap column; one line of help */
@media (max-width: 720px) {
  .wthr-wrap { grid-template-columns: minmax(0, 1fr) auto; }
  .wthr-wrap::after { content: none; }
  .wthr-wrap > .wthr-buy { grid-column: 2; }
}
.wthr-buy { min-width: 56px; padding: 4px 8px; font-size: 12px; }
.wthrowmv .wmv-t > small { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
/* the creatures come in when the curtain opens */
.wscene.enter .wfoe { animation: w-in-r .75s cubic-bezier(.2, 1.25, .4, 1) both; }
.wscene.enter .wme { animation: w-in-l .75s .08s cubic-bezier(.2, 1.25, .4, 1) both; }
.wscene.enter .wcanvas { animation: w-in-zoom .8s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes w-in-r { from { translate: 70% 0; opacity: 0; } }
@keyframes w-in-l { from { translate: -70% 0; opacity: 0; } }
@keyframes w-in-zoom { from { transform: scale(1.18); filter: brightness(1.8); } }
/* the curtain between the board and the arena (it hangs on <body>, over the scene's place) */
.wswap { position: absolute; z-index: 70; pointer-events: none; overflow: hidden; border-radius: 24px; isolation: isolate; }
.wswap .ws-a, .wswap .ws-b { position: absolute; top: -12%; bottom: -12%; width: 64%; transition: transform .38s cubic-bezier(.7, 0, .3, 1);
  background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .16) 0 10px, transparent 10px 24px),
    linear-gradient(135deg, color-mix(in srgb, var(--c) 70%, #fff), var(--c) 45%, color-mix(in srgb, var(--c) 55%, #120830));
  box-shadow: 0 0 0 3px #fff, 0 0 30px color-mix(in srgb, var(--c) 70%, transparent); }
.wswap .ws-a { left: -8%; transform: translateX(-115%) skewX(-14deg); }
.wswap .ws-b { right: -8%; transform: translateX(115%) skewX(-14deg); }
.wswap.boss .ws-a, .wswap.boss .ws-b { background: repeating-linear-gradient(115deg, rgba(255, 230, 120, .25) 0 10px, transparent 10px 24px), linear-gradient(135deg, #ffd23d, #ff4f6f 50%, #5a0a2a); }
.wswap.shut .ws-a, .wswap.shut .ws-b { transform: translateX(0) skewX(-14deg); }
.wswap.open .ws-a { transform: translateX(-120%) skewX(-14deg); transition-duration: .5s; }
.wswap.open .ws-b { transform: translateX(120%) skewX(-14deg); transition-duration: .5s; }
.wswap .ws-flash { position: absolute; inset: 0; z-index: 2; background: #fff; opacity: 0; }
.wswap.shut .ws-flash { animation: ws-flash .45s .3s ease-out; }
@keyframes ws-flash { 0% { opacity: 0; } 25% { opacity: .9; } 100% { opacity: 0; } }
.wswap .ws-mid { position: absolute; z-index: 3; left: 50%; top: 50%; width: 88px; height: 88px; margin: -44px 0 0 -44px; border-radius: 50%; display: grid; place-items: center;
  font-size: 42px; font-style: normal; background: radial-gradient(circle at 35% 30%, #fff, color-mix(in srgb, var(--c) 45%, #fff) 55%, var(--c));
  box-shadow: 0 0 0 4px #fff, 0 0 0 8px color-mix(in srgb, var(--c) 60%, transparent), 0 0 40px #fff;
  transform: scale(0) rotate(-50deg); transition: transform .32s .2s cubic-bezier(.2, 1.7, .4, 1), opacity .3s; }
.wswap.shut .ws-mid { transform: scale(1) rotate(0); }
.wswap.open .ws-mid { transform: scale(2.2); opacity: 0; transition: transform .45s ease-out, opacity .4s; }
.wswap .ws-bar { position: absolute; left: 0; right: 0; top: calc(var(--i) * 100% / 6); height: calc(100% / 6 + 1px); transform: scaleX(0); transform-origin: left;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 80%, #fff), var(--c), color-mix(in srgb, var(--c) 60%, #120830));
  transition: transform .34s calc(var(--i) * 45ms) cubic-bezier(.7, 0, .3, 1); }
.wswap .ws-bar:nth-child(even) { transform-origin: right; }
.wswap.shut .ws-bar { transform: scaleX(1); }
.wswap.open .ws-bar { transform: scaleX(0); transform-origin: right; transition-duration: .42s; }
.wswap.open .ws-bar:nth-child(even) { transform-origin: left; }
.wswap.to-board .ws-mid { width: 64px; height: 64px; margin: -32px 0 0 -32px; font-size: 30px; color: #fff; text-shadow: 0 0 10px var(--c); }
/* the approach: who blocks the way, and Fight! (the board shows above) */
.wapp { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 11px 12px 12px; border-radius: 20px; overflow: hidden;
  background: linear-gradient(160deg, color-mix(in srgb, var(--fc) 20%, #fff), #fff 72%); border: 2px solid color-mix(in srgb, var(--fc) 55%, #fff);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--fc) 28%, transparent); animation: wapp-in .5s cubic-bezier(.2, 1.3, .4, 1); color: #2c2650; }
html:not(.light) .wapp { background: linear-gradient(160deg, color-mix(in srgb, var(--fc) 30%, #1a1240), #150f33 75%); color: #fff; }
@keyframes wapp-in { from { transform: translateY(18px) scale(.96); opacity: 0; } }
.wapp-k { font: 800 12px/1.3 Nunito, sans-serif; color: color-mix(in srgb, var(--fc) 65%, #2c2650); }
html:not(.light) .wapp-k { color: color-mix(in srgb, var(--fc) 45%, #fff); }
.wapp-row { display: flex; align-items: center; gap: 10px; }
.wapp-img { position: relative; flex: none; width: 66px; height: 66px; display: grid; place-items: center; border-radius: 18px;
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--fc) 30%, #fff), color-mix(in srgb, var(--fc) 75%, #120830));
  box-shadow: 0 0 0 2px #fff, 0 6px 14px color-mix(in srgb, var(--fc) 40%, transparent); }
.wapp-img img { width: 118%; height: 118%; object-fit: contain; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .35)); animation: wapp-bob 2.2s ease-in-out infinite; }
.wapp-img.q img { filter: brightness(0) drop-shadow(0 0 6px #fff); opacity: .8; }
.wapp-img.q i { position: absolute; font: 700 30px/1 Fredoka, sans-serif; font-style: normal; color: #fff; text-shadow: 0 0 10px var(--fc), 0 2px 0 rgba(0, 0, 0, .4); }
@keyframes wapp-bob { 50% { transform: translateY(-4px); } }
.wapp-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.wapp-t b { font: 700 19px/1.1 Fredoka, sans-serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wapp-t small { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.wapp-t .ty { font-size: 9px; padding: 0 6px; }
.wapp-pw { padding: 1px 7px; border-radius: 99px; background: linear-gradient(90deg, #ff8a3d, #ff4fa3); color: #fff; font: 800 11px/1.5 Nunito, sans-serif; }
.wapp-var { padding: 0 7px; border-radius: 99px; font: 800 10px/1.6 Nunito, sans-serif; font-style: normal; color: #2c2650; background: var(--vc); }
.wapp-go { flex: none; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 16px 9px; border-radius: 18px; font: 700 16px/1.1 Fredoka, sans-serif;
  color: #fff; background: linear-gradient(160deg, #ff8a3d, #ff4f6f 60%, #d6337f); box-shadow: 0 4px 0 #a01e4c, 0 0 18px rgba(255, 79, 111, .45); animation: wapp-pulse 1.5s ease-in-out infinite; }
.wapp-go span { font-size: 22px; line-height: 1; }
.wapp-go:active { transform: translateY(3px); box-shadow: 0 1px 0 #a01e4c; }
.wapp.boss .wapp-go { background: linear-gradient(160deg, #ffd23d, #ff8a3d 45%, #ff4f6f); box-shadow: 0 4px 0 #b0401a, 0 0 22px rgba(255, 210, 61, .6); color: #4a1500; }
@keyframes wapp-pulse { 50% { box-shadow: 0 4px 0 #a01e4c, 0 0 30px rgba(255, 79, 111, .75); transform: scale(1.04); } }
.wrun.boarding .wapp-go { animation: none; }
@media (prefers-reduced-motion: reduce) { .wapp, .wapp-img img, .wapp-go, .wscene.enter .wfoe, .wscene.enter .wme, .wscene.enter .wcanvas { animation: none !important; } }
/* the panels under the stage, tighter so the buttons stay above the dock */
.wend { gap: 6px; padding: 10px 12px; }
.wend .wwin { font-size: 21px; }
.wend > .small.muted, .wend > span.small { font-size: 11.5px; line-height: 1.3; }
.wnext .btn { padding-top: 10px; padding-bottom: 10px; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 15/11 (owner: "before the board it goes to the battle for a moment"): until the board is ready the scene is a plain
   dark stage in the region's colour, without the painting and the plate (infiniworld.js boardReady) */
.wscene.boardon:not(.bready) { background: radial-gradient(120% 90% at 50% 40%, color-mix(in srgb, var(--c, #a470ff) 28%, #1a1040), #0b0720 80%) !important; }
.wscene.boardon:not(.bready) .wme { visibility: hidden; }
/* 15/11 (owner: "some skills show dark for no reason"): a move that is weak against the foe keeps its colours; only its
   badge says so (red, with a down arrow), the strong ones' badge has an up arrow */
.wmv.down { opacity: 1; filter: none; }
.wmv-x.down { background: #e8455a; color: #fff; box-shadow: 0 1px 0 rgba(0, 0, 0, .25); }
.wmv-x.down::before { content: "▼ "; font-size: 8px; }
.wmv-x.up::before { content: "▲ "; font-size: 8px; }

/* 16/11 (owner: "on a PC the HUD looks too stretched; improve it all so it feels more natural"): on wide screens the
   descent keeps a comfortable width; the name plates are cards of a set size instead of half the arena; the moves are
   a 2 x 2 block with the Scancard as a tall card beside it, like a game's command deck */
@media (min-width: 900px) {
  .wrun { max-width: 1040px; margin-inline: auto; }
  .wscene { height: clamp(400px, 60vh, 560px); }
  .wscene.three .wfoe, .wscene.three .wme { width: min(38%, 330px); }
  .wscene .wplate { padding: 6px 10px 7px; border-radius: 13px; }
  .wscene .wp-name { font-size: 15px; }
  .wscene .wplate .whp { height: 13px; }
  .wscene .wplate .whp b { font-size: 9px; line-height: 13px; }
  .wscene.three .wlog { bottom: calc(3.5% + 76px); max-width: 38%; }
  .wpanel { margin-top: 10px; }
  .wmoves { grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(240px, .9fr); gap: 8px; }
  .wmoves:not(:has(> .wthr-wrap)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wmv { min-height: 62px; gap: 10px; padding: 8px 12px 8px 9px; border-radius: 16px; }
  .wmv-ic { width: 36px; height: 36px; }
  .wmv-ic svg { width: 20px; height: 20px; }
  .wmv b, .wmv.up b { font-size: 16px; }
  .wmv small { font-size: 11.5px; }
  .wmv.wide { grid-column: 1 / 3; }
  .wthr-wrap { grid-column: 3; grid-row: 1 / span 2; display: flex; flex-direction: column; gap: 7px; }
  .wthr-wrap .wthrowmv { flex: 1 1 auto; align-items: center; padding: 10px 12px 16px 10px; }
  .wthrowmv .wmv-t > small { -webkit-line-clamp: 2; }
  .wthrowmv .wthr-n b { font-size: 20px; }
  .wthr-wrap > .wthr-buy { flex: none; flex-direction: row; justify-content: center; gap: 6px; min-width: 0; padding: 6px 10px; font-size: 12.5px; }
  .wbench { max-width: 100%; }
}
/* 18/11: the foe stays a mystery until the fight starts */
.wapp-img.mystery { background: radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--fc) 45%, #fff) 0, color-mix(in srgb, var(--fc) 70%, #1a1240) 70%); }
.wapp-img.mystery i { animation: wapp-bob 2.2s ease-in-out infinite; }
.wapp.mystery .wapp-t small { display: block; font-size: 12px; opacity: .8; }
/* 18/11: the move's info: a little "i" in the corner and its bubble (base damage, % to hit) */
.wmv { position: relative; }
.wmv { -webkit-touch-callout: none; user-select: none; }      /* 19/11: a long press shows the move's bubble, no copy menu */
/* 19/11 (owner: "right in the little box"): Impact, Accuracy and the effect's word under the move's name */
.wmv .wmv-st { white-space: normal; line-height: 1.25; opacity: .95; }
.wmv .wmv-st .wmv-b { display: inline-block; white-space: nowrap; margin-right: 7px; }
.wmv .wmv-st .wmv-b:last-child { margin-right: 0; }
.wrun.hud #wpanel .wmv .wmv-st b, .wmv .wmv-st b { font: 800 1.12em/1 Nunito, sans-serif; color: #fff; }
.wrun.hud #wpanel .wmv .wmv-t > small.wmv-st { font-size: 10.5px; }
@media (max-width: 420px) { .wrun.hud #wpanel .wmv .wmv-t > small.wmv-st { font-size: 9.5px; } }
.wmv-i { display: none !important; position: absolute; right: 6px; bottom: 5px; width: 17px; height: 17px; display: grid; place-items: center; border-radius: 50%; z-index: 2;
  font: italic 800 11px/1 Georgia, "Times New Roman", serif; color: #fff; background: rgba(0, 0, 0, .26); border: 1px solid rgba(255, 255, 255, .6); cursor: help; }
.wmv-i:hover, .wmv-i:focus-visible { background: rgba(0, 0, 0, .45); outline: none; }
.wmoves { position: relative; }
.wmv-pop { position: absolute; transform: translate(-50%, calc(-100% - 9px)); z-index: 40; display: flex; gap: 14px; padding: 7px 13px 8px;
  border-radius: 12px; background: rgba(22, 15, 44, .95); color: #fff; box-shadow: 0 8px 20px rgba(0, 0, 0, .35); white-space: nowrap; pointer-events: none;
  animation: wmvPop .16s ease-out; }
.wmv-pop::after { content: ""; position: absolute; left: var(--ax, 50%); top: 100%; margin-left: -6px; border: 6px solid transparent; border-top-color: rgba(22, 15, 44, .95); }
/* 19/11: Impact and Accuracy as numbers, and the effect on its own line under them (wrapping on a phone) */
.wmv-pop { flex-wrap: wrap; justify-content: center; width: max-content; max-width: min(240px, calc(100vw - 16px)); row-gap: 5px; }
.wmv-pop .wmv-fx { flex-basis: 100%; white-space: normal; text-align: center; font: 700 12px/1.3 Nunito, sans-serif; font-style: normal; color: #ffe9a8; }
.wmv-pop span { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.wmv-pop small { font: 700 9.5px/1.2 Nunito, sans-serif; letter-spacing: .6px; text-transform: uppercase; opacity: .72; }
.wmv-pop b { font: 800 15px/1.1 Nunito, sans-serif; }
@keyframes wmvPop { from { opacity: 0; transform: translate(-50%, calc(-100% - 4px)); } }
/* 18/11 (owner: "remove the panel; a tap on the game's screen starts the fight"): the scene is the button, with a small hint */
.wscene.tapfight { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.wscene.tapfight:focus-visible { outline: 3px solid color-mix(in srgb, var(--c, #a470ff) 70%, #fff); outline-offset: 2px; }
.wtapfight { position: absolute; left: 50%; top: 12px; z-index: 6; transform: translateX(-50%); display: flex; align-items: center; gap: 7px;
  padding: 7px 15px 7px 11px; border-radius: 999px; pointer-events: none; white-space: nowrap;
  font: 800 13.5px/1 Nunito, sans-serif; letter-spacing: .2px; color: #fff; background: rgba(14, 9, 34, .62);
  border: 1px solid rgba(255, 255, 255, .28); box-shadow: 0 6px 16px rgba(0, 0, 0, .3); backdrop-filter: blur(4px);
  animation: wtapIn .4s ease-out both, wtapPulse 1.8s .4s ease-in-out infinite; }
.wtapfight b { font-size: 15px; line-height: 1; }
.wtapfight.boss { background: rgba(70, 14, 30, .7); border-color: rgba(255, 210, 61, .55); }
.wrun.boarding .wtapfight { opacity: 0; animation: none; }
@keyframes wtapIn { from { opacity: 0; transform: translate(-50%, -8px); } }
@keyframes wtapPulse { 0%, 100% { transform: translateX(-50%) scale(1); } 50% { transform: translateX(-50%) scale(1.045); } }
@media (prefers-reduced-motion: reduce) { .wtapfight { animation: none; } }
/* 18/11 (owner: the board as a roguelike map of rooms): the next rooms as buttons, the entrance and a spring */
.wrooms { display: flex; flex-direction: column; align-items: center; gap: 7px; margin: 6px 0 4px; }
.wr-q { font: 800 12.5px/1.25 Nunito, sans-serif; color: var(--muted); text-align: center; }
.wr-opts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; width: 100%; }
.wroom { flex: 1 1 0; min-width: 96px; max-width: 200px; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 12px; border-radius: 14px;
  font: 800 14px/1 Nunito, sans-serif; color: #fff; cursor: pointer; border: 2px solid rgba(255, 255, 255, .55);
  background: linear-gradient(160deg, var(--rc1), var(--rc2)); box-shadow: 0 4px 0 var(--rc3), 0 6px 16px rgba(0, 0, 0, .25); transition: transform .12s; }
.wroom i { font-style: normal; font-size: 17px; line-height: 1; }
.wroom:hover { transform: translateY(-2px); }
.wroom:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--rc3); }
.wroom.busy { pointer-events: none; opacity: .6; }
.wroom.k-monster { --rc1: #ff7a8a; --rc2: #e2405c; --rc3: #9c1f37; }
.wroom.k-heal { --rc1: #5fe0a4; --rc2: #22b07a; --rc3: #137351; }
.wroom.k-power { --rc1: #ffd36e; --rc2: #f0a020; --rc3: #a86a00; color: #3a2400; }
.wroom.k-boss { --rc1: #ff8aa0; --rc2: #c92a5a; --rc3: #7c1435; }
.wend.room .wwin { font-size: 18px; }
.wend.room.heal .wwin { color: #2fd08a; }
@media (prefers-reduced-motion: reduce) { .wroom { transition: none; } }
/* 18/11 (owner: "unify all the information inside the game and make the screen bigger"): the descent is one tall frame
   (hudSync in infiniworld.js sizes it and sets --hud-top / --hud-bot). The 3D scene fills it; the region bar and the trail
   float on its top, the choices, moves and results (and the team) at its foot on dark glass; the plates stay in between */
.wrun.hud { position: relative; display: flex; flex-direction: column; height: var(--hud-h, calc(100dvh - 230px)); min-height: 500px;
  padding: 0; border-radius: 24px; overflow: hidden; border: 3px solid #fff; isolation: isolate; background: #120c2a; }
html:not(.light) .wrun.hud { border-color: rgba(255, 255, 255, .14); }
.wrun.hud > #wscene { position: absolute; inset: 0; height: auto !important; min-height: 0 !important; border: 0 !important; border-radius: 0 !important; margin: 0; z-index: 0; }
.wrun.hud > :not(#wscene) { position: relative; z-index: 5; }
.wrun.hud > .wr-top, .wrun.hud > #wpanel, .wrun.hud > .wbench, .wrun.hud > .wgroup {
  --text: #fff; --muted: rgba(236, 230, 255, .78); --line: rgba(255, 255, 255, .2); --panel: rgba(255, 255, 255, .08); color: #fff; }
.wrun.hud > .wr-top { margin: 8px 8px 0; padding: 7px 8px 7px 10px; border-radius: 16px; background: rgba(12, 8, 30, .52);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 4px 14px rgba(0, 0, 0, .25); }
.wrun.hud > .wr-top .wr-st, .wrun.hud > .wr-top .wr-reg { color: #fff; }
.wrun.hud > .wr-top #wr-back { flex: none; }
.wrun.hud > .wtrail { margin: 6px 16px 0; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .45)); }
.wrun.hud > .wgroup { margin: 6px 8px 0; background: rgba(12, 8, 30, .5); }
.wrun.hud > .wbench { margin: auto 8px 6px; padding: 4px; border-radius: 99px; background: rgba(12, 8, 30, .4); }
.wrun.hud > #wpanel { margin: auto 8px 8px; padding: 10px 10px 12px; border-radius: 18px; background: rgba(12, 8, 30, .66);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 -4px 18px rgba(0, 0, 0, .25); max-height: 60%; overflow-y: auto; }
.wrun.hud > .wbench + #wpanel { margin-top: 0; }
.wrun.hud > #wpanel:empty { display: none; }
.wrun.hud #wpanel .wend { background: transparent; box-shadow: none; border: 0; padding: 4px 2px; }
.wrun.hud #wpanel .wr-q, .wrun.hud #wpanel .fate-sub, .wrun.hud #wpanel .small { color: rgba(236, 230, 255, .82); }
.wrun.hud .wscene .wfoe { top: calc(var(--hud-top, 96px) + 6px) !important; }
.wrun.hud .wscene .wme { bottom: calc(var(--hud-bot, 220px) + 6px) !important; }
.wrun.hud .wscene .wlog { bottom: calc(var(--hud-bot, 220px) + 8px); }
.wrun.hud .wscene .wtapfight { top: calc(var(--hud-top, 96px) + 8px); }
.wrun.hud .wscene .wsight { top: calc(var(--hud-top, 96px) + 40px); }
/* the day's ceiling of adventure coins (E4) */
.wr-cap { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 99px; font: 800 11px/1.6 Nunito, sans-serif;
  color: #ffe08a; background: rgba(255, 208, 90, .14); border: 1px solid rgba(255, 208, 90, .4); white-space: nowrap; }
.wr-cap.out { color: #c9c0e8; background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .2); }
@media (min-width: 721px) { .wrun.hud { min-height: 560px; } }
/* the top bar in two lines: the region, the room and Voltar; then the pills, scrolling sideways on a narrow phone */
.wrun.hud > .wr-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "a b" "c c"; gap: 6px 8px; align-items: center; }
.wrun.hud > .wr-top > div:first-child { grid-area: a; flex-direction: row; align-items: center; gap: 8px; min-width: 0; }
.wrun.hud > .wr-top .wr-reg { min-width: 0; max-width: 62%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; padding: 3px 9px 3px 4px; }
.wrun.hud > .wr-top .wr-st { margin: 0; font-size: 15px; white-space: nowrap; }
.wrun.hud > .wr-top #wr-back { grid-area: b; padding: 6px 12px; font-size: 13px; }
.wrun.hud > .wr-top > .wr-side { grid-area: c; flex-direction: row; align-items: center; justify-content: flex-start; gap: 6px; overflow-x: auto;
  scrollbar-width: none; min-width: 0; }
.wrun.hud > .wr-top > .wr-side::-webkit-scrollbar { display: none; }
.wrun.hud > .wr-top .wr-fxs { display: inline-flex; gap: 6px; flex: none; }
.wrun.hud > .wr-top .wr-side > *, .wrun.hud > .wr-top .wr-fxs > * { flex: none; }
/* 18/11 (owner: "the fight's messages cover the life bar"): the log sits right above your creature's plate (--me-h,
   hudSync), on the right like the plate, so neither covers the other */
.wrun.hud .wscene .wlog { bottom: calc(var(--hud-bot, 220px) + var(--me-h, 70px) + 24px); left: auto; right: 3%; max-width: min(62%, 360px); }
/* 18/11 (owner: "make the packs tab smaller so it doesn't take much of the screen"): a 42 px orb that rises only a little
   over the dock, its crown of dots hugging it (app.js paintDockActions: R 31) */
.dock-orb { top: -12px; width: 42px; height: 42px; margin-left: -21px; box-shadow: 0 0 0 4px var(--dockring), 0 8px 18px rgba(255, 79, 163, .4); }
#tabs.dock .dock-main.on .dock-orb { transform: translateY(-2px) scale(1.04); box-shadow: 0 0 0 4px var(--dockring), 0 10px 22px rgba(255, 79, 163, .55); }
#tabs.dock .dock-orb svg { width: 21px; height: 21px; }
.dock-acts { top: 9px; }
.dock-track path { stroke-width: 13; }
.dock-acts i { left: -4px; top: -4px; width: 8px; height: 8px; }
.dock-cd { top: -50px; font-size: 9.5px; }
#tabs.dock .dock-main .dot { top: -8px; right: calc(50% - 16px); width: 9px; height: 9px; }

/* 18/11 (owner: trainers halfway, other players' teams): who the trainer is and how many of their creatures are left;
   19/11: a ribbon on their creature's plate (it floated over the plate before) */
.wp-rib .wtrainer { display: inline-flex; align-items: center; gap: 5px; background: rgba(14, 8, 34, .85); border: 1px solid rgba(255, 210, 90, .7); color: #fff; white-space: nowrap; }
.wtrainer b { color: #ffd25a; }
.wtrainer em { display: flex; gap: 3px; }
.wtrainer em i { width: 7px; height: 7px; border-radius: 50%; background: #ffd25a; box-shadow: 0 0 5px rgba(255, 210, 90, .8); }
.wtrainer em i.out { background: rgba(255, 255, 255, .25); box-shadow: none; }
.wroom.k-trainer { border-color: rgba(255, 210, 90, .8); }

/* 18/11: on the HUD's dark glass the light theme's white "alt" buttons came out white on white: glass buttons there */
html.light .wrun.hud .btn.alt, .wrun.hud .btn.alt { background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .35); box-shadow: 0 2px 0 rgba(0, 0, 0, .25); text-shadow: 0 1px 2px rgba(0, 0, 0, .4); }

/* 19/11 (owner: "the HUD is huge, simplify it as much as possible to improve the view of the game"): one thin row of icons
   on top (the element and the room count, the backpack, the stake, the exit), no trail on a map (the board is the map),
   the team as three small faces, your plate only in a fight, and the panel at the foot with its title and buttons only.
   On a phone the page's own header steps aside during a descent and the frame runs from edge to edge. */
.wrun.hud > .wr-top { display: flex; align-items: center; gap: 6px; margin: 6px 6px 0; padding: 3px 3px 3px 4px; border-radius: 99px;
  background: rgba(12, 8, 30, .42); box-shadow: none; }
.wrun.hud > .wr-top .wr-reg { flex: none; align-self: center; max-width: none; gap: 5px; padding: 2px 9px 2px 2px; font-size: 12px; background: rgba(255, 255, 255, .13); border: 0; box-shadow: none; }
.wrun.hud > .wr-top .wr-st { margin: 0; font: 700 14px/1 Fredoka, sans-serif; color: #fff; }
.wrun.hud > .wr-top > .wr-side { flex: 1 1 auto; display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 6px;
  overflow-x: auto; scrollbar-width: none; min-width: 0; }
.wrun.hud > .wr-top .wr-bag { gap: 7px; padding: 2px 9px; border-radius: 99px; background: rgba(255, 255, 255, .13); color: #fff; font: 800 12.5px/1.5 Nunito, sans-serif; box-shadow: none; }
.wrun.hud > .wr-top .wr-bag .wr-cd b { color: #ff8ad0; }
.wrun.hud > .wr-top .wr-stake, .wrun.hud > .wr-top .wr-fx, .wrun.hud > .wr-top .wr-cap { align-self: center; margin: 0; padding: 1px 8px; font-size: 11.5px; line-height: 1.5; }
/* 19/11 (owner: "make the adventure's exit button look nice"): a candy pill in the game's pink, a door with the way out */
/* 20/11: the 2x combat switch, next to Leave */
.wr-speed { flex: none; display: inline-flex; align-items: center; gap: 2px; height: 30px; padding: 0 9px 0 6px; border-radius: 99px; cursor: pointer;
  border: 1.5px solid rgba(255, 255, 255, .35); background: rgba(12, 8, 30, .55); color: rgba(255, 255, 255, .85); font: 900 12px Nunito, sans-serif;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: background .2s, color .2s, border-color .2s, box-shadow .2s; }
.wr-speed svg { width: 15px; height: 15px; fill: currentColor; }
.wr-speed.on { color: #2a1550; border-color: #ffd36e; background: linear-gradient(90deg, #ffe6a3, #ffc93d); box-shadow: 0 0 12px rgba(255, 201, 61, .55); }
.wr-speed:active { transform: scale(.94); }
.wr-exit { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 11px 0 7px; border-radius: 99px; cursor: pointer;
  border: 1.5px solid rgba(255, 255, 255, .6); color: #fff; background: linear-gradient(180deg, #ff8fbd 0%, #e2508f 52%, #a3318f 100%);
  font: 700 13px/1 Fredoka, Nunito, sans-serif; letter-spacing: .02em; text-shadow: 0 1px 1px rgba(70, 0, 50, .45);
  box-shadow: 0 2px 0 rgba(70, 10, 60, .6), inset 0 1px 0 rgba(255, 255, 255, .55), 0 0 12px rgba(255, 110, 180, .35);
  transition: transform .12s, box-shadow .12s, filter .12s; }
.wr-exit svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 1px 0 rgba(70, 0, 50, .35)); }
.wr-exit .wx-door { stroke-width: 2; opacity: .9; }
.wr-exit:hover { filter: brightness(1.07); }
.wr-exit:hover svg path:last-child { transform: translateX(-1.5px); }
.wr-exit svg path { transition: transform .15s; }
.wr-exit:active { transform: translateY(1px); box-shadow: 0 1px 0 rgba(70, 10, 60, .6), inset 0 1px 0 rgba(255, 255, 255, .5); }
.wr-exit:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
/* 19/11: a team heal reaches the bench: each face it healed glows green for a moment */
.wbench .wb.healed { animation: wb-heal .9s ease-out; }
@keyframes wb-heal { 0% { box-shadow: 0 0 0 0 rgba(63, 208, 138, .9); } 40% { box-shadow: 0 0 0 6px rgba(63, 208, 138, .55), 0 0 18px rgba(63, 208, 138, .8); } 100% { box-shadow: 0 0 0 0 rgba(63, 208, 138, 0); } }
@media (prefers-reduced-motion: reduce) { .wbench .wb.healed { animation: none; } }
/* the team: small faces, life as the ring; in a fight a tap swaps */
.wrun.hud > .wbench { align-self: flex-start; gap: 5px; margin: auto 6px 5px; padding: 3px; flex-wrap: nowrap; background: rgba(12, 8, 30, .38); }
.wrun.hud > .wbench .wb { padding: 0; border: 0; background: none; box-shadow: none; border-radius: 50%; min-width: 0; }
.wrun.hud > .wbench .wb-ring { width: 36px; height: 36px; }
.wrun.hud > .wbench .wb-ring img { width: 29px; height: 29px; }
.wrun.hud > .wbench .wb.on .wb-ring { box-shadow: 0 0 0 2px #fff, 0 0 10px rgba(255, 255, 255, .6); }
.wrun.hud > .wbench .wb-l { padding: 0 2px 0 5px; font-size: 15px; color: #fff; }
.wrun.hud > .wbench.swap .wb:not([disabled]) .wb-ring { animation: wb-ready 1.8s ease-in-out infinite; }
@keyframes wb-ready { 50% { transform: scale(1.06); } }
/* the plates: smaller; yours only in a fight (the faces at the foot say the rest) */
.wrun.hud .wscene .wplate { padding: 5px 9px 6px; gap: 2px; border-radius: 12px; }
.wrun.hud .wscene .wp-name { font-size: 14px; }
.wrun.hud .wscene .wp-pw, .wrun.hud .wscene .wp-lv { font-size: 9.5px; }
.wrun.hud .wscene .wp-mid { min-height: 0; }
.wrun.hud .wscene .wp-mid .ty { font-size: 8px; padding: 0 5px; }
.wrun.hud .wscene .whp { height: 10px; margin-top: 1px; }
.wrun.hud .wscene .whp b { font-size: 8px; line-height: 10px; }
.wrun.hud .wscene .wp-rib > span { font-size: 9.5px; padding: 0 7px; }
.wrun.hud .wscene.three .wfoe, .wrun.hud .wscene.three .wme { width: min(48%, 260px); }
.wrun.hud .wscene.boardon .wme { display: none; }
/* the foot: a title and its buttons */
.wrun.hud > #wpanel { margin: auto 6px 6px; padding: 7px 7px 8px; border-radius: 16px; background: rgba(12, 8, 30, .58); }
.wrun.hud #wpanel .wend { gap: 5px; padding: 0; }
.wrun.hud #wpanel .wend .wwin { font-size: 15px; line-height: 1.2; }
.wrun.hud #wpanel .wend.win .wwin { font-size: 17px; }
.wrun.hud #wpanel .fate-sub { font-size: 11px; line-height: 1.25; }
.wrun.hud #wpanel .wrooms { margin: 2px 0 0; gap: 0; }
.wrun.hud #wpanel .wr-opts { gap: 6px; flex-wrap: nowrap; }
.wrun.hud #wpanel .wroom { flex: 1 1 0; min-width: 0; padding: 7px 6px; font-size: 13px; gap: 4px; justify-content: center; }
.wrun.hud #wpanel .wnext .btn { padding-top: 8px; padding-bottom: 8px; font-size: 13.5px; }
.wrun.hud #wpanel .wmoves { gap: 5px; }
/* 19/11 later (owner: "everything bigger in the battle... the moves"): the moves stay big and keep their element */
.wrun.hud #wpanel .wmv { min-height: 52px; padding: 5px 9px 5px 6px; gap: 8px; border-radius: 14px; }
.wrun.hud #wpanel .wmv-ic { width: 32px; height: 32px; }
.wrun.hud #wpanel .wmv-ic svg { width: 19px; height: 19px; }
.wrun.hud #wpanel .wmv b { font-size: 15px; }
.wrun.hud #wpanel .wmv .wmv-t > small { display: block; font-size: 10.5px; }
.wrun.hud #wpanel .wthrowmv .wmv-t > small { display: none; }
.wrun.hud #wpanel .wthrowmv { padding-bottom: 9px; }
.wrun.hud #wpanel .wthr-bd { display: none; }
.wrun.hud #wpanel .wthr-n { flex-direction: row; gap: 6px; padding: 2px 8px; }
.wrun.hud #wpanel .wthr-n b { font-size: 15px; }
.wrun.hud #wpanel .wthr-bar { bottom: 3px; height: 3px; }
.wrun.hud #wpanel .wrw { gap: 5px; }
@media (max-width: 720px) {
  body.inrun > #top { display: none; }
  body.inrun > #view { padding: 0; }
  body.inrun .wrun.hud { border: 0; border-radius: 0; }
  body.inrun #chat-fab { display: none; }
}

/* 20/11 (owner: "up top not everything fits on the phone"): the top bar never hides a pill. On a phone the exit and the
   2x switch shrink to their icons and the pills sit closer; whatever still doesn't fit drops to a second line inside
   the bar instead of scrolling out of sight (hudSync re-measures the bar, so the scene moves down with it). */
.wrun.hud > .wr-top { border-radius: 18px; }
.wrun.hud > .wr-top > .wr-side { flex-wrap: wrap; overflow: visible; row-gap: 4px; }
.wrun.hud > .wr-top .wr-fxs { display: contents; }
@media (max-width: 480px) {
  .wrun.hud > .wr-top { gap: 4px; }
  .wrun.hud > .wr-top > .wr-side { gap: 4px; }
  .wrun.hud > .wr-top .wr-reg { padding-right: 7px; }
  .wrun.hud > .wr-top .wr-bag { gap: 5px; padding: 2px 7px; }
  .wrun.hud > .wr-top .wr-stake, .wrun.hud > .wr-top .wr-fx, .wrun.hud > .wr-top .wr-cap { padding: 1px 6px; }
  .wr-speed { padding: 0 8px; }
  .wr-speed svg { display: none; }
  .wr-exit { width: 32px; padding: 0; justify-content: center; }
  .wr-exit > span { display: none; }
  .wr-exit > svg { flex: none; width: 17px; height: 17px; }
}

/* 20/11 (owner: "make the creatures' slots look like the game; use the Scancard icon in them"): during a descent each slot
   of the team is a little Scancard: the brand's gradient frame, the creature on a night card, its life as a bar at the
   card's foot; the open one lifts and glows, a fallen one goes grey; the swap row starts with the Scancard icon */
.wrun.hud > .wbench { gap: 6px; padding: 4px 7px 4px 5px; border-radius: 14px; background: rgba(12, 8, 30, .5);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 4px 14px rgba(0, 0, 0, .3); }
.wrun.hud > .wbench .wb { border-radius: 8px; overflow: visible; }
.wrun.hud > .wbench .wb-ring { width: 34px; height: 45px; border-radius: 8px; padding: 0; overflow: hidden;
  background: linear-gradient(135deg, #ff8a3d, #ff4fa3 50%, #7b5cff); box-shadow: 0 2px 6px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 255, 255, .55);
  transition: transform .2s, box-shadow .2s; }
.wrun.hud > .wbench .wb-ring::before { inset: 2px; border-radius: 6px; background: radial-gradient(circle at 50% 30%, #4a2c8f, #170b38 75%); }
.wrun.hud > .wbench .wb-ring::after { content: ""; position: absolute; left: 4px; right: 4px; bottom: 4px; height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, var(--hc) var(--hp), rgba(255, 255, 255, .2) var(--hp)); box-shadow: 0 0 0 1px rgba(10, 4, 30, .6); }
.wrun.hud > .wbench .wb-ring img { width: 30px; height: 30px; margin-top: -6px; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .5)); }
.wrun.hud > .wbench .wb.on .wb-ring { transform: translateY(-3px); box-shadow: 0 0 0 2px #fff, 0 0 14px rgba(255, 140, 220, .75); }
.wrun.hud > .wbench .wb.ko .wb-ring { background: linear-gradient(135deg, #77728c, #3c3854); }
.wrun.hud > .wbench .wb-l { display: grid; place-items: center; padding: 0 1px 0 2px; }
.wrun.hud > .wbench .wb-l .scard-ic { font-size: 19px; animation: wb-card 2.4s ease-in-out infinite; }
@keyframes wb-card { 50% { transform: rotate(-8deg) translateY(-1px); } }
@media (prefers-reduced-motion: reduce) { .wrun.hud > .wbench .wb-l .scard-ic { animation: none; } }
/* the trainer's ribbon: the Scancard, the name, one little card per creature (grey once it fell) */
.wtrainer .scard-ic { font-size: 13px; }
.wtrainer em { gap: 2px; }
.wtrainer em i { width: 6px; height: 8.5px; border-radius: 1.6px; background: linear-gradient(135deg, #ff8a3d, #ff4fa3 50%, #7b5cff);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .85), 0 0 5px rgba(255, 79, 163, .6); }
.wtrainer em i.out { background: rgba(255, 255, 255, .16); box-shadow: 0 0 0 1px rgba(255, 255, 255, .3); }

/* 20/11 (owner: "a little arrow up, 'shield up'"): the note over your creature when it shields or defends, and the arrow on
   the plate's shield chip while it lasts */
.wnum.buff b { color: #9fd6ff; -webkit-text-stroke-color: #0b2a5a; text-shadow: 0 3px 0 #0b2a5a, 0 0 14px rgba(90, 168, 255, .8); font-size: 24px; }
.wnum.buff b::before { content: "▲ "; color: #dff3ff; }
.wp-st.up { display: inline-flex; align-items: center; gap: 1px; }
.wp-up { font: 900 9px/1 Nunito, sans-serif; color: #5aa8ff; text-shadow: 0 0 4px rgba(90, 168, 255, .9); }

/* 20/11 (owner: "improve the framing of this, it looked horrible"): each slot shows its creature big and whole on a light
   backdrop in its element's colour (--ec), inside a white frame, its life as a bar along the foot */
.wrun.hud > .wbench .wb-ring { width: 44px; height: 54px; border-radius: 10px; padding: 0; overflow: hidden; display: block;
  background: #fff; box-shadow: 0 0 0 1px rgba(20, 8, 50, .35), 0 3px 8px rgba(0, 0, 0, .45); }
.wrun.hud > .wbench .wb-ring::before { inset: 2px; border-radius: 8px;
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--ec, #a470ff) 35%, #fff) 0%, color-mix(in srgb, var(--ec, #a470ff) 80%, #fff) 45%, color-mix(in srgb, var(--ec, #a470ff) 75%, #1a0a40) 100%); }
.wrun.hud > .wbench .wb-ring img { position: absolute; left: 2px; right: 2px; top: 3px; bottom: 9px; width: calc(100% - 4px); height: calc(100% - 12px); margin: 0;
  object-fit: contain; transform: scale(1.18); transform-origin: 50% 55%; filter: drop-shadow(0 2px 2px rgba(20, 8, 50, .45)); }
.wrun.hud > .wbench .wb-ring::after { left: 4px; right: 4px; bottom: 3px; height: 4px; border-radius: 2px; z-index: 1;
  background: linear-gradient(90deg, var(--hc) var(--hp), rgba(20, 8, 50, .45) var(--hp)); box-shadow: 0 0 0 1px rgba(255, 255, 255, .6); }
.wrun.hud > .wbench .wb.on .wb-ring { transform: translateY(-3px); box-shadow: 0 0 0 2px #fff, 0 0 0 4px #ff6fb5, 0 0 14px rgba(255, 111, 181, .7); }
.wrun.hud > .wbench .wb.ko .wb-ring { background: #bbb; }
.wrun.hud > .wbench .wb.ko .wb-ring::before { background: radial-gradient(circle at 50% 40%, #d8d8e0, #8a8aa0); }
.wrun.hud > .wbench .wb.ko .wb-ring img { filter: grayscale(1); opacity: .55; }

/* 20/11 (owner: "the other creatures above the life"): the team's slots float right above your plate (bottom right), out of
   the bottom row; the fight's messages go up above them */
/* (.wrun.hud > :not(#wscene) carries an id's weight: hence the !important) */
.wrun.hud > .wbench { position: absolute !important; z-index: 6; left: auto; right: 3%; margin: 0;
  bottom: var(--bench-b, calc(var(--hud-bot, 220px) + var(--me-h, 70px) + 14px)); }      /* 21/11: --bench-b keeps the fight's spot (hudSync) */
.wrun.hud .wscene .wlog { bottom: calc(var(--hud-bot, 220px) + var(--me-h, 70px) + 84px); }
/* 20/11 (owner: "an experience bar under the Infinimon's life") */
.wscene .wplate .wxp { position: relative; display: block; height: 6px; margin-top: 3px; overflow: hidden; border-radius: 99px;
  background: linear-gradient(180deg, #1c1540, #2e2460); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.wscene .wplate .wxp i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: linear-gradient(90deg, #3dd6ff, #8b5cff 60%, #ff4fa3);
  box-shadow: 0 0 6px rgba(61, 214, 255, .6); transition: width .6s; }
.wscene .wplate .wxp b { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); font: 900 5.5px/1 Nunito, sans-serif; letter-spacing: .5px; color: #fff; opacity: .85; }
.wscene .wplate .wxp.max i { background: linear-gradient(90deg, #ffe066, #ffb020); }
.wrun.hud > .wbench + #wpanel, .wrun.hud > #wpanel { margin-top: auto; }      /* 20/11: the panel keeps to the foot (the slots no longer push it) */

/* 20/11 (owner, phone: "the moves' messages are over the creature's art"; then "where the text is, put it up there where
   it bothers nobody"): the fight's messages sit at the top right, under the top bar, beside the foe's plate (the sky
   there is empty), on every screen */
.wrun.hud .wscene .wlog { top: calc(var(--hud-top, 60px) + 6px); bottom: auto; left: auto; right: 3%; max-width: min(46%, 330px); }

/* 20/11 (owner: "the new generation moves have the G2, G3... seal"): the seal on a generation move's orb */
.wmv .wmv-ic { position: relative; }
.wmv .wmv-gen { position: absolute; right: -7px; bottom: -5px; z-index: 2; padding: 1px 4px; border-radius: 6px; font: 900 9px/1.15 Nunito, sans-serif;
  font-style: normal; letter-spacing: .2px; color: #2a1550; background: linear-gradient(135deg, #ffd2ad, #c9783f);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .55), 0 1px 3px rgba(0, 0, 0, .35); pointer-events: none; }
.wmv .wmv-gen.g3 { background: linear-gradient(135deg, #ffffff, #aab4cc); }
.wmv .wmv-gen.g4 { background: linear-gradient(135deg, #fff1b8, #e0a400); }

/* 20/11 (owner: "on the adventure board, where it may be a new creature, another colour"): that room's button, aqua like
   its tile on the board */
.wroom.k-monster.k-new { --rc1: #6fe9ff; --rc2: #12b4e8; --rc3: #0a6f96; }

/* 20/11 (owner: "show the level of the creature you face: the card comes at that level"): the Scancard says it */
.wthr-lv { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 99px; background: rgba(255, 255, 255, .28); font: 900 10.5px/1.6 Nunito, sans-serif; font-style: normal; vertical-align: 1px; }

/* 20/11 (owner: "the generation special attack: a different, special colour in the adventure; in the fusion choice
   highlight it well, with a glow"): a generation move's own look: a turning holographic border in the infinity's
   colours, a pulsing glow, a sweeping shine and a gold name */
@property --gmv { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes gmv-spin { to { --gmv: 360deg; } }
@keyframes gmv-sweep { 0% { transform: translateX(-160%) skewX(-22deg); } 55%, 100% { transform: translateX(420%) skewX(-22deg); } }
@keyframes gmv-pulse { 0%, 100% { box-shadow: 0 0 10px rgba(255, 79, 163, .5), 0 0 22px rgba(61, 214, 255, .28), 0 4px 0 #3a1280; }
  50% { box-shadow: 0 0 16px rgba(255, 210, 61, .75), 0 0 32px rgba(255, 79, 163, .5), 0 4px 0 #3a1280; } }
html body .wmv.genmv, html body .li2-slot.gen, html body .li2-slot.on.genmv, html body .li2-mv.genmv, html body .mv-chip.genmv {
  position: relative; overflow: hidden; border: 2px solid transparent !important; color: #fff;
  background: linear-gradient(135deg, #2a0f6e, #5b1aa0 48%, #8c1f70) padding-box,
    conic-gradient(from var(--gmv), #ffd23d, #ff4fa3, #3dd6ff, #a470ff, #ffd23d) border-box !important;
  animation: gmv-spin 3s linear infinite, gmv-pulse 2.2s ease-in-out infinite; }
html body .wmv.genmv::after, html body .li2-slot.gen::after, html body .li2-slot.on.genmv::after, html body .li2-mv.genmv::after, html body .mv-chip.genmv::after {
  content: ""; position: absolute; top: -4px; bottom: -4px; left: 0; width: 34%; pointer-events: none; z-index: 1;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .38), transparent); animation: gmv-sweep 2.8s ease-in-out infinite; }
html body .wmv.genmv b, html body .li2-slot.gen b, html body .li2-slot.on.genmv b, html body .li2-mv.genmv .nm b, html body .mv-chip.genmv b {
  background: linear-gradient(90deg, #fff6c8, #ffd23d 45%, #ffb3dd); -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: none; filter: drop-shadow(0 1px 0 rgba(20, 0, 50, .55)); }
html body .wmv.genmv small, html body .li2-mv.genmv small, html body .mv-chip.genmv small { color: #ffe3f3 !important; }
html body .wmv.genmv .wmv-ic { box-shadow: 0 0 0 2px #ffd23d, 0 0 12px rgba(255, 210, 61, .7); }
html body .li2-slot.gen > .gi { filter: drop-shadow(0 0 5px #ffd23d); }
html body .li2-mv.genmv .ck, html body .li2-slot.on.genmv .x { color: #fff; }
html body .li2-mv.genmv .mv-el, html body .li2-slot.on.genmv .mv-el, html body .mv-chip.genmv .mv-el { background: conic-gradient(#ffd23d, #ff4fa3, #3dd6ff, #a470ff, #ffd23d); box-shadow: 0 0 6px #ffd23d; }
html body .li2-slot.gen .gm-tag, html body .mv-chip.genmv .gm-tag, html body .wmv.genmv .wmv-gen { z-index: 2; }
@media (prefers-reduced-motion: reduce) {
  html body .wmv.genmv, html body .li2-slot.gen, html body .li2-slot.on.genmv, html body .li2-mv.genmv, html body .mv-chip.genmv { animation: none; }
  html body .wmv.genmv::after, html body .li2-slot.gen::after, html body .li2-slot.on.genmv::after, html body .li2-mv.genmv::after, html body .mv-chip.genmv::after { display: none; }
}
html body .li2-slot.gen .gm-tag { top: 4px; right: 5px; }      /* 20/11: inside the glowing border (it is clipped now) */

/* 20/11 (owner: "when the moves use the special's bonus, effects of the special, very pretty and eye-catching"): each
   perk's show where the blow lands (infiniworld.js spFx) */
.spfx { position: fixed; z-index: 9400; width: 0; height: 0; pointer-events: none; }
.spfx > i { position: absolute; left: 0; top: 0; }
.spfx .sp-label { position: absolute; left: 0; top: -64px; transform: translate(-50%, 0); white-space: nowrap; font: 700 26px/1 Fredoka, sans-serif;
  letter-spacing: .02em; animation: sp-lab 1.4s cubic-bezier(.2, .9, .3, 1.2) forwards; }
.spfx.big .sp-label { font-size: 32px; }
@keyframes sp-lab { 0% { opacity: 0; transform: translate(-50%, 18px) scale(.4); } 18% { opacity: 1; transform: translate(-50%, 0) scale(1.18); }
  32% { transform: translate(-50%, 0) scale(1); } 78% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -26px) scale(1); } }
/* Brilho: a golden starburst */
.spfx-shiny .sp-label { background: linear-gradient(180deg, #fffbe0, #ffd23d 55%, #ff9f1a); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 #7a3d00) drop-shadow(0 0 12px rgba(255, 210, 61, .9)); }
.spfx-shiny .sp-ring { width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; border: 4px solid #fff3a8;
  box-shadow: 0 0 24px #ffd23d, inset 0 0 18px #ffd23d; animation: sp-ring .7s ease-out forwards; }
.spfx-shiny .sp-ring.r2 { animation-delay: .12s; border-color: #ffd23d; opacity: 0; }
@keyframes sp-ring { 0% { opacity: 1; transform: scale(.3); } 100% { opacity: 0; transform: scale(7); } }
.spfx.big .sp-ring { animation-name: sp-ringbig; }
@keyframes sp-ringbig { 0% { opacity: 1; transform: scale(.3); } 100% { opacity: 0; transform: scale(10); } }
.spfx-shiny .sp-star { width: 22px; height: 22px; margin: -11px 0 0 -11px; opacity: 0;
  background: radial-gradient(circle, #fff 0 18%, transparent 20%), conic-gradient(from 45deg, transparent 0 20%, #ffe46b 22% 28%, transparent 30% 45%, #ffe46b 47% 53%, transparent 55% 70%, #ffe46b 72% 78%, transparent 80% 95%, #ffe46b 97%);
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); background: #fff6b8;
  filter: drop-shadow(0 0 6px #ffd23d); animation: sp-star .95s cubic-bezier(.1, .7, .3, 1) var(--t) forwards; }
@keyframes sp-star { 0% { opacity: 1; transform: rotate(var(--a)) translateY(0) scale(.2) rotate(0); }
  70% { opacity: 1; } 100% { opacity: 0; transform: rotate(var(--a)) translateY(calc(-1 * var(--d))) scale(var(--s)) rotate(180deg); } }
/* Penumbra: the screen darkens, a shadow slash, smoke */
.spfx-veil { position: fixed; inset: 0; z-index: 9390; pointer-events: none; }
.spfx-veil.shadow { background: radial-gradient(ellipse at 50% 45%, transparent 18%, rgba(24, 4, 46, .55) 58%, rgba(8, 0, 18, .9));
  animation: sp-veil 1.05s ease-out forwards; }
@keyframes sp-veil { 0% { opacity: 0; } 22% { opacity: 1; } 100% { opacity: 0; } }
.spfx-shadow .sp-label { color: #e9d4ff; text-shadow: 0 0 6px #000, 0 0 18px #8b2bff, 0 0 34px #4a0080, 0 3px 0 #1a0030; }
.spfx-shadow .sp-slash { width: 260px; height: 14px; margin: -7px 0 0 -130px; border-radius: 50%;
  background: linear-gradient(90deg, transparent, #1a0030 18%, #b96bff 50%, #1a0030 82%, transparent); box-shadow: 0 0 22px #8b2bff, 0 0 40px #2a004a;
  transform: rotate(-32deg) scaleX(0); animation: sp-slash .55s cubic-bezier(.2, .9, .2, 1) forwards; }
.spfx-shadow .sp-slash.s2 { transform: rotate(28deg) scaleX(0); animation-delay: .1s; height: 9px; }
@keyframes sp-slash { 0% { opacity: 1; transform: rotate(var(--r, -32deg)) scaleX(0); } 45% { opacity: 1; transform: rotate(var(--r, -32deg)) scaleX(1.1); }
  100% { opacity: 0; transform: rotate(var(--r, -32deg)) scaleX(1.2); } }
.spfx-shadow .sp-slash.s2 { --r: 28deg; }
.spfx-shadow .sp-smoke { width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; opacity: 0;
  background: radial-gradient(circle, rgba(120, 40, 200, .85), rgba(30, 0, 60, .7) 55%, transparent 72%); filter: blur(2px);
  animation: sp-smoke 1s ease-out forwards; }
@keyframes sp-smoke { 0% { opacity: .9; transform: rotate(var(--a)) translateY(0) scale(.4); } 100% { opacity: 0; transform: rotate(var(--a)) translateY(calc(-1 * var(--d))) scale(calc(var(--s) * 2.2)); } }
/* Refração: a rainbow splitting from the hit */
.spfx-prism .sp-label { background: linear-gradient(90deg, #ff4f6d, #ff9a3d, #ffd23d, #5fe39a, #3dd6ff, #5b7bff, #c46bff); -webkit-background-clip: text; background-clip: text;
  color: transparent; filter: drop-shadow(0 2px 0 #1d0a52) drop-shadow(0 0 10px rgba(255, 255, 255, .7)); }
.spfx-prism .sp-prism { width: 30px; height: 30px; margin: -15px 0 0 -15px; background: linear-gradient(135deg, #fff, #dff6ff);
  clip-path: polygon(50% 0, 100% 100%, 0 100%); filter: drop-shadow(0 0 10px #fff); animation: sp-prismi .9s ease-out forwards; }
@keyframes sp-prismi { 0% { opacity: 0; transform: scale(.2) rotate(-40deg); } 25% { opacity: 1; transform: scale(1.3) rotate(0); } 100% { opacity: 0; transform: scale(1) rotate(10deg); } }
.spfx-prism .sp-ring.rb { width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; border: 0;
  background: conic-gradient(#ff4f6d, #ff9a3d, #ffd23d, #5fe39a, #3dd6ff, #5b7bff, #c46bff, #ff4f6d);
  -webkit-mask: radial-gradient(circle, transparent 58%, #000 60%); mask: radial-gradient(circle, transparent 58%, #000 60%); animation: sp-ring .8s ease-out forwards; }
.spfx-prism .sp-ray { width: 6px; height: 150px; margin-left: -3px; transform-origin: 50% 0; border-radius: 3px; opacity: 0;
  background: linear-gradient(180deg, #fff, var(--c) 30%, transparent); box-shadow: 0 0 12px var(--c);
  animation: sp-ray .85s ease-out var(--t) forwards; }
@keyframes sp-ray { 0% { opacity: 0; transform: rotate(calc(var(--a) + 180deg)) scaleY(0); } 30% { opacity: 1; transform: rotate(calc(var(--a) + 180deg)) scaleY(1); }
  100% { opacity: 0; transform: rotate(calc(var(--a) + 180deg)) scaleY(1.25); } }
/* Glitch: the screen tears in RGB slices */
.spfx-glitch .sp-label { color: #fff; text-shadow: -3px 0 #ff00c8, 3px 0 #00e5ff, 0 0 14px rgba(0, 255, 156, .6); font-family: ui-monospace, Consolas, monospace; font-weight: 900;
  animation: sp-lab 1.4s cubic-bezier(.2, .9, .3, 1.2) forwards, sp-jit .12s steps(2) 6; }
@keyframes sp-jit { 0% { margin-left: -4px; } 50% { margin-left: 5px; } 100% { margin-left: 0; } }
.spfx-glitch .sp-px { width: var(--w); height: 8px; margin: -4px 0 0 0; background: linear-gradient(90deg, #00ff9c, #ff00c8 50%, #00e5ff);
  transform: translate(var(--x), var(--y)); opacity: 0; animation: sp-px .6s steps(4) forwards; mix-blend-mode: screen; }
@keyframes sp-px { 0% { opacity: 1; } 50% { opacity: .2; transform: translate(calc(var(--x) * -1), var(--y)); } 75% { opacity: 1; } 100% { opacity: 0; } }
.spfx-veil.glitch { mix-blend-mode: screen; }
.spfx-veil.glitch .sp-band { position: absolute; left: 0; right: 0; top: var(--y); height: var(--h); transform: translateX(var(--x));
  background: linear-gradient(90deg, rgba(255, 0, 200, .35), rgba(0, 229, 255, .35)); animation: sp-band .6s steps(3) forwards; }
@keyframes sp-band { 0% { opacity: 1; } 33% { transform: translateX(calc(var(--x) * -2)); } 66% { opacity: .6; transform: translateX(var(--x)); } 100% { opacity: 0; } }
#wscene.sp-shake { animation: sp-shake .5s steps(5); }
@keyframes sp-shake { 0% { transform: translate(0); filter: none; } 20% { transform: translate(-6px, 2px); filter: hue-rotate(90deg) saturate(1.6); }
  40% { transform: translate(5px, -3px); } 60% { transform: translate(-3px, 1px); filter: hue-rotate(-60deg); } 80% { transform: translate(2px, 0); } 100% { transform: none; filter: none; } }
/* Vida extra: a pixel 1UP */
.spfx-retro .sp-label { font: 900 30px/1 ui-monospace, Consolas, monospace; color: #7dff5a; letter-spacing: .08em;
  text-shadow: 3px 0 0 #0b3d00, -3px 0 0 #0b3d00, 0 3px 0 #0b3d00, 0 -3px 0 #0b3d00, 3px 3px 0 #0b3d00, 0 0 18px rgba(125, 255, 90, .8);
  animation: sp-1up 1.8s steps(12) forwards; }
@keyframes sp-1up { 0% { opacity: 0; transform: translate(-50%, 24px); } 12% { opacity: 1; } 80% { opacity: 1; transform: translate(-50%, -40px); } 100% { opacity: 0; transform: translate(-50%, -52px); } }
.spfx-retro .sp-pixel { width: 10px; height: 10px; margin: -5px 0 0 -5px; background: var(--c); box-shadow: 0 0 0 2px #0b3d00; opacity: 0;
  animation: sp-pix 1s steps(6) forwards; }
@keyframes sp-pix { 0% { opacity: 1; transform: rotate(var(--a)) translateY(0); } 100% { opacity: 0; transform: rotate(var(--a)) translateY(calc(-1 * var(--d))); } }
.spfx-retro .sp-pxring { width: 16px; height: 16px; margin: -8px 0 0 -8px; background: transparent;
  box-shadow: 0 -24px 0 #7dff5a, 17px -17px 0 #7dff5a, 24px 0 0 #7dff5a, 17px 17px 0 #7dff5a, 0 24px 0 #7dff5a, -17px 17px 0 #7dff5a, -24px 0 0 #7dff5a, -17px -17px 0 #7dff5a;
  animation: sp-pxr .8s steps(5) forwards; }
@keyframes sp-pxr { 0% { opacity: 1; transform: scale(.4); } 100% { opacity: 0; transform: scale(3); } }
@media (prefers-reduced-motion: reduce) { .spfx > i, .spfx-veil, #wscene.sp-shake { animation-duration: .01s !important; } }

/* 20/11 (owner): the Scancard's % and the 2x speed are Infini+ perks: a free player sees the plan's crown instead */
.wthrowmv.noodds .wthr-bar { display: none; }
.wthr-n .wthr-plus { display: inline-flex; align-items: center; gap: 2px; opacity: .85; }
.wthr-n .wthr-plus .gi { width: 15px; height: 15px; }
.wr-speed.plus { position: relative; opacity: .8; }
.wr-speed .wr-plus { position: absolute; top: -7px; right: -6px; display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%;
  background: linear-gradient(135deg, #6a1fd0, #d6337f 60%, #ffb02e); box-shadow: 0 0 0 1.5px #fff; font-style: normal; }
.wr-speed .wr-plus .gi { width: 11px; height: 11px; }

/* 21/11 (owner: "a victory animation when an area is finished"): the guardian falls (infiniworld.js victoryShow) */
.wvic { position: fixed; inset: 0; z-index: 9500; display: grid; place-items: center; overflow: hidden; cursor: pointer; animation: vc-in .35s ease-out; }
.wvic.out { animation: vc-out .45s ease-in forwards; }
@keyframes vc-in { from { opacity: 0; } } @keyframes vc-out { to { opacity: 0; } }
.vc-bg { position: absolute; inset: 0; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); background: radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--c) 45%, #2a0f6e) 0%, rgba(20, 8, 50, .97) 62%, rgba(8, 3, 22, .99)); }
.vc-rays { position: absolute; left: 50%; top: 42%; width: 220vmax; height: 220vmax; margin: -110vmax 0 0 -110vmax; opacity: .55;
  background: repeating-conic-gradient(from 0deg, rgba(255, 220, 120, .55) 0deg 7deg, transparent 7deg 20deg, color-mix(in srgb, var(--c) 70%, transparent) 20deg 26deg, transparent 26deg 40deg);
  -webkit-mask: radial-gradient(circle, #000 0, #000 18%, transparent 55%); mask: radial-gradient(circle, #000 0, #000 18%, transparent 55%);
  animation: vc-spin 14s linear infinite; }
.vc-rays.r2 { opacity: .3; animation-duration: 22s; animation-direction: reverse; }
@keyframes vc-spin { to { transform: rotate(360deg); } }
.vc-in { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 20px; }
.vc-crown { font-size: 54px; line-height: 1; filter: drop-shadow(0 0 14px rgba(255, 210, 61, .9)); animation: vc-crown .9s cubic-bezier(.2, 1.6, .4, 1) both; }
.vc-crown .gi { width: 64px; height: 64px; }
@keyframes vc-crown { 0% { transform: translateY(-80px) scale(.2) rotate(-30deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.vc-t { margin: 0; font: 700 clamp(48px, 13vw, 92px)/1 Fredoka, sans-serif; letter-spacing: .03em;
  background: linear-gradient(180deg, #fffbe0 0%, #ffd23d 45%, #ff9f1a 75%, #ff6f3d); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 0 #7a3d00) drop-shadow(0 0 24px rgba(255, 210, 61, .75));
  animation: vc-title .8s cubic-bezier(.2, 1.7, .4, 1) .15s both, vc-glow 1.6s ease-in-out 1s infinite; }
@keyframes vc-title { 0% { transform: scale(.2); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
@keyframes vc-glow { 50% { filter: drop-shadow(0 4px 0 #7a3d00) drop-shadow(0 0 40px rgba(255, 230, 120, 1)); } }
.vc-s { margin: 4px 0 0; font: 700 clamp(20px, 5.4vw, 30px)/1.1 Fredoka, sans-serif; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .35), 0 0 16px color-mix(in srgb, var(--c) 80%, transparent);
  animation: vc-up .6s ease-out .55s both; }
.vc-r { font: 800 14px Nunito, sans-serif; color: rgba(255, 255, 255, .8); letter-spacing: .08em; text-transform: uppercase; animation: vc-up .6s ease-out .7s both; }
@keyframes vc-up { from { transform: translateY(16px); opacity: 0; } }
.vc-mon { width: 130px; height: 130px; object-fit: contain; margin-top: 10px; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .45)) drop-shadow(0 0 16px color-mix(in srgb, var(--c) 70%, transparent));
  animation: vc-up .5s ease-out .8s both, vc-hop .7s ease-in-out 1.3s infinite; }
@keyframes vc-hop { 0%, 100% { transform: translateY(0) scale(1, 1); } 40% { transform: translateY(-22px) scale(.96, 1.04); } 55% { transform: translateY(-22px); } 85% { transform: translateY(0) scale(1.06, .94); } }
.vc-first { margin-top: 8px; padding: 6px 14px; border-radius: 99px; font: 800 13px Nunito, sans-serif; color: #3a2400;
  background: linear-gradient(90deg, #fff3a8, #ffcf3d); box-shadow: 0 0 16px rgba(255, 210, 61, .8); animation: vc-up .5s ease-out 1s both; }
.vc-tap { margin-top: 14px; font: 800 12px Nunito, sans-serif; color: rgba(255, 255, 255, .55); animation: vc-up .5s ease-out 1.6s both; }
.vc-star { position: absolute; left: 50%; top: 32%; width: 18px; height: 18px; margin: -9px; background: #fff6b8;
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); filter: drop-shadow(0 0 6px #ffd23d); opacity: 0;
  animation: vc-star 1.4s ease-out var(--d) infinite; }
@keyframes vc-star { 0% { opacity: 1; transform: rotate(var(--a)) translateY(0) scale(.2); } 100% { opacity: 0; transform: rotate(var(--a)) translateY(-170px) scale(var(--k)) rotate(180deg); } }
.vc-conf { position: absolute; top: -20px; left: var(--x); width: var(--w); height: calc(var(--w) * 1.6); border-radius: 2px; background: var(--c);
  animation: vc-fall var(--t) cubic-bezier(.3, .2, .6, 1) var(--d) both; }
@keyframes vc-fall { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 100% { transform: translate(var(--sw), 110vh) rotate(var(--r)); opacity: .9; } }
@media (prefers-reduced-motion: reduce) { .vc-rays, .vc-title, .vc-mon, .vc-t { animation: none !important; } }

/* 21/11 (owner: "when the chest opens, the creatures' slots go way up"): on a wide screen the prize taken lies in one row
   (title, the card, the note and the way on), low enough for the team's slots to keep their fight spot */
@media (min-width: 760px) {
  .wrun.hud #wpanel .wend.boon.done { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center;
    grid-template-areas: "h card note" "h card next"; column-gap: 20px; row-gap: 6px; }
  .wrun.hud #wpanel .wend.boon.done:not(:has(> .wpaynote)) { grid-template-areas: "h card next"; }
  .wrun.hud #wpanel .wend.boon.done > .boon-h { grid-area: h; flex-direction: column; text-align: center; }
  .wrun.hud #wpanel .wend.boon.done > .boon-got { grid-area: card; }
  .wrun.hud #wpanel .wend.boon.done > .wpaynote { grid-area: note; align-self: end; text-align: left; margin: 0; }
  .wrun.hud #wpanel .wend.boon.done > .wnext, .wrun.hud #wpanel .wend.boon.done > .wrooms { grid-area: next; align-self: start; }
  .wrun.hud #wpanel .wend.boon.done:not(:has(> .wpaynote)) > .wnext, .wrun.hud #wpanel .wend.boon.done:not(:has(> .wpaynote)) > .wrooms { align-self: center; }
}

/* 21/11 (owner: "Exp. Share: on a kill the experience bar goes up, and a notice when someone levels up"): infiniworld.js xpShow */
.wxps, .wrun.hud > .wxps { position: absolute !important; z-index: 30; left: 50%; top: calc(var(--hud-top, 60px) + 6px); transform: translateX(-50%); width: min(380px, calc(100% - 24px));
  animation: wxps-in .3s cubic-bezier(.2, 1.4, .4, 1); cursor: pointer; }
.wxps.out { animation: wxps-out .32s ease-in forwards; }
@keyframes wxps-in { from { opacity: 0; transform: translate(-50%, -14px) scale(.94); } }
@keyframes wxps-out { to { opacity: 0; transform: translate(-50%, -10px) scale(.96); } }
.wxps-in { display: flex; flex-direction: column; gap: 7px; padding: 10px 12px 11px; border-radius: 18px; color: #fff;
  background: linear-gradient(180deg, rgba(34, 18, 82, .9), rgba(14, 8, 36, .9)); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 10px 28px rgba(0, 0, 0, .4); }
.wxps-t { display: flex; align-items: center; gap: 6px; font: 900 15px Fredoka, sans-serif; color: #ffe27a; text-shadow: 0 0 12px rgba(255, 210, 61, .6); }
.wxps-t .gi { width: 18px; height: 18px; }
.wxps-t small { margin-left: auto; font: 800 10.5px Nunito, sans-serif; color: rgba(236, 230, 255, .7); text-shadow: none; }
.wxps-r { position: relative; display: flex; align-items: center; gap: 9px; padding: 4px 6px; border-radius: 12px; transition: background .3s; }
.wxps-r.up { background: rgba(255, 210, 61, .12); }
.wxps-r.flash { animation: wxps-flash .55s ease-out; }
@keyframes wxps-flash { 0% { box-shadow: 0 0 0 0 rgba(255, 226, 122, .9); } 100% { box-shadow: 0 0 0 10px rgba(255, 226, 122, 0); } }
.wxps-pic { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: radial-gradient(circle at 50% 35%, #4a2c8f, #170b38 75%); }
.wxps-pic img { width: 36px; height: 36px; object-fit: contain; }
.wxps-r.flash .wxps-pic img { animation: wxps-hop .5s ease-out; }
@keyframes wxps-hop { 40% { transform: translateY(-7px) scale(1.12); } }
.wxps-m { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.wxps-n { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.wxps-n b { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 800 13px Nunito, sans-serif; }
.wxps-lv { flex: none; font: 900 11px Nunito, sans-serif; font-style: normal; padding: 0 6px; border-radius: 99px; background: rgba(255, 255, 255, .14); }
.wxps-r.up .wxps-lv { color: #3a2400; background: linear-gradient(90deg, #fff3a8, #ffcf3d); }
.wxps-n small { margin-left: auto; flex: none; font: 800 11px Nunito, sans-serif; color: #8fe0ff; }
.wxps-bar { position: relative; display: block; height: 8px; border-radius: 99px; overflow: hidden; background: linear-gradient(180deg, #1c1540, #2e2460);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.wxps-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: linear-gradient(90deg, #3dd6ff, #8b5cff 60%, #ff4fa3);
  box-shadow: 0 0 8px rgba(61, 214, 255, .7); }
.wxps-r.max .wxps-bar i { background: linear-gradient(90deg, #ffe066, #ffb020); box-shadow: 0 0 8px rgba(255, 200, 60, .7); }
.wxps-up { display: flex; align-items: center; gap: 4px; font: 900 11.5px Nunito, sans-serif; color: #ffe27a; animation: wxps-pop .4s cubic-bezier(.2, 1.6, .4, 1); }
.wxps-up .gi { width: 14px; height: 14px; }
.wxps-up[hidden] { display: none; }
@keyframes wxps-pop { from { transform: scale(.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .wxps, .wxps-r.flash, .wxps-up, .wxps-r.flash .wxps-pic img { animation: none !important; } }

/* 21/11 (owner: "see which trainer it is by their look"): a trainer room's button shows their explorer and name */
.wroom.wr-tr { display: inline-flex; align-items: center; gap: 8px; text-align: left; }
.wroom.wr-tr .wr-face { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-style: normal;
  font-weight: 800; color: #fff; background: #5b33d6; border: 2px solid rgba(255, 255, 255, .8); }
.wroom.wr-tr span { display: flex; flex-direction: column; line-height: 1.1; }
.wroom.wr-tr small { font-size: 10.5px; opacity: .8; }

/* 21/11 (element advantages stacked): a double advantage / double resistance badge stands out more */
.wmv-x.up2 { background: linear-gradient(90deg, #ff9a2e, #ff3d6e) !important; color: #fff !important; box-shadow: 0 0 8px rgba(255, 90, 80, .6); }
.wmv-x.down2 { background: #3a3f55 !important; color: #c9cfe0 !important; }

/* 22/11 (owner: "improve the visibility of the letters on the moves"): a dark outline and soft shadow under every text of
   a move button, so the pale elements (Ice, Sky, Light, Sweet) read as well as the dark ones */
.wmv .wmv-t b, .wmv .wmv-t small, .wmv .wmv-b, .wmv .wmv-b small, .wmv .wmv-b b, .wmv .wmv-fx {
  color: #fff;
  text-shadow: -1px 0 0 rgba(8, 10, 40, .55), 1px 0 0 rgba(8, 10, 40, .55), 0 -1px 0 rgba(8, 10, 40, .55), 0 1px 0 rgba(8, 10, 40, .55), 0 2px 4px rgba(0, 0, 0, .45);
}
.wmv .wmv-t b { font-weight: 900; letter-spacing: .2px; }
.wmv .wmv-t small, .wmv .wmv-b small { font-weight: 800; opacity: 1; }
