/* Kenney modular victim + compact verdict + per-trap body-part physics. */
.dealer-strip {
  width:min(760px,96%); min-height:52px; margin:3px auto 0; padding:10px 14px 7px;
  justify-content:center; border-top:1px solid var(--line); color:var(--muted);
}
.dealer-strip .devil-avatar { flex:0 0 auto; font-size:30px; }
.dealer-strip strong { color:var(--red-hot); letter-spacing:.09em; font-size:10px; white-space:nowrap; }
.dealer-line { color:var(--ink); font:italic 16px/1.3 Georgia,serif; }

.table { min-height:470px; padding-bottom:2px; }
.contraption { height:350px; }
.victim.modular-victim {
  width:220px; height:330px; position:relative; z-index:3;
  transform-origin:50% 92%; filter:drop-shadow(0 14px 12px rgba(0,0,0,.34));
  transition:transform .2s ease, filter .2s ease;
}
.modular-victim img { display:block; pointer-events:none; user-select:none; }
.modular-victim .body-part { position:absolute; transform-origin:50% 50%; }

.modular-victim .head-group { width:104px; height:108px; left:58px; top:0; z-index:7; transform-origin:50% 88%; }
.modular-victim .head-base { position:absolute; width:97px; left:4px; top:9px; }
.modular-victim .hair { position:absolute; width:96px; left:4px; top:-2px; z-index:3; }
.modular-victim .face { position:absolute; width:56px; left:24px; top:31px; z-index:4; }
.modular-victim .neck { width:54px; left:83px; top:91px; z-index:2; }
.modular-victim .torso { width:86px; left:67px; top:105px; z-index:4; }
.modular-victim .hips { width:86px; left:67px; top:194px; z-index:5; }

.modular-victim .arm-group { width:100px; height:115px; top:112px; z-index:3; transform-origin:50% 16%; }
.modular-victim .arm-group .sleeve { position:absolute; width:96px; left:0; top:0; }
.modular-victim .arm-group .hand { position:absolute; width:34px; top:70px; z-index:4; }
.modular-victim .arm-left { left:4px; transform:rotate(2deg); }
.modular-victim .arm-left .sleeve { transform:scaleX(-1); }
.modular-victim .arm-left .hand { left:-4px; }
.modular-victim .arm-right { right:4px; transform:rotate(-2deg); }
.modular-victim .arm-right .hand { right:-4px; }

.modular-victim .leg-group { width:66px; height:118px; top:211px; z-index:2; transform-origin:50% 5%; }
.modular-victim .leg-group .trouser-leg { position:absolute; width:62px; left:2px; top:0; }
.modular-victim .leg-group .shoe { position:absolute; width:53px; left:7px; top:91px; }
.modular-victim .leg-left { left:48px; transform:rotate(1deg); }
.modular-victim .leg-right { right:48px; transform:scaleX(-1) rotate(1deg); }

/* Keep the verdict useful but out of the performance. Devil commentary lives below the cards. */
.verdict {
  top:auto; bottom:20px; width:auto; min-width:178px; max-width:88%;
  transform:translateX(-50%); padding:11px 12px 10px; border-radius:13px;
  background:rgba(16,7,6,.89);
}
.verdict strong { margin:0; color:var(--red-hot); font:900 15px/1 Georgia,serif; letter-spacing:.08em; }
.verdict-actions { margin-top:9px; }
.verdict-actions button { padding:8px 10px; }
@keyframes verdictIn { from { opacity:0; transform:translateX(-50%) translateY(5px) scale(.95) } }

/* The generic single-piece victim animations are disabled for the modular victim.
   Each trap now gets its own little anatomy lesson. */
.contraption.guillotine.dead .modular-victim,
.contraption.trapdoor.dead .modular-victim,
.contraption.lightning.dead .modular-victim,
.contraption.blackhole.dead .modular-victim,
.contraption.cannon.dead .modular-victim,
.contraption.anvil.dead .modular-victim,
.contraption.poison.dead .modular-victim,
.contraption.crossbow.dead .modular-victim { animation:none; }

/* Guillotine: head exits first, body realizes this slightly later. */
.contraption.guillotine.dead .modular-victim .head-group { animation:guillotineHead .95s .17s cubic-bezier(.2,.8,.3,1) forwards; }
.contraption.guillotine.dead .modular-victim .neck { opacity:0; transition:opacity .04s .18s linear; }
.contraption.guillotine.dead .modular-victim .arm-left { animation:guillotineArmL .42s .12s ease-out forwards; }
.contraption.guillotine.dead .modular-victim .arm-right { animation:guillotineArmR .42s .12s ease-out forwards; }
.contraption.guillotine.dead .modular-victim .leg-left { animation:guillotineKneeL .5s .2s ease-out forwards; }
.contraption.guillotine.dead .modular-victim .leg-right { animation:guillotineKneeR .5s .2s ease-out forwards; }
@keyframes guillotineHead { 18%{transform:translate(4px,-3px) rotate(8deg)} 100%{transform:translate(96px,128px) rotate(430deg);opacity:.94} }
@keyframes guillotineArmL { to{transform:translate(-12px,5px) rotate(-38deg)} }
@keyframes guillotineArmR { to{transform:translate(12px,5px) rotate(38deg)} }
@keyframes guillotineKneeL { to{transform:translateY(10px) rotate(-11deg)} }
@keyframes guillotineKneeR { to{transform:scaleX(-1) translateY(10px) rotate(-11deg)} }

/* Trapdoor: everybody falls, but nobody agreed on how. */
.contraption.trapdoor.dead .modular-victim .head-group { animation:trapHead 1.05s .10s ease-in forwards; }
.contraption.trapdoor.dead .modular-victim .neck { animation:trapCenter .9s .06s ease-in forwards; }
.contraption.trapdoor.dead .modular-victim .torso { animation:trapCenter .92s .04s ease-in forwards; }
.contraption.trapdoor.dead .modular-victim .hips { animation:trapCenter .88s ease-in forwards; }
.contraption.trapdoor.dead .modular-victim .arm-left { animation:trapArmL 1.0s .03s ease-in forwards; }
.contraption.trapdoor.dead .modular-victim .arm-right { animation:trapArmR 1.0s .03s ease-in forwards; }
.contraption.trapdoor.dead .modular-victim .leg-left { animation:trapLegL .88s ease-in forwards; }
.contraption.trapdoor.dead .modular-victim .leg-right { animation:trapLegR .9s ease-in forwards; }
@keyframes trapHead { to{transform:translate(38px,390px) rotate(240deg);opacity:.15} }
@keyframes trapCenter { to{transform:translateY(390px) rotate(28deg);opacity:.12} }
@keyframes trapArmL { 20%{transform:translate(-24px,-9px) rotate(-78deg)} to{transform:translate(-75px,390px) rotate(-320deg);opacity:.12} }
@keyframes trapArmR { 20%{transform:translate(24px,-9px) rotate(78deg)} to{transform:translate(78px,390px) rotate(330deg);opacity:.12} }
@keyframes trapLegL { to{transform:translate(-28px,390px) rotate(-85deg);opacity:.12} }
@keyframes trapLegR { to{transform:scaleX(-1) translate(-28px,390px) rotate(-85deg);opacity:.12} }

/* Lightning: limbs all receive different firmware updates. */
.contraption.lightning.dead .modular-victim .head-group { animation:shockHead .12s linear 9; }
.contraption.lightning.dead .modular-victim .hair { animation:shockHair .55s .1s ease-out forwards; }
.contraption.lightning.dead .modular-victim .arm-left { animation:shockArmL .10s linear 10; }
.contraption.lightning.dead .modular-victim .arm-right { animation:shockArmR .11s linear 9; }
.contraption.lightning.dead .modular-victim .leg-left { animation:shockLegL .11s linear 9; }
.contraption.lightning.dead .modular-victim .leg-right { animation:shockLegR .10s linear 10; }
.contraption.lightning.dead .modular-victim .torso,
.contraption.lightning.dead .modular-victim .hips,
.contraption.lightning.dead .modular-victim .neck { filter:grayscale(1) brightness(1.9); transition:filter .1s; }
@keyframes shockHead { 50%{transform:translate(7px,-3px) rotate(5deg)} }
@keyframes shockHair { to{transform:translateY(-22px) rotate(12deg) scale(1.13)} }
@keyframes shockArmL { 50%{transform:translate(-12px,-5px) rotate(-36deg)} }
@keyframes shockArmR { 50%{transform:translate(12px,-5px) rotate(36deg)} }
@keyframes shockLegL { 50%{transform:translate(-7px,2px) rotate(-10deg)} }
@keyframes shockLegR { 50%{transform:scaleX(-1) translate(-7px,2px) rotate(-10deg)} }

/* Black hole: consumption is sequential and unnecessarily theatrical. */
.contraption.blackhole.dead .modular-victim .head-group { animation:holeHead .9s .03s ease-in forwards; }
.contraption.blackhole.dead .modular-victim .arm-left { animation:holeArmL .8s .13s ease-in forwards; }
.contraption.blackhole.dead .modular-victim .arm-right { animation:holeArmR .8s .20s ease-in forwards; }
.contraption.blackhole.dead .modular-victim .neck { animation:holeCenter .72s .28s ease-in forwards; }
.contraption.blackhole.dead .modular-victim .torso { animation:holeCenter .72s .34s ease-in forwards; }
.contraption.blackhole.dead .modular-victim .hips { animation:holeCenter .7s .43s ease-in forwards; }
.contraption.blackhole.dead .modular-victim .leg-left { animation:holeLegL .75s .51s ease-in forwards; }
.contraption.blackhole.dead .modular-victim .leg-right { animation:holeLegR .75s .58s ease-in forwards; }
@keyframes holeHead { to{transform:translateY(-145px) scale(.02) rotate(720deg);opacity:0} }
@keyframes holeArmL { to{transform:translate(84px,-150px) scale(.02) rotate(620deg);opacity:0} }
@keyframes holeArmR { to{transform:translate(-84px,-150px) scale(.02) rotate(-620deg);opacity:0} }
@keyframes holeCenter { to{transform:translateY(-165px) scale(.02) rotate(420deg);opacity:0} }
@keyframes holeLegL { to{transform:translate(38px,-250px) scale(.02) rotate(540deg);opacity:0} }
@keyframes holeLegR { to{transform:scaleX(-1) translate(38px,-250px) scale(.02) rotate(540deg);opacity:0} }

/* Cannon: turns one modular character into several projectiles. */
.contraption.cannon.dead .modular-victim .head-group { animation:cannonHead .95s .06s cubic-bezier(.2,.8,.3,1) forwards; }
.contraption.cannon.dead .modular-victim .neck { animation:cannonCenter .88s .03s cubic-bezier(.2,.8,.3,1) forwards; }
.contraption.cannon.dead .modular-victim .torso { animation:cannonCenter .9s cubic-bezier(.2,.8,.3,1) forwards; }
.contraption.cannon.dead .modular-victim .hips { animation:cannonHips .9s .02s cubic-bezier(.2,.8,.3,1) forwards; }
.contraption.cannon.dead .modular-victim .arm-left { animation:cannonArmL .92s .05s cubic-bezier(.2,.8,.3,1) forwards; }
.contraption.cannon.dead .modular-victim .arm-right { animation:cannonArmR .92s .05s cubic-bezier(.2,.8,.3,1) forwards; }
.contraption.cannon.dead .modular-victim .leg-left { animation:cannonLegL .94s .04s cubic-bezier(.2,.8,.3,1) forwards; }
.contraption.cannon.dead .modular-victim .leg-right { animation:cannonLegR .94s .04s cubic-bezier(.2,.8,.3,1) forwards; }
@keyframes cannonHead { to{transform:translate(430px,-260px) rotate(940deg) scale(.55)} }
@keyframes cannonCenter { to{transform:translate(500px,-180px) rotate(620deg) scale(.48)} }
@keyframes cannonHips { to{transform:translate(475px,-90px) rotate(760deg) scale(.48)} }
@keyframes cannonArmL { to{transform:translate(390px,-310px) rotate(-1080deg) scale(.45)} }
@keyframes cannonArmR { to{transform:translate(530px,-260px) rotate(1180deg) scale(.45)} }
@keyframes cannonLegL { to{transform:translate(440px,-30px) rotate(-900deg) scale(.45)} }
@keyframes cannonLegR { to{transform:scaleX(-1) translate(-560px,-50px) rotate(-900deg) scale(.45)} }

/* Anvil: torso compresses, head and limbs choose self-employment. */
.contraption.anvil.dead .modular-victim .head-group { animation:anvilHead .82s .18s ease-out forwards; }
.contraption.anvil.dead .modular-victim .neck { animation:anvilFlat .22s .18s ease-in forwards; }
.contraption.anvil.dead .modular-victim .torso { animation:anvilFlat .24s .18s ease-in forwards; }
.contraption.anvil.dead .modular-victim .hips { animation:anvilFlat .24s .18s ease-in forwards; }
.contraption.anvil.dead .modular-victim .arm-left { animation:anvilArmL .75s .19s ease-out forwards; }
.contraption.anvil.dead .modular-victim .arm-right { animation:anvilArmR .75s .19s ease-out forwards; }
.contraption.anvil.dead .modular-victim .leg-left { animation:anvilLegL .45s .18s ease-out forwards; }
.contraption.anvil.dead .modular-victim .leg-right { animation:anvilLegR .45s .18s ease-out forwards; }
.contraption.anvil.dead .modular-victim .leg-left .shoe { animation:shoePopL .7s .2s ease-out forwards; }
.contraption.anvil.dead .modular-victim .leg-right .shoe { animation:shoePopR .7s .2s ease-out forwards; }
@keyframes anvilHead { to{transform:translate(112px,64px) rotate(510deg)} }
@keyframes anvilFlat { to{transform:translateY(78px) scaleY(.12) scaleX(1.45)} }
@keyframes anvilArmL { to{transform:translate(-145px,78px) rotate(-460deg)} }
@keyframes anvilArmR { to{transform:translate(145px,78px) rotate(460deg)} }
@keyframes anvilLegL { to{transform:translate(-25px,45px) rotate(-67deg) scaleY(.55)} }
@keyframes anvilLegR { to{transform:scaleX(-1) translate(-25px,45px) rotate(-67deg) scaleY(.55)} }
@keyframes shoePopL { to{transform:translate(-60px,-22px) rotate(-320deg)} }
@keyframes shoePopR { to{transform:translate(60px,-22px) rotate(320deg)} }

/* Poison: less explosion, more terrible life choice. */
.contraption.poison.dead .modular-victim .head-group { animation:poisonHead 1.1s .08s ease-in forwards; }
.contraption.poison.dead .modular-victim .head-base { animation:poisonSkin .8s .08s forwards; }
.contraption.poison.dead .modular-victim .arm-left { animation:poisonArmL .8s .16s ease-in forwards; }
.contraption.poison.dead .modular-victim .arm-right { animation:poisonArmR .8s .16s ease-in forwards; }
.contraption.poison.dead .modular-victim .torso { animation:poisonTorso .9s .2s ease-in forwards; }
.contraption.poison.dead .modular-victim .hips { animation:poisonHips .9s .2s ease-in forwards; }
.contraption.poison.dead .modular-victim .leg-left { animation:poisonLegL .85s .18s ease-in forwards; }
.contraption.poison.dead .modular-victim .leg-right { animation:poisonLegR .85s .18s ease-in forwards; }
@keyframes poisonSkin { to{filter:hue-rotate(82deg) saturate(1.35)} }
@keyframes poisonHead { 40%{transform:translate(-5px,5px) rotate(-12deg)} to{transform:translate(55px,128px) rotate(92deg)} }
@keyframes poisonArmL { to{transform:translate(-18px,88px) rotate(-112deg)} }
@keyframes poisonArmR { to{transform:translate(18px,88px) rotate(112deg)} }
@keyframes poisonTorso { to{transform:translate(30px,97px) rotate(72deg) scaleY(.8)} }
@keyframes poisonHips { to{transform:translate(34px,90px) rotate(65deg)} }
@keyframes poisonLegL { to{transform:translate(-18px,55px) rotate(-42deg)} }
@keyframes poisonLegR { to{transform:scaleX(-1) translate(-18px,55px) rotate(-42deg)} }

/* Crossbow: right arm loses its contract, everything else reacts. */
.contraption.crossbow.dead .modular-victim .arm-right { animation:boltArm .92s .16s cubic-bezier(.16,.76,.28,1) forwards; z-index:8; }
.contraption.crossbow.dead .modular-victim .head-group { animation:boltHead .55s .14s ease-out forwards; }
.contraption.crossbow.dead .modular-victim .torso { animation:boltTorso .55s .14s ease-out forwards; }
.contraption.crossbow.dead .modular-victim .hips { animation:boltHips .55s .14s ease-out forwards; }
.contraption.crossbow.dead .modular-victim .arm-left { animation:boltArmLeft .65s .16s ease-out forwards; }
.contraption.crossbow.dead .modular-victim .leg-left { animation:boltLegL .6s .14s ease-out forwards; }
.contraption.crossbow.dead .modular-victim .leg-right { animation:boltLegR .6s .14s ease-out forwards; }
@keyframes boltArm { to{transform:translate(-150px,42px) rotate(-520deg);opacity:.92} }
@keyframes boltHead { to{transform:translate(-28px,-7px) rotate(-24deg)} }
@keyframes boltTorso { to{transform:translate(-30px,12px) rotate(-13deg)} }
@keyframes boltHips { to{transform:translate(-24px,16px) rotate(-9deg)} }
@keyframes boltArmLeft { to{transform:translate(-18px,-14px) rotate(-72deg)} }
@keyframes boltLegL { to{transform:translate(-12px,8px) rotate(-18deg)} }
@keyframes boltLegR { to{transform:scaleX(-1) translate(12px,8px) rotate(18deg)} }

@media (max-width:820px) {
  .contraption { height:340px; }
  .dealer-strip { justify-content:center; text-align:left; }
  .dealer-line { white-space:normal; overflow:visible; }
  .verdict { bottom:14px; }
}
@media (max-width:520px) {
  .contraption { height:330px; }
  .dealer-strip { min-height:42px; padding-top:6px; }
  .dealer-strip strong { display:none; }
  .verdict { min-width:158px; bottom:11px; }
}