/* The Entenrennen's ducks, lanes and banner (kind "race"), shared by the overlay and the control
   page. Each duck's body takes its colour from `color`; its number is the bib, so colour-blind
   viewers tell the ducks apart too. The variables fall back to the overlay's CI colours. */
.race { margin-top: 8px; }

.race__icon { width: 60px; height: 48px; overflow: visible; filter: drop-shadow(2px 3px 0 rgba(46, 49, 146, 0.6)); }
.duck__body { fill: currentColor; stroke: rgba(30, 26, 46, 0.45); stroke-width: 1.5; }
.duck__wing { fill: rgba(30, 26, 46, 0.16); }
.duck__beak { fill: #ff7a1a; }
.duck__eye { fill: #1e1a2e; }
.race__bib {
  position: absolute;
  top: 16px;
  left: 50%;
  translate: -62% 0;
  min-width: 28px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 18px;
  font-weight: 900;
  text-align: center;
  color: var(--indigo, #2e3192);
  background: var(--white, #ffffff);
  box-shadow: 1px 2px 0 var(--indigo, #2e3192);
}

.race__field { list-style: none; margin: 0; padding: 0; display: flex; gap: 12px; }
.race__duck {
  flex: 1 1 0;
  min-width: 0;
  display: grid;
  grid-template-columns: auto auto;
  grid-template-areas: "mark tips" "name name";
  justify-content: center;
  justify-items: center;
  align-items: center;
  column-gap: 8px;
}
.race__mark { position: relative; grid-area: mark; display: block; }
.race__name { grid-area: name; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; font-weight: 800; color: #f4dcff; }
.race__tips { grid-area: tips; font-size: 26px; font-weight: 900; font-variant-numeric: tabular-nums; color: var(--pink, #ff8be8); }
.race__ticker, .race__melli { margin: 6px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 19px; font-weight: 700; color: #f4dcff; }
.race__melli { color: #ffd36b; }

.race__lanes { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.race__lane { display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 10px; }
.race__laneNo { text-align: right; font-size: 22px; font-weight: 900; color: var(--pink, #ff8be8); }
.race__water {
  position: relative;
  height: 54px;
  border-radius: 14px;
  border-right: 6px dashed rgba(255, 255, 255, 0.9);
  background: repeating-linear-gradient(100deg, rgba(255, 255, 255, 0.1) 0 18px, transparent 18px 44px), linear-gradient(180deg, rgba(106, 212, 255, 0.45), rgba(46, 49, 146, 0.5));
  background-size: 88px 100%, 100% 100%;
  animation: waves 2.4s linear infinite;
}
.race__swimmer {
  position: absolute;
  top: 1px;
  left: calc(var(--progress, 0) * (100% - 66px));
  width: 66px;
  height: 52px;
  animation: bob 900ms ease-in-out infinite;
}
.race__swimmer .race__icon { width: 66px; height: 52px; }
.race__swimmer .race__bib { top: 16px; font-size: 16px; }

.race__winner { display: flex; align-items: center; gap: 18px; animation: race-pop 520ms cubic-bezier(0.2, 1.3, 0.4, 1) both; }
.race__icon--big { width: 124px; height: 100px; }
.race__winnerText { margin: 0; font-size: 50px; line-height: 1.1; font-weight: 900; text-shadow: 3px 4px 0 var(--indigo, #2e3192); }
.race__podium { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 26px; }
.race__place { display: flex; align-items: center; gap: 8px; font-size: 24px; font-weight: 800; }
.race__placeNo { color: var(--pink, #ff8be8); }
.race__icon--small { width: 44px; height: 36px; }
.race__lucky, .race__footnote { margin: 8px 0 0; overflow-wrap: anywhere; font-size: 22px; font-weight: 700; color: #f4dcff; }

@keyframes bob { 50% { translate: 0 -3px; rotate: -3deg; } }
@keyframes waves { to { background-position: 88px 0, 0 0; } }

@media (prefers-reduced-motion: reduce) {
  .race__swimmer, .race__water, .race__winner { animation: none; }
}

@keyframes race-pop {
  from { opacity: 0; translate: 0 20px; scale: 0.94; }
  to { opacity: 1; translate: 0 0; scale: 1; }
}
