/* 每日散步 v41：寶箱固定在右下方樓梯最末端的空位，隊伍走前景道路。 */
.walk-hero.is-expedition .walk-stage > .walk-chest{
  z-index:7!important;
  right:2%!important;
  bottom:23%!important;
  width:clamp(102px,12vw,156px)!important;
  transform:scale(.48)!important;
  transform-origin:center bottom!important;
  filter:drop-shadow(0 10px 8px rgba(43,51,54,.3));
}

.walk-hero.is-expedition.is-chest-found .walk-stage > .walk-chest,
.walk-hero.is-expedition.is-opening .walk-stage > .walk-chest{transform:scale(1)!important}

.walk-hero.is-expedition .walk-stage > .walk-reward-pop{
  z-index:9!important;
  right:2%!important;
  bottom:52%!important;
  min-width:164px!important;
  max-width:205px!important;
}

.walk-hero.is-expedition .walk-stage > .walk-bag-target{
  position:absolute;
  z-index:8!important;
  right:13%!important;
  bottom:8%!important;
  width:clamp(58px,7.4vw,92px)!important;
  opacity:0;
  transform:none!important;
  transition:opacity .22s ease;
  pointer-events:none;
}

.walk-bag-visual{position:relative;width:100%;aspect-ratio:1 / 1;transform:none;transform-origin:center bottom;filter:drop-shadow(0 7px 6px rgba(32,58,100,.26))}
.walk-bag-target img{display:block!important;position:absolute;inset:0;width:100%!important;height:100%!important;object-fit:contain}
.walk-bag-target .walk-bag-closed{display:block!important;position:absolute!important;inset:0!important}
.walk-bag-target .walk-bag-open{display:block!important;position:absolute!important;inset:0!important;opacity:0;transform:scaleY(.74);transform-origin:center bottom;transition:opacity .18s ease,transform .34s cubic-bezier(.22,.9,.36,1);animation:none!important}
.walk-hero.is-bag-arriving .walk-bag-target{opacity:1!important;transform:none!important;animation:none!important}
.walk-hero.is-bag-arriving .walk-bag-visual{transform:none!important;animation:none!important}
.walk-hero.is-bag-open .walk-stage .walk-bag-target .walk-bag-closed{display:block!important;opacity:0;transform:none;transition:opacity .15s ease}
.walk-hero.is-bag-open .walk-stage .walk-bag-target .walk-bag-open{display:block!important;opacity:1;transform:scaleY(1);animation:none!important}
.walk-hero.is-bag-open .walk-bag-visual{filter:drop-shadow(0 0 12px rgba(255,220,83,.94)) drop-shadow(0 7px 6px rgba(32,58,100,.26))}
.walk-hero.is-bag-parked .walk-bag-target{opacity:1!important;transform:none!important;animation:none!important}
.walk-hero.is-bag-parked .walk-bag-visual{transform:none!important;animation:none!important;filter:drop-shadow(0 7px 6px rgba(32,58,100,.26))}
.walk-hero.is-bag-parked .walk-bag-target .walk-bag-closed{opacity:1!important;transform:none!important}
.walk-hero.is-bag-parked .walk-bag-target .walk-bag-open{opacity:0!important;transform:scaleY(.74)!important}

.walk-reward-pop .walk-reward-item{
  display:grid;
  place-items:center;
  transform-origin:center;
  will-change:transform,opacity;
  animation:reward-out-of-chest .7s cubic-bezier(.18,1.2,.35,1) both;
}

.walk-hero.is-reward-flying .walk-reward-pop b,
.walk-hero.is-reward-flying .walk-reward-pop small{
  opacity:0;
  transform:translateY(4px);
  transition:opacity .2s ease,transform .2s ease;
}

.walk-hero.is-reward-flying .walk-reward-pop .walk-reward-item{animation:reward-to-backpack .82s cubic-bezier(.2,.82,.22,1) both}
.walk-hero.is-reward-flying .walk-bag-visual{animation:none!important;transform:none!important;filter:drop-shadow(0 0 12px rgba(255,218,81,.9)) drop-shadow(0 7px 6px rgba(32,58,100,.26))}
.walk-hero.is-reward-stowed .walk-reward-pop{opacity:0!important;transition:opacity .15s ease}

@keyframes reward-to-backpack{
  0%{opacity:1;transform:translate(0,0) rotate(0) scale(1)}
  36%{opacity:1;transform:translate(var(--reward-fly-x-mid),var(--reward-fly-y-mid)) rotate(11deg) scale(.92)}
  72%{opacity:1;transform:translate(var(--reward-fly-x),var(--reward-fly-y)) rotate(-8deg) scale(.38)}
  100%{opacity:0;transform:translate(var(--reward-fly-x),var(--reward-fly-y)) rotate(0) scale(.12)}
}

@keyframes reward-out-of-chest{
  0%{opacity:0;transform:translateY(62px) scale(.26) rotate(-12deg)}
  62%{opacity:1;transform:translateY(-10px) scale(1.1) rotate(4deg)}
  100%{opacity:1;transform:translateY(0) scale(1) rotate(0)}
}

@keyframes backpack-catch{
  0%{transform:translateY(0) scale(1);filter:brightness(1)}
  52%{transform:translateY(0) scale(1.14) rotate(-3deg);filter:brightness(1.18) drop-shadow(0 0 10px rgba(255,218,81,.9))}
  100%{transform:translateY(0) scale(1);filter:brightness(1)}
}

@keyframes backpack-appear{0%{transform:translateY(18px) scale(.76)}100%{transform:translateY(0) scale(1)}}

/* 寶箱在右下方樓梯最末端的空位，隊伍在前景道路停下。 */
@keyframes expedition-march{0%{transform:translateX(-18%)}100%{transform:translateX(0)}}

@media(max-width:760px){
  .walk-hero.is-expedition .walk-stage > .walk-chest{right:2%!important;bottom:23%!important;width:clamp(72px,21vw,104px)!important}
  .walk-hero.is-expedition .walk-stage > .walk-reward-pop{right:0!important;bottom:52%!important;min-width:100px!important;max-width:124px!important}
  .walk-hero.is-expedition .walk-stage > .walk-bag-target{right:14%!important;bottom:7%!important;width:clamp(45px,13vw,63px)!important}
}
