.duello-guscio {
  width: min(368px, 100%);
}

.duello {
  left: 0;
  top: 0;
  width: 400px;
  height: 570px;
  transition: opacity .35s ease;
}

.duello.spenta {
  opacity: 0;
}

.duello .tessera {
  position: absolute;
  width: 270px;
  height: 300px;
}

.duello .difesa {
  left: 10px;
  top: 75px;
  z-index: 1;
}

.duello .attacco {
  left: 119.79px;
  top: 265.15px;
  z-index: 2;
  visibility: hidden;
}

.duello .salto,
.duello .giro,
.duello .rinculo,
.duello .traballio,
.duello .faccia {
  position: absolute;
  inset: 0;
}

.duello .faccia {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.duello .difesa .scura,
.duello.conquistata .difesa .chiara {
  visibility: hidden;
}

.duello.conquistata .difesa .scura {
  visibility: visible;
}

.duello text {
  font-family: 'Marcellus SC', 'Marcellus', serif;
  font-size: 36px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: central;
  fill: #F4E9D7;
}

.duello .chiara text {
  fill: #352D1B;
}

.duello text.colpo {
  transform-box: fill-box;
  transform-origin: center;
}

.duello line {
  stroke-width: 1;
  stroke-linecap: round;
}

.duello .lampo,
.duello .scia {
  position: absolute;
  left: 25.21px;
  top: 23.23px;
  width: 219.58px;
  height: 253.55px;
  background: #FFF;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  opacity: 0;
  pointer-events: none;
}

.duello .scia {
  left: 145px;
  top: 288.38px;
  z-index: 2;
}

.duello .schegge {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.duello .scheggia {
  position: absolute;
  background-position: center;
  background-repeat: no-repeat;
  filter: drop-shadow(0 0 4px rgba(255, 190, 90, .95)) drop-shadow(0 0 9px rgba(255, 150, 60, .55));
  will-change: transform, opacity;
}

.duello.atterra .attacco {
  visibility: visible;
  transform-origin: 50% 96%;
  animation: atterra .52s linear;
}

.duello.affondo .attacco {
  transform-origin: center;
  animation: affondo .42s linear;
}

.duello.affondo .scia {
  animation: scia .26s ease-out forwards;
}

.duello.colpo {
  animation: scossa .52s cubic-bezier(.25, .8, .35, 1);
}

.duello.colpo .difesa {
  z-index: 3;
}

.duello.colpo .salto {
  animation: salto .315s linear;
}

.duello.colpo .giro {
  animation: giro .315s ease-in-out;
}

.duello.colpo .rinculo {
  animation: rinculo .34s linear;
}

.duello.colpo .lampo {
  animation: lampo .22s ease-out;
}

.duello.colpo text.colpo {
  animation: valoreVince .5s ease-in-out;
}

.duello.traballa .traballio {
  animation: traballio .56s linear;
}

@keyframes atterra {
  0% {
    transform: translateY(-150px) scale(1.28);
    opacity: 0;
    filter: drop-shadow(0 30px 18px rgba(0, 0, 0, .4)) brightness(1.22);
    animation-timing-function: cubic-bezier(.55, .06, .68, .19);
  }

  14% {
    opacity: 1;
    animation-timing-function: cubic-bezier(.55, .06, .68, .19);
  }

  58% {
    transform: translateY(0) scale(1.03);
    filter: drop-shadow(0 5px 6px rgba(0, 0, 0, .5)) brightness(1.18);
    animation-timing-function: ease-out;
  }

  70% {
    transform: translateY(0) scale(1.05, .94);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .45)) brightness(1.06);
    animation-timing-function: ease-in-out;
  }

  84% {
    transform: translateY(-9px) scale(.99, 1.02);
    filter: drop-shadow(0 8px 7px rgba(0, 0, 0, .3)) brightness(1.02);
  }

  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
    filter: none;
  }
}

@keyframes affondo {
  0% {
    transform: translate(0, 0) scale(1);
    animation-timing-function: ease-out;
  }

  26% {
    transform: translate(8.06px, 13.96px) scale(.94);
    animation-timing-function: cubic-bezier(.55, 0, .9, .35);
  }

  46% {
    transform: translate(-22.1px, -38.28px) scale(1.099, 1.144);
    animation-timing-function: cubic-bezier(.25, .9, .35, 1);
  }

  100% {
    transform: translate(0, 0) scale(1);
  }
}

@keyframes scia {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(1);
  }

  30% {
    opacity: .55;
  }

  100% {
    opacity: 0;
    transform: translate(-19.5px, -33.78px) scale(1.349, 1.404);
  }
}

@keyframes salto {
  0% {
    transform: translateY(0) scale(1);
    animation-timing-function: cubic-bezier(.15, .7, .4, 1);
  }

  50% {
    transform: translateY(-65.9px) scale(1.1);
    animation-timing-function: cubic-bezier(.55, 0, .85, .45);
  }

  90% {
    transform: translateY(0) scale(.97);
    animation-timing-function: ease-out;
  }

  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes giro {
  0% {
    transform: perspective(520px) rotateY(0deg);
    filter: brightness(1);
  }

  49% {
    transform: perspective(520px) rotateY(89deg);
    filter: brightness(.3);
  }

  50% {
    transform: perspective(520px) rotateY(90deg);
    filter: brightness(.3);
  }

  51% {
    transform: perspective(520px) rotateY(91deg);
    filter: brightness(.3);
  }

  100% {
    transform: perspective(520px) rotateY(0deg);
    filter: brightness(1);
  }
}

@keyframes rinculo {
  0% {
    transform: translate(0, 0);
    animation-timing-function: cubic-bezier(.3, 0, .7, .4);
  }

  30% {
    transform: translate(-4.5px, -7.79px);
    animation-timing-function: cubic-bezier(.2, 1, .3, 1);
  }

  100% {
    transform: translate(0, 0);
  }
}

@keyframes traballio {
  0% { transform: perspective(520px) rotateX(14deg) rotateY(0deg); }
  8.3% { transform: perspective(520px) rotateX(0deg) rotateY(14deg); }
  16.6% { transform: perspective(520px) rotateX(-14deg) rotateY(0deg); }
  25% { transform: perspective(520px) rotateX(0deg) rotateY(-14deg); }
  33.3% { transform: perspective(520px) rotateX(8deg) rotateY(0deg); }
  41.6% { transform: perspective(520px) rotateX(0deg) rotateY(8deg); }
  50% { transform: perspective(520px) rotateX(-8deg) rotateY(0deg); }
  58.3% { transform: perspective(520px) rotateX(0deg) rotateY(-8deg); }
  66.6% { transform: perspective(520px) rotateX(4deg) rotateY(0deg); }
  75% { transform: perspective(520px) rotateX(0deg) rotateY(4deg); }
  83.3% { transform: perspective(520px) rotateX(-4deg) rotateY(0deg); }
  91.6% { transform: perspective(520px) rotateX(0deg) rotateY(-4deg); }
  100% { transform: perspective(520px) rotateX(0deg) rotateY(0deg); }
}

@keyframes lampo {
  0% {
    opacity: 0;
  }

  12% {
    opacity: .85;
  }

  100% {
    opacity: 0;
  }
}

@keyframes valoreVince {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 0 rgba(255, 224, 102, 0));
  }

  40% {
    transform: scale(1.55);
    filter: drop-shadow(0 0 6px rgba(255, 224, 102, .95));
  }
}

@keyframes scossa {
  0%, 100% {
    transform: translate(0, 0);
  }

  17% {
    transform: translate(2.5px, 4.33px);
  }

  32% {
    transform: translate(-1.55px, -2.68px);
  }

  46% {
    transform: translate(.85px, 1.47px);
  }

  59% {
    transform: translate(-.4px, -.69px);
  }

  71% {
    transform: translate(.15px, .26px);
  }
}
