/* Ducks: a painted stream in a duck pond. Rubber ducks float down water lanes; floats rope the lanes; the pot is a
   tin bucket on a wooden jetty. Palette from the pond: pale pool aqua, deep teal water, duck yellow, beak orange. */
@font-face { font-family: 'Chango'; src: url(/fonts/chango.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Readex Pro'; src: url(/fonts/readex.woff2) format('woff2'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'Roboto Mono'; src: url(/fonts/robotomono.woff2) format('woff2'); font-weight: 400 700; font-display: swap; }

:root {
  --wall: #d8efed;
  --wall-2: #b9e0dc;
  --cream: #fffbea;
  --paper: #fff4cf;
  --ink: #0f2e3a;
  --ink-2: #2f5360;
  --ink-3: #5a7781;
  --red: #ff7a1a;          /* beak orange: primary buttons */
  --red-dk: #d85f08;
  --bulb: #ffd23c;         /* duck yellow */
  --amber: #ffd23c;
  --cobalt: #1f6fb8;
  --teal: #12708a;
  --turf: #3aa3d6;         /* water lanes */
  --turf-2: #3196cc;
  --plank: #c08a52;
  --plank-dk: #8d5d31;
  --tin: #b9c6cc;
  --up: #13804a;
  --down: #d43d51;
  --display: 'Chango', 'Arial Rounded MT Bold', system-ui, sans-serif;
  --text: 'Readex Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Roboto Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

body { background: var(--wall) linear-gradient(180deg, #e6f7f5 0, var(--wall) 520px) no-repeat; font-weight: 400; }
h1, h2, h3 { letter-spacing: -.01em; line-height: 1.06; }
h1 { font-size: clamp(40px, 5.6vw, 76px); }
h2 { font-size: clamp(28px, 3.2vw, 40px); }
.btn { font-weight: 700; border-radius: 999px; }
.btn-small { border-radius: 999px; }
.hero h1 .h1b { color: var(--red); text-shadow: 3px 3px 0 var(--ink); }
.hero h1 { color: var(--ink); }

/* header: deep pond water with a scalloped wave edge instead of bulbs */
.top { background: var(--teal); border-bottom: 0; }
.top-in { padding-bottom: 18px; }
.brand-horse { width: 72px; height: 54px; filter: drop-shadow(2px 3px 0 var(--ink)); }
.brand-word { font: 400 40px/1 var(--display); color: var(--bulb); text-shadow: 3px 3px 0 var(--ink); letter-spacing: 0; }
.nav a { color: var(--cream); font-weight: 600; }
.nav a[aria-current='page'] { background: var(--bulb); color: var(--ink); }
.nav-mobile a { font-weight: 600; }
.nav-mobile a[aria-current='page'] { background: var(--bulb); }
.top .btn { background: var(--bulb); color: var(--ink); }
.top .btn:hover { background: #ffe06e; }
.bulbs { bottom: -1px; height: 14px; background: radial-gradient(circle at 50% 100%, #e6f7f5 0 9px, transparent 9.5px) 0 0 / 26px 14px repeat-x; }

/* the race: a stream in a teal frame, a wooden jetty for prizes */
.booth { background: var(--teal); border-radius: 22px; padding: 12px; box-shadow: 6px 6px 0 var(--ink); }
.booth-sign { border-radius: 14px; }
.booth-sign .t-name, .booth-sign .clock { font-size: 22px; }
.shelf { padding-top: 16px; }
.shelf::after {
  height: 18px; border-radius: 4px; left: 0; right: 0;
  background: repeating-linear-gradient(90deg, var(--plank) 0 46px, var(--plank-dk) 46px 49px);
}
.shelf::before { content: ''; position: absolute; left: 10%; right: 10%; bottom: -16px; height: 16px;
  background: linear-gradient(90deg, var(--plank-dk) 0 14px, transparent 14px) 0 0 / 25% 100% repeat-x; z-index: 0; }
.prize svg { width: clamp(52px, 6.4vw, 72px); height: clamp(52px, 6.4vw, 72px); }
.prize b { top: 0; height: clamp(52px, 6.4vw, 72px); display: grid; place-items: center; translate: none; font-size: clamp(10px, 1.1vw, 13px); }
.prize span { margin-top: 4px; border-radius: 999px; padding: 4px 8px; }
.pot svg { width: clamp(70px, 8.6vw, 100px); height: clamp(82px, 10vw, 116px); }
.pot .pot-sum { top: 52%; border-radius: 999px; font-size: clamp(12px, 1.3vw, 15px); }
.pot .pot-label { text-shadow: 1px 1px 0 var(--ink); }

.track { --lane-h: 72px; margin-top: 20px; border-radius: 12px; background-color: var(--turf);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='28'%3E%3Cpath d='M0 20 q15 -8 30 0 t30 0 t30 0 t30 0' fill='none' stroke='%23ffffff' stroke-opacity='.28' stroke-width='2.5'/%3E%3C/svg%3E");
  background-size: 120px 28px; }
.lane { border-bottom: 0; }
.lane:nth-child(even) { background: rgba(15, 46, 58, .07); }
/* float rope between lanes */
.lane::after { left: 34px; right: 14px; bottom: -3px; height: 6px; border-radius: 3px; z-index: 1;
  background: repeating-linear-gradient(90deg, #fffbea 0 12px, #d43d51 12px 24px); box-shadow: 0 1px 0 rgba(15, 46, 58, .35); }
.lane:last-child::after { display: none; }
.lane-no { width: 34px; background: var(--bulb); font: 400 16px/1 var(--display); }
.lane-empty { color: var(--cream); }
/* finish: a pole of red and white buoys */
.finish { width: 16px; border-left: var(--edge); background: repeating-linear-gradient(180deg, #d43d51 0 16px, #fffbea 16px 32px); }
.zero { border-left: 3px dotted rgba(255, 251, 234, .85); }
.zero span { font-family: var(--mono); font-weight: 700; }

.runner.duck { --hw: calc((var(--lane-h, 64px) - 8px) * 1.333); top: 0; bottom: 6px; }
.runner.duck .horse { animation: bob 2.6s ease-in-out infinite; transform-origin: 50% 85%; }
.lane:nth-child(2n) .runner.duck .horse { animation-delay: -.9s; }
.lane:nth-child(3n) .runner.duck .horse { animation-delay: -1.7s; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(2px) rotate(2deg); } }
@media (prefers-reduced-motion: reduce) { .runner.duck .horse { animation: none; } }
/* the rod becomes a ripple under the duck */
.runner.duck .rod { left: 10%; width: 78%; height: 7px; bottom: 1px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .45); }
.runner.duck .disc { left: 30%; top: 54%; width: 18%; background: var(--cream); }
.tag { border-radius: 10px; font-weight: 700; }
.runner.me .tag { background: var(--bulb); }
.runner.p1 .tag { background: #ffe1c7; }

.step h3 { font-size: 20px; }
.ticket-head h3 { font-size: 24px; }
.ticket-head .fee-in { font-size: 19px; }
.ticket.heat { --tk: var(--cobalt); }
.ticket.classic { --tk: var(--turf); }
.ticket.dash { --tk: var(--bulb); }
.ticket { border-radius: 14px; }

.dlg-head { background: var(--teal); }
.dlg-head h2 { color: var(--bulb); font-size: 26px; }
.seg button b { font-size: 17px; }
.foot { border-top: 6px solid var(--teal); color: #c8dde2; }
.toast { box-shadow: 4px 4px 0 var(--red); }
.count .big, .potline b { font-size: 34px; }

@media (max-width: 640px) {
  .track { --lane-h: 50px; }
  .brand-horse { width: 54px; height: 40px; }
  .brand-word { font-size: 30px; }
  .lane-no { width: 24px; font-size: 13px; }
  .lane::after { left: 24px; }
  .finish { width: 12px; background-size: auto; }
  .count .big { font-size: 28px; }
}
