/* Шагайн морь уралдуулах: the track, the two horses and the turn button. Everything else reuses style.css. */
.hr-track {
  padding: 10px 30px 8px 28px; margin-bottom: 14px; border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(#2b2417, #1c1711 70%); overflow: hidden;
}
.hr-lanes { position: relative; }
.hr-lane {
  --c: var(--ember);
  position: relative; height: 60px; border-bottom: 2px solid #4d3f2c;
  background: linear-gradient(to right, #4d3f2c 1px, transparent 1px) 0 100% / 10% 9px repeat-x;
}
.hr-lane.blue, .hr-line .blue, .hr-winner.blue { --c: #5d9fdc; }
.hr-lane b { position: absolute; top: 6px; left: -14px; font-size: .8rem; font-weight: 600; color: var(--c); white-space: nowrap; opacity: .75; transition: opacity .2s; }
.hr-lane.turn b { opacity: 1; }
.hr-lane.turn b::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--c); margin-right: 6px; vertical-align: 1px; }
.hr-horse {
  position: absolute; bottom: 1px; left: calc(var(--p, 0) * 10%); width: 44px; height: 31px; translate: -50% 0;
  color: var(--c); transition: left .7s var(--ease); filter: drop-shadow(0 3px 2px #0008);
}
.hr-horse svg { display: block; width: 100%; height: 100%; }
.hr-finish { position: absolute; top: 4px; bottom: 0; right: -3px; width: 6px; border-radius: 2px; background: repeating-linear-gradient(var(--bone) 0 6px, #14100d 6px 12px); }
.hr-nums { position: relative; height: 20px; margin-top: 3px; }
.hr-nums span { position: absolute; left: calc(var(--n) * 10%); translate: -50% 0; font-size: .7rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.hr-nums span:last-child { color: var(--gold); font-weight: 700; }

.hr-line { min-height: 3.2em; margin: 0 0 10px; font-family: var(--serif); font-style: italic; color: var(--bone); }
.hr-line b { font-style: normal; color: var(--c, var(--ember)); }
.hr-btn { transition: transform .15s var(--ease), background .3s, opacity .2s; }
.hr-btn[data-turn="1"] { background: #3f7fc0; box-shadow: 0 6px 20px #3f7fc044; }
.hr-winner { font-size: min(9.5vw, 3rem); /* twelve letters still fit on one line */ line-height: 1.1; color: var(--c, var(--ember)); margin: 6px 0 0; }
.hr-won { font-family: var(--serif); font-size: 1.5rem; color: var(--gold); margin: 0; }
.hr-throws { color: var(--muted); font-size: .9rem; }

/* A race opens with the track at the top of the screen; on a short phone the mat shrinks so the track, the bones and the button fit together. */
.hr-track { scroll-margin-top: 8px; }
@media (max-height: 700px) { #horserace .mat { height: 190px; } }
