.shark-pond {
  margin: 8px 0 12px;
  overflow: hidden;
  border: 2px solid #aacfd2;
  border-radius: 14px;
  background: #edfaff;
  color: #153f52;
}
.pond-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2px 12px;
  padding: 5px 10px;
  font-size: .85rem;
}
.pond-scene {
  position: relative;
  isolation: isolate;
  height: 110px;
  overflow: hidden;
  background: linear-gradient(#b9edff, #e2f8ff);
}
.pond-water {
  position: absolute;
  inset: 55px 0 0;
  border-top: 3px solid #e0fcff;
  background: repeating-linear-gradient(0deg, #43b5da 0 8px, #70d2e7 8px 11px);
}
.pond-shark {
  position: absolute;
  top: 17px;
  left: 73%;
  width: 32px;
  height: 13px;
  border-radius: 65% 55% 65% 45%;
  background: radial-gradient(circle at 7px 5px, #182f4e 0 1px, transparent 2px),
    linear-gradient(#577999 60%, #dcf5ff 60%);
  animation: pond-swim 1.6s ease-in-out infinite alternate;
}
.pond-shark::before, .pond-shark::after {
  content: "";
  position: absolute;
  background: #577999;
}
.pond-shark::before {
  width: 13px;
  height: 12px;
  left: 11px;
  bottom: 10px;
  clip-path: polygon(0 100%, 73% 0, 100% 100%);
}
.pond-shark::after {
  width: 11px;
  height: 14px;
  right: -8px;
  top: -3px;
  clip-path: polygon(0 62%, 100% 0, 72% 59%, 100% 100%);
}
.pond-shark + .pond-shark {
  left: auto;
  right: 13px;
  top: 33px;
  scale: .8;
  animation-direction: alternate-reverse;
}
.pond-dock {
  position: absolute;
  left: 0;
  top: 50px;
  width: 60%;
  height: 14px;
  display: flex;
  gap: 2px;
}
.pond-board {
  flex: 1;
  border-radius: 2px;
  border-bottom: 4px solid #845134;
  background: repeating-linear-gradient(100deg, #d7975e 0 8px, #c48551 9px 10px);
  transition: transform .48s ease-in, opacity .48s ease-in;
}
.pond-board[data-broken] {
  transform: translateY(43px) rotate(22deg);
  opacity: 0;
}
.pond-board:nth-child(even)[data-broken] {
  transform: translateY(43px) rotate(-22deg);
}
.pond-board:last-child[data-broken] { transition-delay: .48s; }
.pond-player {
  position: absolute;
  left: var(--spot, 9%);
  top: 7px;
  width: 28px;
  height: 44px;
  translate: -50% 0;
  transition: left .3s ease-out;
}
.pond-figure { position: absolute; inset: 0; }
.pond-head {
  position: absolute;
  top: 0;
  left: 7px;
  width: 16px;
  height: 17px;
  border-radius: 46% 48% 47% 45%;
  background:
    radial-gradient(ellipse at 12px 8px, #393035 0 1px, transparent 1.3px),
    linear-gradient(155deg, #523329 0 34%, #f5bd83 37% 73%, #de925e 100%);
  box-shadow: -1px 1px #ad664e;
}
.pond-shirt {
  position: absolute;
  top: 16px;
  left: 7px;
  width: 15px;
  height: 17px;
  border-radius: 5px 5px 3px 3px;
  background: linear-gradient(110deg, #ff8367, #cf4439);
}
.pond-arm {
  position: absolute;
  top: 17px;
  left: 4px;
  width: 6px;
  height: 17px;
  border-radius: 5px;
  transform-origin: 50% 2px;
  background: linear-gradient(#e75e48 0 33%, #f6bd86 34% 74%, #e6a06e 100%);
  transform: rotate(13deg);
}
.pond-arm + .pond-arm {
  left: 19px;
  transform: rotate(-15deg);
}
.pond-player i {
  position: absolute;
  left: 8px;
  bottom: 0;
  width: 6px;
  height: 14px;
  background: linear-gradient(#345b86 0 73%, #253449 74%);
  border-radius: 2px 2px 3px 3px;
  transform-origin: top;
}
.pond-player i + i { left: 16px; }
.pond-wake {
  position: absolute;
  top: 28px;
  left: -10px;
  width: 43px;
  height: 11px;
  border-radius: 50%;
  border-top: 3px solid #e6fbff;
  box-shadow: 0 -3px #74d5e8;
  opacity: 0;
}
.pond-scene[data-step="1"] { --spot: 21%; }
.pond-scene[data-step="2"] { --spot: 33%; }
.pond-scene[data-step="3"] { --spot: 45%; }
.pond-scene[data-step="4"] { --spot: 57%; }
.pond-scene[data-step="5"] .pond-player {
  left: 93%;
  top: 29px;
  animation: pond-fall-and-swim 3.6s linear both;
}
.pond-scene[data-step="5"] .pond-figure {
  clip-path: inset(-30px -24px 16px);
  animation: pond-submerge 3.6s step-end both;
}
.pond-scene[data-step="5"] .pond-arm {
  animation: pond-stroke 3.6s ease-in-out both;
}
.pond-scene[data-step="5"] .pond-arm + .pond-arm {
  animation-name: pond-stroke-other;
}
.pond-scene[data-step="5"] .pond-wake {
  opacity: 1;
  animation: pond-wake 3.6s step-end both;
}
.pond-scene[data-step="5"] .pond-shark {
  left: 83%;
  right: auto;
  translate: -50% 0;
  transform: scaleX(-1);
  animation: pond-chase 2.55s .95s ease-in-out both;
}
.pond-scene[data-step="5"] .pond-shark + .pond-shark {
  left: 75%;
  animation-duration: 2.7s;
}
.pond-result:not([hidden]) {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 10px;
}
.pond-result strong {
  color: #9c2733;
  font-size: 1.3rem;
}
.pond-result button { min-height: 40px; }
@keyframes pond-fall-and-swim {
  0% { left: 57%; top: 7px; transform: none; }
  7% { left: 59%; top: 5px; }
  14% { left: 61%; top: 7px; transform: none; }
  21% { left: 64%; top: 19px; transform: rotate(19deg); }
  27% { left: 68%; top: 29px; transform: none; }
  38% { left: 73%; top: 28px; }
  48% { left: 78%; top: 29px; transform: none; }
  61% { left: 83%; top: 7px; transform: rotate(10deg); }
  66% { left: 85%; top: 6px; transform: rotate(15deg); }
  78% { left: 88%; top: 29px; transform: none; }
  90% { left: 91%; top: 28px; }
  100% { left: 93%; top: 29px; }
}
@keyframes pond-submerge {
  0%, 52% { clip-path: none; }
  27%, 78%, 100% { clip-path: inset(-30px -24px 16px); }
}
@keyframes pond-wake {
  0%, 52% { opacity: 0; }
  27%, 78%, 100% { opacity: 1; }
}
@keyframes pond-stroke {
  0%, 14% { transform: rotate(13deg); }
  23%, 34%, 52%, 66%, 86%, 100% { transform: rotate(142deg); }
  27%, 43%, 78%, 94% { transform: rotate(38deg); }
}
@keyframes pond-stroke-other {
  0%, 14% { transform: rotate(-15deg); }
  23%, 34%, 52%, 66%, 86%, 100% { transform: rotate(-38deg); }
  27%, 43%, 78%, 94% { transform: rotate(-142deg); }
}
@keyframes pond-chase {
  from { left: 60%; }
}
.pond-splash {
  position: absolute;
  top: 43px;
  left: 68%;
  translate: -50% 0;
  font-size: 28px;
  opacity: 0;
}
.pond-scene[data-step="5"] .pond-splash {
  animation: pond-splash .55s .92s ease-out both;
}
.pond-landing { left: 88%; }
.pond-scene[data-step="5"] .pond-landing { animation-delay: 2.78s; }
@keyframes pond-swim { to { translate: -22px -3px; } }
@keyframes pond-splash {
  0% { opacity: 0; transform: translateY(12px) scale(.55); }
  45% { opacity: 1; transform: scale(1.2); }
  100% { opacity: 0; transform: translateY(-10px); }
}
@media (prefers-reduced-motion: reduce) {
  .pond-player, .pond-board[data-broken] { transition: none; }
  .pond-shark,
  .pond-scene[data-step="5"] .pond-player,
  .pond-scene[data-step="5"] .pond-figure,
  .pond-scene[data-step="5"] .pond-arm,
  .pond-scene[data-step="5"] .pond-wake,
  .pond-scene[data-step="5"] .pond-shark,
  .pond-scene[data-step="5"] .pond-splash { animation: none; }
  .pond-scene[data-step="5"] .pond-splash { opacity: 1; }
}


.pond-figure::after {
  content: "";
  position: absolute;
  width: 32px;
  height: 51px;
  bottom: 0;
  left: 50%;
  translate: -50% 0;
  background: url('art/pond-person-0.webp') center bottom / contain no-repeat;
  z-index: 1;
}
.pond-figure > * { visibility: hidden; }
.pond-scene[data-step="5"] .pond-figure::after {
  background-image: url('art/pond-person-1.webp');
  animation: pond-rendered-strokes 3.6s step-end both;
}
@keyframes pond-rendered-strokes {
  0% { background-image: url('art/pond-person-0.webp'); }
  16%, 37%, 66%, 90% { background-image: url('art/pond-person-1.webp'); }
  25%, 47%, 76% { background-image: url('art/pond-person-2.webp'); }
  31%, 55%, 83%, 100% { background-image: url('art/pond-person-3.webp'); }
}
.pond-water {
  background:
    repeating-linear-gradient(174deg, transparent 0 9px, #b9f5ff45 10px 11px, transparent 13px 22px),
    linear-gradient(#62c7d9, #1a688e 61%, #164e77);
}
@media (prefers-reduced-motion: reduce) {
  .pond-scene[data-step="5"] .pond-figure::after { animation: none; }
}
