/* Camel: a desert camel race at dusk. Racing dromedaries in numbered woven saddle cloths run a sand track marked
   with pennant flags towards a finishing post; heat shimmers over the track; brass bells are the prizes and a
   saddlebag stuffed with gold is the pot. Palette from the desert: warm dune sand, indigo night sky, madder-red
   cloth for every button, saffron thread, turquoise beads. */
@font-face { font-family: 'Rakkas'; src: url(/fonts/rakkas.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Alexandria'; src: url(/fonts/alexandria.woff2) format('woff2'); font-weight: 300 900; font-display: swap; }
@font-face { font-family: 'Fira Code'; src: url(/fonts/firacode.woff2) format('woff2'); font-weight: 400 600; font-display: swap; }

:root {
  --wall: #f3d9a6;         /* dune sand in late light */
  --wall-2: #e6c084;
  --cream: #fdf4e3;
  --paper: #f9ead0;
  --ink: #1b1938;          /* indigo ink */
  --ink-2: #45405f;
  --ink-3: #6e6883;
  --red: #b5273c;          /* madder saddle cloth: primary buttons */
  --red-dk: #8e1d30;
  --bulb: #f2a51f;         /* saffron thread */
  --amber: #f2a51f;
  --cobalt: #2d4fb0;
  --night: #24225e;        /* indigo night sky: header, frames */
  --night-2: #1a1847;
  --teal: #1d8f8a;         /* turquoise bead */
  --turf: #ebc488;         /* the sand track */
  --turf-2: #e4b979;
  --plank: #8a5a34;
  --plank-dk: #5e3a1e;
  --tin: #e3d3b8;
  --up: #1f7a4a;
  --down: #b5273c;
  --edge: 2.5px solid var(--ink);
  --shadow: 4px 4px 0 var(--ink);
  --display: 'Rakkas', 'Georgia', serif;
  --text: 'Alexandria', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Fira Code', ui-monospace, 'SF Mono', Menlo, monospace;
}

body { background: var(--wall) linear-gradient(180deg, #f9e8c8 0, var(--wall) 620px) no-repeat; font-weight: 400; }
h1, h2, h3 { font-weight: 400; letter-spacing: 0; line-height: 1.04; }
h1 { font-size: clamp(44px, 6vw, 82px); }
h2 { font-size: clamp(30px, 3.4vw, 44px); }
.lede { font-weight: 400; }
.btn { font-weight: 700; border-radius: 6px; }
.btn:hover { background: #c4334a; }
.btn-cream:hover { background: #fffaf0; }
.hero h1 { color: var(--ink); }
.hero h1 .h1b { color: var(--red); text-shadow: none; }

/* header: the night sky over the desert, a crescent moon, dunes along its lower edge */
.top { background: var(--night) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='70'%3E%3Cpath d='M88 8 a20 20 0 1 0 18 30 a16 16 0 1 1 -18 -30 Z' fill='%23f6d27a'/%3E%3Cg fill='%23fdf4e3'%3E%3Ccircle cx='22' cy='24' r='1.6'/%3E%3Ccircle cx='132' cy='14' r='1.3'/%3E%3Ccircle cx='48' cy='52' r='1.1'/%3E%3C/g%3E%3C/svg%3E") no-repeat calc(50% + 120px) 8px / 150px 70px; border-bottom: 0; }
.top-in { padding-bottom: 26px; }
.brand-horse { width: 78px; height: 58px; filter: drop-shadow(2px 2px 0 var(--night-2)); }
.brand-word { font: 400 44px/1 var(--display); color: var(--cream); text-shadow: 3px 3px 0 var(--ink); letter-spacing: .01em; }
.nav a { color: var(--cream); font-weight: 600; }
.nav a:hover { border-color: rgba(253, 244, 227, .35); }
.nav a[aria-current='page'] { background: var(--cream); color: var(--ink); border-radius: 6px; }
.nav-mobile a { font-weight: 600; border-radius: 6px; }
.top .btn { background: var(--bulb); color: var(--ink); }
.top .btn:hover { background: #f6b53e; }
.bulbs { bottom: -2px; height: 30px; z-index: 1; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='640' height='30'%3E%3Cpath d='M0 22 C70 6 140 4 210 16 C260 24 300 12 360 8 C430 4 500 14 560 20 C600 24 620 22 640 22 V30 H0 Z' fill='%23d9b273'/%3E%3Cpath d='M0 26 C60 18 120 14 190 22 C250 28 320 18 390 16 C460 14 540 22 640 26 V30 H0 Z' fill='%23f9e8c8'/%3E%3C/svg%3E") 0 100% / 640px 30px repeat-x; }

/* the race: a sand track in an indigo frame, prizes on a woven kilim */
.booth { background: var(--night); border-radius: 14px; padding: 12px; box-shadow: 6px 6px 0 var(--ink); }
.booth-sign { border-radius: 8px 8px 4px 4px; }
.booth-sign .t-name, .booth-sign .clock { font-size: 25px; }
.booth-sign .t-meta { font-weight: 600; }
.booth-sign .clock small { font-weight: 600; }
.shelf { padding-top: 14px; }
.shelf::after { height: 18px; left: 0; right: 0; border-radius: 3px;
  background:
    linear-gradient(135deg, transparent 0 33%, var(--bulb) 33% 50%, transparent 50% 83%, var(--bulb) 83%) 0 5px / 12px 8px repeat-x,
    linear-gradient(180deg, var(--red) 0 5px, var(--red-dk) 5px 13px, var(--red) 13px); }
.prize svg { width: clamp(52px, 6.2vw, 72px); height: clamp(52px, 6.2vw, 72px); }
.prize b { top: calc(clamp(52px, 6.2vw, 72px) * .5); translate: 0 -50%; font-size: clamp(12px, 1.3vw, 16px); }
.prize span { margin-top: 2px; border-radius: 4px; font-weight: 700; }
.pot svg { width: clamp(70px, 8.4vw, 98px); height: clamp(82px, 9.8vw, 114px); }
.pot .pot-sum { top: 58%; border-radius: 4px; font-size: clamp(13px, 1.4vw, 17px); }
.pot .pot-label { font-weight: 700; }

.track { --lane-h: 74px; margin-top: 16px; border-radius: 6px; background: var(--turf); }
/* every lane is packed sand with a row of small pennant flags along its edge */
.lane { border-bottom: 2px dashed rgba(94, 58, 30, .35);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='170' height='24'%3E%3Cpath d='M12 4 V23' stroke='%235e3a1e' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M13 4 L28 8.5 L13 13 Z' fill='%23b5273c' stroke='%231b1938' stroke-width='1.4' stroke-linejoin='round'/%3E%3Cpath d='M70 18 C80 15 92 15 102 18 M118 12 C126 10 136 10 144 12' stroke='%23c99a5c' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") left 54px bottom 0 / 170px 24px repeat-x; }
.lane:nth-child(even) { background: var(--turf-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='170' height='24'%3E%3Cpath d='M12 4 V23' stroke='%235e3a1e' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M13 4 L28 8.5 L13 13 Z' fill='%23f2a51f' stroke='%231b1938' stroke-width='1.4' stroke-linejoin='round'/%3E%3Cpath d='M70 18 C80 15 92 15 102 18 M118 12 C126 10 136 10 144 12' stroke='%23c3925a' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") left 140px bottom 0 / 170px 24px repeat-x; }
.lane::after { display: none; }
.lane-no { width: 34px; background: var(--red); color: var(--cream); font: 400 20px/1 var(--display); }
.lane:nth-child(3n+2) .lane-no { background: var(--night); }
.lane:nth-child(3n) .lane-no { background: var(--teal); }
.lane-empty { color: var(--ink); text-shadow: none; font-weight: 700; }
.lane-empty > span:not(.lane-no) { position: relative; z-index: 3; padding: 0 30px 0 44px; text-align: center; line-height: 1.2; }
/* heat shimmer: faint bands drifting up over the sand */
.track::before { content: ''; position: absolute; left: 0; right: 0; top: -40px; bottom: -40px; z-index: 2; pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(255, 248, 230, 0) 0 16px, rgba(255, 248, 230, .16) 20px, rgba(255, 248, 230, 0) 24px 40px);
  animation: shimmer 7s linear infinite; }
@keyframes shimmer { to { transform: translateY(-40px); } }
/* finish: the finishing post, indigo and cream with a saffron pennant */
.finish { width: 20px; border-left: var(--edge);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='44'%3E%3Crect width='20' height='22' fill='%2324225e'/%3E%3Crect y='22' width='20' height='22' fill='%23fdf4e3'/%3E%3C/svg%3E") 0 0 / 20px 44px repeat-y; }
.zero { border-left: 3px dashed rgba(36, 34, 94, .55); }
.zero span { font: 600 11px/1 var(--mono); color: var(--night); }

.runner.camel { --hw: calc((var(--lane-h, 64px) - 6px) * 1.333); top: 0; bottom: 4px; }
.runner.camel .horse { animation: stride 1.5s ease-in-out infinite alternate; transform-origin: 50% 90%; }
.lane:nth-child(2n) .runner.camel .horse { animation-delay: -.6s; }
.lane:nth-child(3n) .runner.camel .horse { animation-delay: -1.1s; }
@keyframes stride {
  from { transform: translateY(0) rotate(-1.2deg); }
  to { transform: translateY(-2px) rotate(1.4deg); }
}
@media (prefers-reduced-motion: reduce) { .runner.camel .horse, .track::before { animation: none; } }
/* the rod becomes a puff of dust behind the hind feet */
.runner.camel .rod { left: -8%; width: 34%; height: 10px; bottom: 0; border: 0; border-radius: 50%; background: radial-gradient(closest-side, rgba(253, 240, 214, .85), rgba(253, 240, 214, 0)); }
.runner.camel .disc { left: 42.6%; top: 28.4%; width: 16.6%; background: var(--cream); }
.tag { border-radius: 5px; font-weight: 700; }
.tag em { font-weight: 600; }
.runner.me .tag { background: var(--bulb); }
.runner.p1 .tag { background: #ffd9a0; }

.step h3 { font-size: 24px; }
.step h3::before { color: var(--red); }
.step p { font-weight: 400; }
.ticket-head h3 { font-size: 28px; }
.ticket-head .fee-in { font-size: 22px; }
.ticket dt { font-weight: 600; }
.ticket dd { font-weight: 700; }
.ticket.sprint { --tk: var(--red); }
.ticket.heat { --tk: var(--teal); }
.ticket.classic { --tk: var(--night); }
.ticket.dash { --tk: var(--bulb); }
.panel { border-radius: 10px; }

.dlg { border-radius: 12px; }
.dlg-head { background: var(--night); }
.dlg-head h2 { color: var(--cream); font-size: 28px; }
.seg button { border-radius: 6px; }
.seg button[aria-pressed='true'] { background: var(--night); box-shadow: 3px 3px 0 var(--bulb); }
.test-note { background: #f6e3bd; border-color: var(--wall-2); }
.launch { background: var(--night-2); }
.launch a { color: var(--bulb); }
.foot { border-top: 0; background: var(--night); color: #cfcbe6; position: relative; }
.foot::before { content: ''; position: absolute; left: 0; right: 0; top: -8px; height: 8px;
  background: linear-gradient(135deg, var(--red) 25%, transparent 25%) -4px 0 / 16px 8px, linear-gradient(225deg, var(--red) 25%, transparent 25%) -4px 0 / 16px 8px, var(--bulb); }
.toast { box-shadow: 4px 4px 0 var(--bulb); }
.count .big, .potline b { font-size: 38px; }
.mine-row .k, .count .sub, .lt-head .lt-meta { font-weight: 600; }

@media (max-width: 1020px) {
  .top { background-position: calc(100% - 150px) 6px; }
}
@media (max-width: 640px) {
  .top { background-image: none; }
  .track { --lane-h: 54px; }
  .lane { background-size: 128px 18px; background-position: left 30px bottom 0; }
  .lane:nth-child(even) { background-position: left 90px bottom 0; background-size: 128px 18px; }
  .brand-horse { width: 58px; height: 43px; }
  .brand-word { font-size: 34px; }
  .lane-no { width: 24px; font-size: 15px; }
  .finish { width: 12px; background-size: 12px 28px; }
  .count .big { font-size: 30px; }
}
