/* Authored character animation layered on the physical cabinet seats. */
.tasskalas-figure[data-cast] {
  width:min(112%,232px);
  max-width:none;
}
.tasskalas-figure .cast-view {
  position:relative;
  z-index:1;
  width:100%;
  max-width:clamp(145px,28svh,225px);
  aspect-ratio:1;
  margin:0;
  transform-origin:center 92%;
  isolation:isolate;
}
.tasskalas-figure :is(.cast-poster,.cast-clip) {
  position:absolute;
  inset:0;
  display:block;
  width:100%;
  height:100%;
  max-height:none;
  object-fit:contain;
  object-position:center bottom;
  transform-origin:center 92%;
  pointer-events:none;
}
.tasskalas-figure .cast-clip { filter:drop-shadow(0 6px 6px #60263f6b); }
.tasskalas-figure .cast-clip[hidden] { display:none; }
.tasskalas-figure[data-reaction] .cast-poster { visibility:hidden; }
.tasskalas-figure[data-cast] i {
  width:89%;
  max-width:225px;
  height:16%;
  min-height:10px;
  bottom:-2%;
  border:1px solid #fff1be;
  box-shadow:0 3px 0 #7c3d5f,inset 0 2px 2px #fff8d7;
  background:linear-gradient(#fff0b9,#d99655 58%,#8b493c 61%,#e5ad6a);
}
.tasskalas-figure[data-cast] i::after {
  position:absolute;
  inset:3px 9px;
  border:2px solid #fff4e2;
  border-radius:50%;
  content:'';
  opacity:0;
  box-shadow:0 0 9px #ff8dc3,inset 0 0 6px #ff9ed5;
  transition:opacity 220ms ease-out;
}
[data-reaction=joy] i::after {opacity:.52}
:is([data-reaction=surprise],[data-reaction=victory]) i::after {opacity:1}
.tasskalas-figure[data-reaction^=idle] i::after {opacity:.3}
.tasskalas-amor[data-reaction=idle-tap] .cast-view::after {
  position:absolute; z-index:2; inset:40% auto auto 32%; width:28%; aspect-ratio:1;
  border:1px solid #fff1c3; border-radius:50%; content:''; pointer-events:none; opacity:0;
  box-shadow:0 0 8px #ffc7e2,inset 0 0 6px #ffe3b7;
  animation:cast-glass-tap 380ms 290ms ease-out;
}
@keyframes cast-glass-tap {
  0% {transform:scale(.52);opacity:0}
  20% {opacity:.74}
  100% {transform:scale(1.38);opacity:0}
}
.reduce-motion .tasskalas-amor .cast-view::after {animation:none}
@media(prefers-reduced-motion:reduce){.tasskalas-amor .cast-view::after{animation:none}}
@media(max-width:730px){
  .arcade-machine.tasskalas-cabinet>.tasskalas-wings {position:static}
  .tasskalas-wings .tasskalas-figure[data-cast] {
    position:absolute;
    z-index:4;
    top:12px;
    width:clamp(45px,15vw,70px);
  }
  .tasskalas-amor[data-cast] {left:8px}
  .tasskalas-lina[data-cast] {right:8px}
  .tasskalas-figure .cast-view {max-width:none}
  .tasskalas-figure[data-cast] i {height:13%;min-height:6px;bottom:-1px}
  .tasskalas-figure[data-cast] i::after {inset:0 3px;border-width:1px}
  .tasskalas-playfield .arcade-mission {margin-inline:clamp(38px,13vw,61px)}
  .tasskalas-playfield .goals-heading {
    display:grid;
    grid-template-columns:1fr;
    justify-items:center;
    gap:2px;
    text-align:center;
  }
  .tasskalas-playfield .goals-heading h1 {font-size:clamp(11px,3.6vw,16px)}
  .tasskalas-playfield .goal-token {gap:3px;min-width:0}
  .tasskalas-playfield .goal-token>.toy-sprite {width:clamp(22px,6vw,31px);height:auto;flex:none}
  .tasskalas-playfield .goal-token b {font-size:17px}
  .tasskalas-playfield .goal-token small {font-size:9px;overflow-wrap:anywhere}
  .tasskalas-playfield .goal-token i {width:15px;height:15px;margin-left:0}
  .tasskalas-playfield .goal-token i svg {width:12px;height:12px}
  .tasskalas-left {flex-direction:row}
  .tasskalas-story,.tasskalas-family {width:min(100%,132px);max-width:132px}
}
.reduce-motion .tasskalas-figure i::after {transition:none}
@media(prefers-reduced-motion:reduce){.tasskalas-figure i::after{transition:none}}

@media(min-width:731px) {
  .tasskalas-figure[data-cast]::before {
    content:'';
    position:absolute;
    z-index:-1;
    inset:7% 7% 3%;
    border-radius:46% 46% 20% 20% / 39% 39% 14% 14%;
    border:1px solid #ffe9baae;
    background:linear-gradient(158deg,#bf6b8d72,#e79ab200 43%,#ffe3b78c);
    box-shadow:0 3px 0 #9d4c6b5c,inset 0 0 0 3px #f4aaca90,inset 0 0 0 4px #ffe3ba5e;
  }
  .tasskalas-figure[data-cast]::after {
    content:'';
    position:absolute;
    z-index:-1;
    inset:11% 11% 8%;
    border-radius:45% 45% 17% 17% / 36% 36% 11% 11%;
    border:1px solid #fff5d9;
    background:linear-gradient(180deg,#ffd8eb00 31%,#ffd4ad8c 100%);
    box-shadow:0 0 11px #ffa4d4;
    opacity:0;
    transition:opacity 240ms ease-out;
  }
  .tasskalas-figure[data-reaction=joy]::after {opacity:.44}
  .tasskalas-figure:is([data-reaction=surprise],[data-reaction=victory])::after {opacity:1}
}
.reduce-motion .tasskalas-figure::after {transition:none}
@media(prefers-reduced-motion:reduce){.tasskalas-figure::after{transition:none}}
