/* Otter Flow — juice: otter loops from the feet (≤8%, never jelly), particle layer, PAR seal, small living loops.
   Less Motion (body.calm or .reduced) stops every loop and keeps the state. */
.modal.closing {
  pointer-events: none;
}
#fxLayer {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  overflow: hidden;
}
#fxLayer img {
  position: absolute;
  will-change: transform, opacity;
}

#otterShadow {
  position: fixed;
  z-index: 1;
  pointer-events: none;
  opacity: 0.55;
}
body[data-screen='game'] #otterShadow {
  z-index: 1;
}
.otter {
  will-change: transform;
}
.otter[data-pose='idle'] {
  animation: otterBreathe 3.2s ease-in-out infinite;
}
.otter[data-pose='think'] {
  animation: otterThink 2.4s ease-in-out infinite;
}
.otter[data-pose='hype'] {
  animation: otterHype 0.32s ease-in-out infinite alternate;
}
.otter[data-pose='cheer'] {
  animation: otterCheer 0.5s cubic-bezier(0.3, 0.7, 0.4, 1) infinite;
}
@keyframes otterBreathe {
  0%,
  100% {
    transform: scale(1, 1);
  }
  50% {
    transform: scale(1.012, 1.035);
  }
}
@keyframes otterThink {
  0%,
  100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(-1.4deg) scale(1.01, 1.02);
  }
}
@keyframes otterHype {
  from {
    transform: rotate(-1.2deg) scale(1.03);
  }
  to {
    transform: rotate(1.2deg) scale(1.03, 1.05);
  }
}
@keyframes otterCheer {
  0%,
  100% {
    transform: translateY(0) scale(1, 1);
  }
  30% {
    transform: translateY(0) scale(1.06, 0.95);
  }
  60% {
    transform: translateY(-5%) scale(0.97, 1.04);
  }
}

/* PAR! seal (Painted art) with live text on its blank centre */
.seal-badge {
  background: center / contain no-repeat url(../assets/img/seal.webp);
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 0.93;
  width: auto !important;
  transform: rotate(-8deg);
  z-index: 8;
}
.seal-badge > span {
  font-size: 1em;
  color: #fff;
  --o: 0.14em;
}

/* living loops */
#btnLoseRetry,
#btnPlay {
  animation: breathe 1.6s ease-in-out infinite;
}
#btnPlay {
  animation-duration: 2.4s;
}
@keyframes breathe {
  0%,
  100% {
    scale: 1;
  }
  50% {
    scale: 1.035;
  }
}
#pressureWrap.urgent {
  animation: urgent 0.5s ease-in-out infinite alternate;
}
@keyframes urgent {
  from {
    scale: 1 1;
  }
  to {
    scale: 1.04 1.25;
  }
}
.pressure > i {
  background:
    url(../assets/img/stream.webp) left center / auto 100% repeat-x,
    #2bd9d2;
  animation: streamRun 1.6s linear infinite;
}
@keyframes streamRun {
  to {
    background-position:
      200px center,
      0 0;
  }
}
.lv-node.current {
  animation: nodeFloat 2.2s ease-in-out infinite;
}
@keyframes nodeFloat {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -6%;
  }
}
#curLangName.pulse {
  animation: langPulse 0.6s ease-out;
}
@keyframes langPulse {
  0% {
    scale: 1;
    filter: drop-shadow(0 0 0 #ffd76a);
  }
  40% {
    scale: 1.08;
    filter: drop-shadow(0 0 6px #ffd76a);
  }
  100% {
    scale: 1;
  }
}

body.calm .otter,
body.reduced .otter,
body.calm #btnLoseRetry,
body.calm #btnPlay,
body.reduced #btnPlay,
body.calm #pressureWrap,
body.calm .lv-node,
body.calm .pressure > i,
body.reduced #btnLoseRetry,
body.reduced .lv-node {
  animation: none !important;
}

/* map: bubbles rising from the current node; world banner (straight ribbon + live text) */
.lv-node.current::after {
  content: '';
  position: absolute;
  left: 30%;
  top: -10%;
  width: 22%;
  aspect-ratio: 1;
  background: center / contain no-repeat url(../assets/img/bubble.webp);
  animation: bubbleUp 1.8s ease-in infinite;
  opacity: 0;
}
@keyframes bubbleUp {
  0% {
    opacity: 0;
    translate: 0 0;
    scale: 0.6;
  }
  30% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
    translate: 40% -160%;
    scale: 1.1;
  }
}
body.calm .lv-node.current::after {
  display: none;
}
.world-banner {
  position: absolute;
  left: 50%;
  top: 40%;
  transform: translate(-50%, -50%);
  width: min(86vw, 900px);
  aspect-ratio: 7.2;
  background: center / contain no-repeat url(../assets/img/ribbon-flat-gold.webp);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-bottom: 2%;
}
.world-banner b {
  font-size: min(5vw, 52px);
  line-height: 1;
}
.world-banner small {
  font-size: min(2.6vw, 26px);
  line-height: 1.2;
  color: #fff7d6;
}

/* living background: sprites on the background layer (same box as #bg) */
#scenery {
  position: fixed;
  pointer-events: none;
  overflow: hidden;
}
.sc {
  position: absolute;
  transform-origin: 50% 50%;
  will-change: transform, opacity;
}
.sc-halo {
  mix-blend-mode: screen;
  animation: flicker 2.6s ease-in-out infinite;
  transform: translateY(-50%);
}
@keyframes flicker {
  0%,
  100% {
    opacity: 0.55;
    scale: 1;
  }
  30% {
    opacity: 0.75;
    scale: 1.05;
  }
  55% {
    opacity: 0.5;
    scale: 0.97;
  }
  80% {
    opacity: 0.7;
    scale: 1.02;
  }
}
.sc-steam {
  opacity: 0;
  animation: steamRise 7.5s ease-in-out infinite;
  transform: translateY(-80%);
}
.sc-steam.sc-slow {
  animation-duration: 11s;
}
@keyframes steamRise {
  0% {
    opacity: 0;
    translate: 0 0;
    scale: 0.7;
  }
  25% {
    opacity: 0.35;
  }
  70% {
    opacity: 0.22;
  }
  100% {
    opacity: 0;
    translate: 6% -55%;
    scale: 1.25;
  }
}
.sc-mist {
  opacity: 0.35;
  animation: mistBreath 4s ease-in-out infinite;
  transform: translateY(-60%);
}
@keyframes mistBreath {
  0%,
  100% {
    opacity: 0.25;
    scale: 1;
  }
  50% {
    opacity: 0.45;
    scale: 1.12 1.05;
  }
}
.sc-ripple {
  opacity: 0;
  animation: ripple 3.4s ease-out infinite;
  transform: translateY(-50%);
}
@keyframes ripple {
  0% {
    opacity: 0;
    scale: 0.4;
  }
  20% {
    opacity: 0.5;
  }
  100% {
    opacity: 0;
    scale: 1.3;
  }
}
.sc-fly {
  mix-blend-mode: screen;
}
body.calm .sc,
body.reduced .sc {
  animation: none !important;
}
body.calm .sc-steam,
body.calm .sc-ripple,
body.reduced .sc-steam,
body.reduced .sc-ripple {
  opacity: 0.2;
}

/* card decor (panelDecor): behind the content (isolation + z-index -1), clipped to the card's inner face */
.modal .panel.a-card {
  isolation: isolate;
}
.p-fx {
  position: absolute;
  inset: calc(var(--b) * -10px);
  z-index: -1;
  overflow: hidden;
  border-radius: calc(var(--b) * 16px);
  pointer-events: none;
}
.p-sheen {
  position: absolute;
  top: -10%;
  bottom: -10%;
  left: 0;
  width: 45%;
  translate: 260% 0;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(190, 255, 250, 0) 20%,
    rgba(220, 255, 250, 0.16) 50%,
    transparent 80%
  );
}
.p-fx > b {
  position: absolute;
  bottom: -8%;
  width: calc(var(--b) * 9px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: calc(var(--b) * 1.5px) solid rgba(170, 250, 240, 0.32);
  background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, 0.4) 0 18%, transparent 24%);
  animation: pBubble 7s linear infinite;
  opacity: 0;
}
.p-fx > b:nth-child(2) {
  left: 12%;
  animation-delay: -1s;
}
.p-fx > b:nth-child(3) {
  left: 30%;
  width: calc(var(--b) * 6px);
  animation-duration: 9s;
  animation-delay: -4s;
}
.p-fx > b:nth-child(4) {
  left: 52%;
  width: calc(var(--b) * 11px);
  animation-duration: 8s;
  animation-delay: -2.5s;
}
.p-fx > b:nth-child(5) {
  left: 71%;
  width: calc(var(--b) * 7px);
  animation-duration: 10s;
  animation-delay: -6s;
}
.p-fx > b:nth-child(6) {
  left: 88%;
  animation-duration: 7.5s;
  animation-delay: -3.5s;
}
.p-fx > b:nth-child(7) {
  left: 42%;
  width: calc(var(--b) * 5px);
  animation-duration: 11s;
  animation-delay: -8s;
}
@keyframes pBubble {
  0% {
    translate: 0 0;
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  50% {
    translate: calc(var(--b) * 6px) -260%;
  }
  85% {
    opacity: 0.8;
  }
  100% {
    translate: calc(var(--b) * -4px) -1100%;
    opacity: 0;
  }
}
body.calm .p-fx > b,
body.reduced .p-fx > b {
  animation: none;
  display: none;
}
/* End of css/juice.css (complete file). */
