.race-podium {
  position: relative;
  isolation: isolate;
  overflow: visible;
  margin: 4px auto 34px;
  --race-gold: #ecc66d;
}
.race-podium[hidden], .race-podium [hidden] { display: none !important; }
.race-stage {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: clamp(14px, 2.4vw, 28px);
  width: min(1000px, 100%);
  margin: 0 auto;
  padding: 18px 12px 30px;
}
.race-stage::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0 -2% 2%;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 65%, #dfb45818, transparent 55%), radial-gradient(ellipse at 14% 66%, #9bb9d60c, transparent 32%);
}
.race-stage::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -2%;
  bottom: 7px;
  left: -2%;
  height: 42px;
  background: radial-gradient(ellipse, #b68c3b22, transparent 70%);
  pointer-events: none;
}
.race-contender { position: relative; isolation: isolate; min-width: 0; overflow: visible; --race-accent: #bccbdd; --race-banner-light: #969ba9; --race-banner-dark: #414553; --race-agent-height: clamp(220px, 27vw, 280px); --race-phase: -1.7s; --race-duration: 7s; --race-pointer-x: 0px; --race-pointer-y: 0px; --race-pointer-r: 0deg; }
.race-place-1 { z-index: 2; --race-accent: #ecc66d; --race-banner-light: #bb9a4e; --race-banner-dark: #6b572d; --race-agent-height: clamp(280px, 33vw, 340px); --race-phase: -.4s; --race-duration: 6s; }
.race-place-3 { --race-accent: #d5a079; --race-banner-light: #ae7b5e; --race-banner-dark: #5c3f34; --race-phase: -3.3s; --race-duration: 7.5s; }
.race-agent { position: relative; height: var(--race-agent-height); overflow: hidden; pointer-events: none; }
.race-agent-halo { position: absolute; inset: 0 19% -18px; border-radius: 9px 12px 0 0; clip-path: polygon(0 0, 100% 9%, 100% 100%, 0 93%); background: linear-gradient(145deg, var(--race-banner-light), var(--race-banner-dark)); }
.race-agent-halo::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 10px; background: #ffffff24; }
.race-place-watermark { position: absolute; z-index: 1; top: 8px; left: calc(19% + 12px); display: grid; align-content: center; justify-items: center; width: 42px; height: 61px; background: #0003; color: #fff7e1; }
.race-place-watermark b { font: 900 23px/1.05 'Barlow Condensed', sans-serif; }
.race-place-watermark small { margin-top: 4px; font: 800 7px/1.2 'DM Mono', monospace; letter-spacing: .02em; }
/* The card covers the original bust's lower edge throughout idle and pointer motion. */
.race-agent-parallax { position: absolute; z-index: 2; inset: auto 12px -28px; height: calc(100% - 16px); transform: translate3d(var(--race-pointer-x), var(--race-pointer-y), 0) rotate(var(--race-pointer-r)); transition: transform .38s cubic-bezier(.2,.7,.2,1); }
.race-place-1 .race-agent-parallax { right: -18px; left: -18px; }
.race-agent-image { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 8px 12px #0007); transform-origin: 50% 95%; animation: race-agent-idle var(--race-duration) ease-in-out var(--race-phase) infinite; animation-play-state: paused; }
.race-crown { position: absolute; z-index: 1; top: 40px; right: calc(19% + 10px); width: 30px; height: 24px; transform: rotate(-23deg); filter: drop-shadow(0 4px 9px #b7843455); animation: race-crown-idle 7s ease-in-out infinite; animation-play-state: paused; }
.race-crown svg { display: block; width: 100%; height: 100%; }
.race-player-panel { position: relative; z-index: 3; padding: 0 22px; border: 1px solid color-mix(in srgb, var(--race-accent) 35%, #191d24); border-radius: 12px; background: linear-gradient(140deg, #252731, #14171d 68%); box-shadow: 0 16px 34px #0004; }
.race-place-1 .race-player-panel { background: linear-gradient(140deg, #302b20, #191b1e 70%); border-color: #b68c3b; box-shadow: 0 18px 40px #0006, 0 0 36px #d7a4480b; }
.race-place-3 .race-player-panel { background: linear-gradient(140deg, #2b2424, #18171b 70%); }
.race-placement { position: absolute; top: 35px; right: 10px; left: 10px; color: var(--race-accent); font: 700 8px/1.5 'DM Mono', monospace; letter-spacing: .1em; text-align: center; text-transform: uppercase; }
.race-placement svg { display: none; }
.race-identity { display: grid; justify-items: center; min-width: 0; }
.race-podium .race-avatar { position: relative; width: 56px; height: 56px; min-width: 56px; margin: -29px 0 27px; overflow: hidden; border: 2px solid var(--race-accent); border-radius: 50%; color: var(--race-accent); background: #12161c; box-shadow: 0 0 0 5px #191c20, 0 4px 15px #0004; font: 800 23px/1 'Barlow Condensed', sans-serif; }
.race-avatar > .race-team-photo { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; padding: 6px; object-fit: contain; background: #12161c; border-radius: inherit; }
.race-avatar.has-steam-avatar > .race-team-photo { opacity: 0; }
.race-podium .race-identity h3 { width: 100%; margin: 0; color: #f4f2ec; font: 800 clamp(23px, 2.5vw, 29px)/1.15 'Barlow Condensed', sans-serif; text-align: center; text-transform: uppercase; overflow-wrap: anywhere; }
.race-player-team { display: block; margin-top: 7px; color: #8c939e; font: 500 8px/1.5 'DM Mono', monospace; letter-spacing: .12em; text-transform: uppercase; text-align: center; overflow-wrap: anywhere; }
.race-player-stats { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-width: 0; margin-top: 16px; padding-top: 14px; border-top: 1px solid #ffffff10; }
.race-xp { min-width: 0; }
.race-xp > small { color: #9197a0; font: 500 8px/1.5 'DM Mono', monospace; letter-spacing: .1em; }
.race-xp > strong { display: block; margin-top: 3px; color: var(--race-accent); font: 800 clamp(29px, 3.3vw, 39px)/1.1 'Barlow Condensed', sans-serif; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.race-podium .race-level { position: relative; display: grid; place-items: center; width: 43px; height: 43px; flex: 0 0 43px; border-radius: 50%; }
.race-podium .race-level > b { font-size: 18px; }
.race-level-copy { display: flex; justify-content: space-between; gap: 5px; margin-top: 10px; color: #a0a4ab; font: 500 8px/1.5 'DM Mono', monospace; }
.race-level-copy > span:first-child { color: var(--race-accent); }
.race-progress { height: 3px; margin-top: 7px; overflow: hidden; border-radius: 8px; background: #ffffff0b; }
.race-progress > span { display: block; height: 100%; background: var(--race-accent); }
.race-player-status { margin: 16px -22px 0; padding: 10px 8px; border-top: 1px solid #ffffff0b; border-radius: 0 0 12px 12px; background: #0002; color: #9198a2; font: 600 8px/1.5 'DM Mono', monospace; text-align: center; letter-spacing: .04em; text-transform: uppercase; }
.race-place-1 .race-player-status { color: #e2c685; }
.race-sparks { position: absolute; z-index: 1; inset: 0; }
.race-sparks i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: var(--race-accent); opacity: 0; animation: race-ember 6s ease-in-out infinite; animation-play-state: paused; }
.race-sparks i:nth-child(1) { left: 18%; top: 65%; animation-delay: -2s; }
.race-sparks i:nth-child(2) { left: 79%; top: 39%; animation-delay: -4.5s; }
.race-sparks i:nth-child(3) { left: 89%; top: 80%; animation-delay: -.5s; }
.race-motion-controls { display: flex; justify-content: center; min-height: 28px; margin: 0 12px; }
.race-motion-toggle { display: inline-flex; align-items: center; gap: 7px; padding: 6px 3px; border: 0; background: transparent; color: #9096a1; font-size: 10px; cursor: pointer; scroll-margin-block: 120px 180px; }
.race-motion-toggle:hover { color: #e8c779; }
.race-motion-toggle:focus-visible { outline: 2px solid #e8c779; outline-offset: 4px; }
.race-motion-toggle:disabled { cursor: default; opacity: .7; }
.race-motion-dot { width: 5px; height: 5px; border-radius: 50%; background: #d3b26c; }
.race-podium.is-user-paused .race-motion-dot { background: #777f8b; }
.race-podium.is-animating .race-agent-image, .race-podium.is-animating .race-crown, .race-podium.is-animating .race-sparks i { animation-play-state: running; }
.race-podium.is-animating .race-agent-image { will-change: transform; }
.race-contender.is-vacant .race-agent-image { opacity: .22; filter: grayscale(1); animation: none; }
.race-contender.is-vacant .race-sparks, .race-contender.is-vacant .race-crown { display: none; }
.race-contender.is-vacant .race-player-panel { border-color: #353a4355; }
.race-contender.is-vacant .race-xp > strong { color: #747c89; }
.race-podium--compact .race-contender { --race-agent-height: clamp(200px, 24vw, 250px); }
.race-podium--compact .race-place-1 { --race-agent-height: clamp(260px, 30vw, 310px); }
@keyframes race-agent-idle { 0%,100% { transform: translate3d(0,0,0) rotate(-.35deg); } 50% { transform: translate3d(0,-6px,0) rotate(.4deg) scale(1.015); } }
@keyframes race-crown-idle { 0%,100% { transform: translateY(0) rotate(-23deg); } 50% { transform: translateY(-4px) rotate(-19deg); } }
@keyframes race-ember { 0%,100% { opacity: 0; transform: translate3d(0,12px,0); } 40% { opacity: .55; } 80% { opacity: 0; transform: translate3d(3px,-55px,0); } }
@media (max-width: 760px) {
  .race-stage { gap: 12px; padding-inline: 2px; }
  .race-player-panel { padding-inline: 14px; }
  .race-player-status { margin-inline: -14px; }
  .race-placement { font-size: 8px; }
  .race-podium .race-identity h3 { font-size: 23px; }
  .race-player-stats { margin-top: 16px; }
  .race-podium .race-level { width: 34px; height: 34px; flex-basis: 34px; }
  .race-podium .race-level > b { font-size: 14px; }
  .race-level-copy { font-size: 7px; }
}
@media (max-width: 580px) {
  .race-stage { grid-template-columns: minmax(0, 1fr); max-width: 360px; gap: 26px; padding: 8px 12px 27px; }
  .race-place-1 { order: -1; }
  .race-contender, .race-podium--compact .race-contender { --race-agent-height: 220px; }
  .race-place-1, .race-podium--compact .race-place-1 { --race-agent-height: 280px; }
  .race-player-panel { padding-inline: 24px; }
  .race-player-status { margin-inline: -24px; }
  .race-podium .race-identity h3 { font-size: 29px; }
  .race-xp > strong { font-size: 40px; }
  .race-podium .race-level { width: 44px; height: 44px; flex-basis: 44px; }
  .race-podium .race-level > b { font-size: 18px; }
  .race-level-copy { font-size: 9px; }
  .race-motion-controls { justify-content: center; }
  .race-sparks { display: none; }
  .race-crown { width: 30px; }
  .race-stage::after { inset-inline: 4%; }
}
@media (prefers-reduced-motion: reduce) {
  .race-podium:not(.is-motion-opt-in) .race-agent-image, .race-podium:not(.is-motion-opt-in) .race-crown, .race-podium:not(.is-motion-opt-in) .race-sparks i { animation: none !important; }
  .race-podium:not(.is-motion-opt-in) .race-agent-parallax { transform: none !important; transition: none !important; }
  .race-podium.is-motion-opt-in .race-agent-image { animation-duration: var(--race-duration) !important; }
  .race-podium.is-motion-opt-in .race-crown { animation-duration: 7s !important; }
  .race-podium.is-motion-opt-in .race-sparks i { animation-duration: 6s !important; }
  .race-podium.is-motion-opt-in .race-agent-parallax { transition-duration: .38s !important; }
}
