/*
 * Catrin & Abi® BSL Word Race v0.2.7
 * Race-specific visual layer. Loaded after Games Core so Word Race can now be
 * developed independently without changing Find the Pairs or Letter Match.
 */

/* CENTRE HURDLE CALIBRATION — preserve the verified centre anchor. */
.cag-shell .cag-race-stage .cag-race-lanes{
  position:absolute!important;
  inset:0!important;
  overflow:hidden!important;
  pointer-events:none!important;
  z-index:12!important;
}
.cag-shell .cag-race-stage .cag-race-hurdle.cag-centre-calibration{
  position:absolute!important;
  left:50%!important;
  width:min(42vw,520px)!important;
  height:300px!important;
  margin:0!important;
  padding:0!important;
  transform:translateX(-50%)!important;
  transform-origin:50% 100%!important;
  opacity:1!important;
  filter:none!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  pointer-events:none!important;
}
.cag-shell .cag-race-stage .cag-race-hurdle.cag-centre-calibration[data-row="0"]{
  pointer-events:auto!important;
}
.cag-shell .cag-race-stage .cag-centre-calibration .cag-hurdle-visual{
  position:absolute!important;
  left:50%!important;
  top:50%!important;
  width:100%!important;
  height:100%!important;
  margin:0!important;
  opacity:1!important;
  filter:none!important;
  animation:none!important;
  transform:translate(-50%,-50%) scale(var(--cag-perspective-scale,.02))!important;
  transform-origin:50% 88%!important;
  will-change:transform,top!important;
}
.cag-shell .cag-race-stage .cag-centre-calibration .cag-hurdle-asset{
  display:block!important;
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  object-position:50% 100%!important;
  opacity:1!important;
  filter:none!important;
}
.cag-shell .cag-race-stage .cag-centre-calibration .cag-hurdle-sign,
.cag-shell .cag-race-stage .cag-centre-calibration .cag-hurdle-label{display:none!important}

/* Distant rows must remain visible. Distance is communicated by scale only. */
.cag-shell .cag-race-stage .cag-hurdle-future,
.cag-shell .cag-race-stage .cag-hurdle-near,
.cag-shell .cag-race-stage .cag-hurdle-pass-behind,
.cag-shell .cag-race-stage .cag-hurdle-cleared{
  opacity:1!important;
  filter:none!important;
}

/* Coins/jewels remain fully opaque too; perspective comes from size and position. */
.cag-shell .cag-race-stage .cag-collectible,
.cag-shell .cag-race-stage .cag-collectible img{
  opacity:1!important;
}

/* Keep clouds high and large, while the sun stays fixed. */
.cag-shell .cag-race-stage .cag-cloud-image{
  width:clamp(230px,24vw,390px)!important;
  max-height:190px!important;
  opacity:1!important;
}
.cag-shell .cag-race-stage .cag-cloud-image.cloud-a{top:2%!important}
.cag-shell .cag-race-stage .cag-cloud-image.cloud-b{top:7%!important}
.cag-shell .cag-race-stage .cag-cloud-image.cloud-c{top:1%!important}

@media(max-width:760px){
  .cag-shell .cag-race-stage .cag-race-hurdle.cag-centre-calibration{width:58vw!important;height:235px!important}
  .cag-shell .cag-race-stage .cag-cloud-image{width:220px!important;max-height:120px!important}
}
@media(max-width:520px){
  .cag-shell .cag-race-stage .cag-race-hurdle.cag-centre-calibration{width:68vw!important;height:205px!important}
  .cag-shell .cag-race-stage .cag-cloud-image{width:180px!important;max-height:100px!important}
}


/* v0.2.1 runtime recovery + natural cloud motion. */
.cag-shell .cag-race-stage .cag-cloud-image{
  will-change:transform;
  transform-origin:center center!important;
}
.cag-shell .cag-race-stage .cag-cloud-image.cloud-a{left:-24%!important;animation:cag-race-cloud-a 32s linear infinite!important}
.cag-shell .cag-race-stage .cag-cloud-image.cloud-b{left:18%!important;animation:cag-race-cloud-b 43s linear infinite!important}
.cag-shell .cag-race-stage .cag-cloud-image.cloud-c{left:58%!important;animation:cag-race-cloud-c 37s linear infinite!important}
@keyframes cag-race-cloud-a{0%{transform:translate3d(0,0,0) scale(.88)}25%{transform:translate3d(34vw,5px,0) scale(.9)}50%{transform:translate3d(68vw,-3px,0) scale(.88)}75%{transform:translate3d(102vw,4px,0) scale(.9)}100%{transform:translate3d(136vw,0,0) scale(.88)}}
@keyframes cag-race-cloud-b{0%{transform:translate3d(0,0,0) scale(1.04)}25%{transform:translate3d(25vw,-4px,0) scale(1.02)}50%{transform:translate3d(50vw,3px,0) scale(1.04)}75%{transform:translate3d(75vw,-2px,0) scale(1.02)}100%{transform:translate3d(100vw,0,0) scale(1.04)}}
@keyframes cag-race-cloud-c{0%{transform:translate3d(0,0,0) scale(.94)}25%{transform:translate3d(24vw,4px,0) scale(.96)}50%{transform:translate3d(48vw,-4px,0) scale(.94)}75%{transform:translate3d(72vw,2px,0) scale(.96)}100%{transform:translate3d(96vw,0,0) scale(.94)}}
/* Keep calibration hurdles visibly above the photographic track and below Abi. */
.cag-shell .cag-race-stage .cag-race-lanes{z-index:18!important}
.cag-shell .cag-race-stage .cag-runner{z-index:30!important}


/* v0.2.2 depth + jump synchronisation calibration. */
.cag-shell .cag-race-stage .cag-race-hurdle.cag-centre-calibration{
  width:min(38vw,500px)!important;
  height:280px!important;
}
.cag-shell .cag-race-stage .cag-race-hurdle.cag-hurdle-pass-behind{
  pointer-events:none!important;
}
.cag-shell .cag-race-stage .cag-runner.sprite-jump{
  z-index:36!important;
}
@media(max-width:760px){
 .cag-shell .cag-race-stage .cag-race-hurdle.cag-centre-calibration{width:50vw!important;height:225px!important}
}
@media(max-width:520px){
 .cag-shell .cag-race-stage .cag-race-hurdle.cag-centre-calibration{width:58vw!important;height:195px!important}
}


/* v0.2.3 — modular CSS ordering + runner lane geometry calibration. */
/* The Word Race stylesheet is now explicitly loaded after cag-core-css. */
.cag-shell .cag-race-stage .cag-runner[data-lane="0"]{
  left:31%!important;
  transform:translateX(-50%)!important;
}
.cag-shell .cag-race-stage .cag-runner[data-lane="1"]{
  left:50%!important;
  transform:translateX(-50%)!important;
}
.cag-shell .cag-race-stage .cag-runner[data-lane="2"]{
  left:69%!important;
  transform:translateX(-50%)!important;
}
.cag-shell .cag-race-stage[data-camera-lane="0"] .cag-runner-shadow{left:31%!important}
.cag-shell .cag-race-stage[data-camera-lane="1"] .cag-runner-shadow{left:50%!important}
.cag-shell .cag-race-stage[data-camera-lane="2"] .cag-runner-shadow{left:69%!important}
/* Keep the calibrated centre hurdle larger as it approaches without changing its X anchor. */
.cag-shell .cag-race-stage .cag-race-hurdle.cag-centre-calibration{
  width:min(42vw,560px)!important;
  height:305px!important;
}
@media(max-width:760px){
 .cag-shell .cag-race-stage .cag-race-hurdle.cag-centre-calibration{width:54vw!important;height:240px!important}
}
@media(max-width:520px){
 .cag-shell .cag-race-stage .cag-race-hurdle.cag-centre-calibration{width:62vw!important;height:205px!important}
}


/* v0.2.4 horizon-to-camera hurdle calibration. */
.cag-shell .cag-race-stage .cag-race-hurdle.cag-centre-calibration{
  width:min(44vw,560px)!important;
  height:320px!important;
}
@media(max-width:760px){.cag-shell .cag-race-stage .cag-race-hurdle.cag-centre-calibration{width:60vw!important;height:250px!important}}
@media(max-width:520px){.cag-shell .cag-race-stage .cag-race-hurdle.cag-centre-calibration{width:70vw!important;height:215px!important}}


/* v0.2.6 — corrected ground-plane projection.
 * v0.2.5's final override was accidentally written with literal \n characters,
 * so the browser ignored it and retained the old 0.02 inner-sprite scale.
 * These are real CSS declarations and the hurdle's bottom edge is the ground contact. */
.cag-shell .cag-race-stage .cag-race-hurdle.cag-centre-calibration{
  height:auto!important;
  transform:translate(-50%,-100%)!important;
  transform-origin:50% 100%!important;
  overflow:visible!important;
  max-width:none!important;
  min-width:0!important;
}
.cag-shell .cag-race-stage .cag-centre-calibration .cag-hurdle-visual{
  position:relative!important;
  display:block!important;
  left:auto!important;
  top:auto!important;
  width:100%!important;
  height:auto!important;
  margin:0!important;
  transform:none!important;
  transform-origin:50% 100%!important;
}
.cag-shell .cag-race-stage .cag-centre-calibration .cag-hurdle-asset{
  display:block!important;
  width:100%!important;
  height:auto!important;
  max-width:none!important;
  object-fit:contain!important;
  object-position:50% 100%!important;
  opacity:1!important;
}
.cag-shell .cag-race-stage .cag-collectible{
  position:absolute!important;
  opacity:1!important;
  transform-origin:50% 50%!important;
}
.cag-shell .cag-race-stage .cag-collectible img{
  display:block!important;
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  opacity:1!important;
}


/* =========================================================
   v0.2.7 — TRACK-MATCHED HURDLE GROUND PLANE + FORWARD MOTION
   ========================================================= */

/* Both photographic track layers share the exact same crop. Their scale animation
   is anchored at the horizon so the barriers, lane lines and verge expand toward
   the camera without moving the vanishing point. */
.cag-shell .cag-race-stage .cag-photo-track{
  overflow:hidden!important;
}
.cag-shell .cag-race-stage .cag-track-image{
  transform-origin:50% 0%!important;
  will-change:transform,opacity!important;
}
.cag-shell .cag-race-stage.is-running .cag-track-image-a{
  animation:cag-race-forward-a 1.35s linear infinite!important;
}
.cag-shell .cag-race-stage.is-running .cag-track-image-b{
  animation:cag-race-forward-b 1.35s linear infinite!important;
}
.cag-shell .cag-race-stage.is-boosting .cag-track-image-a,
.cag-shell .cag-race-stage.is-boosting .cag-track-image-b{
  animation-duration:.72s!important;
}

/* Two overlapping zoom cycles hide the reset. This deliberately animates the
   barriers as well as the track markings because they are baked into one image. */
@keyframes cag-race-forward-a{
  0%   {transform:scale(1,1);opacity:1}
  62%  {opacity:1}
  100% {transform:scale(1.075,1.105);opacity:0}
}
@keyframes cag-race-forward-b{
  0%   {transform:scale(1.0375,1.0525);opacity:0}
  12%  {opacity:1}
  50%  {transform:scale(1.075,1.105);opacity:1}
  51%  {transform:scale(1,1);opacity:1}
  100% {transform:scale(1.0375,1.0525);opacity:1}
}

/* Make the ground-contact anchor explicit after every legacy Core rule. */
.cag-shell .cag-race-stage .cag-race-hurdle.cag-centre-calibration{
  transform:translate(-50%,-100%)!important;
  transform-origin:50% 100%!important;
  height:auto!important;
}
.cag-shell .cag-race-stage .cag-centre-calibration .cag-hurdle-visual,
.cag-shell .cag-race-stage .cag-centre-calibration .cag-hurdle-asset{
  transform:none!important;
  transform-origin:50% 100%!important;
  width:100%!important;
  height:auto!important;
  opacity:1!important;
}

/* Coins/jewels remain on the same projected ground plane and stay opaque. */
.cag-shell .cag-race-stage .cag-collectible,
.cag-shell .cag-race-stage .cag-collectible img{
  opacity:1!important;
}

/* Reduced-motion users keep a static photographic track. */
@media(prefers-reduced-motion:reduce){
  .cag-shell .cag-race-stage.is-running .cag-track-image-a,
  .cag-shell .cag-race-stage.is-running .cag-track-image-b{
    animation:none!important;
  }
  .cag-shell .cag-race-stage .cag-track-image-b{display:none!important}
}


/* =========================================================
   v0.2.8 — SEPARATE TRACK + INDEPENDENT BARRIER MOTION
   ========================================================= */

/* The new track is a single fixed perspective image. */
.cag-shell .cag-race-stage .cag-track-image-static{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  object-fit:fill!important;
  transform:none!important;
  opacity:1!important;
  animation:none!important;
  z-index:1!important;
}

/* Old v0.2.7 track zoom layers are no longer part of the markup. */
.cag-shell .cag-race-stage .cag-track-image-a,
.cag-shell .cag-race-stage .cag-track-image-b{
  animation:none!important;
  display:none!important;
}

/* Each barrier asset has the same 1535×1024 canvas as the supplied track.
   Keeping it full-frame preserves the artist-created vanishing point exactly. */
.cag-shell .cag-race-stage .cag-barrier-motion{
  position:absolute!important;
  inset:0!important;
  overflow:hidden!important;
  pointer-events:none!important;
  z-index:3!important;
}
.cag-shell .cag-race-stage .cag-barrier-image{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  object-fit:fill!important;
  opacity:0!important;
  will-change:transform,opacity!important;
}

/* LEFT barrier scales away from its own vanishing point at x≈48%, y≈29%. */
.cag-shell .cag-race-stage .cag-barrier-motion-left .cag-barrier-image{
  transform-origin:48% 29.3%!important;
}
/* RIGHT barrier has a mirrored vanishing point at x≈52.7%, y≈29%. */
.cag-shell .cag-race-stage .cag-barrier-motion-right .cag-barrier-image{
  transform-origin:52.7% 29.3%!important;
}

/* Repeating cross-faded perspective passes.
   The barrier posts grow outwards/downwards, which makes them look as if they
   are travelling past Abi while the track/horizon themselves stay fixed. */
.cag-shell .cag-race-stage.is-running .cag-barrier-image.barrier-cycle-a{
  animation:cag-barrier-forward-a 1.05s linear infinite!important;
}
.cag-shell .cag-race-stage.is-running .cag-barrier-image.barrier-cycle-b{
  animation:cag-barrier-forward-b 1.05s linear infinite!important;
}
.cag-shell .cag-race-stage.is-boosting .cag-barrier-image.barrier-cycle-a,
.cag-shell .cag-race-stage.is-boosting .cag-barrier-image.barrier-cycle-b{
  animation-duration:.62s!important;
}
@keyframes cag-barrier-forward-a{
  0%   {transform:scale(1);opacity:1}
  58%  {opacity:1}
  100% {transform:scale(1.115);opacity:0}
}
@keyframes cag-barrier-forward-b{
  0%   {transform:scale(1.055);opacity:0}
  18%  {opacity:1}
  50%  {transform:scale(1.115);opacity:1}
  51%  {transform:scale(1);opacity:1}
  100% {transform:scale(1.055);opacity:1}
}

/* Keep game objects above the separate environment layers. */
.cag-shell .cag-race-stage .cag-race-lanes,
.cag-shell .cag-race-stage .cag-reward-lanes{z-index:18!important}
.cag-shell .cag-race-stage .cag-runner{z-index:30!important}

/* The hurdle's feet remain its projection anchor. */
.cag-shell .cag-race-stage .cag-race-hurdle.cag-centre-calibration{
  transform:translate(-50%,-100%)!important;
  transform-origin:50% 100%!important;
}

/* Respect reduced-motion preferences. */
@media(prefers-reduced-motion:reduce){
  .cag-shell .cag-race-stage .cag-barrier-image{
    animation:none!important;
  }
  .cag-shell .cag-race-stage .cag-barrier-image.barrier-cycle-a{
    opacity:1!important;
    transform:none!important;
  }
  .cag-shell .cag-race-stage .cag-barrier-image.barrier-cycle-b{
    display:none!important;
  }
}


/* =========================================================
   v0.2.9 — REAL STAGE HORIZON + STRONGER FORWARD MOTION
   ========================================================= */

/* The sky must sit behind the ENTIRE scene. Core previously ended it at 48%,
   exposing the stage background as a cyan strip before the track became opaque. */
.cag-shell .cag-race-stage .cag-race-sky{
  inset:0!important;
  height:100%!important;
  bottom:0!important;
  background:transparent!important;
  overflow:hidden!important;
}
.cag-shell .cag-race-stage .cag-sky-texture{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  object-position:50% 50%!important;
}

/* Remove any inherited road/background colour beneath the transparent part
   of the new track so the full-height sky remains visible to the true horizon. */
.cag-shell .cag-race-stage .cag-race-road.cag-photo-track{
  background:transparent!important;
}

/* Much stronger barrier flow. The transform origin remains locked to each
   artwork's vanishing point, but the posts now grow enough to visibly sweep
   toward the camera before the duplicate layer cross-fades in. */
.cag-shell .cag-race-stage.is-running .cag-barrier-image.barrier-cycle-a,
.cag-shell .cag-race-stage.is-running .cag-barrier-image.barrier-cycle-b{
  animation-duration:.78s!important;
  animation-timing-function:linear!important;
}
.cag-shell .cag-race-stage.is-boosting .cag-barrier-image.barrier-cycle-a,
.cag-shell .cag-race-stage.is-boosting .cag-barrier-image.barrier-cycle-b{
  animation-duration:.46s!important;
}

@keyframes cag-barrier-forward-a{
  0%   {transform:scale(1) translateY(0);opacity:1}
  62%  {opacity:1}
  100% {transform:scale(1.34) translateY(2.8%);opacity:0}
}
@keyframes cag-barrier-forward-b{
  0%   {transform:scale(1.16) translateY(1.2%);opacity:0}
  16%  {opacity:1}
  49%  {transform:scale(1.34) translateY(2.8%);opacity:1}
  50%  {transform:scale(1) translateY(0);opacity:1}
  100% {transform:scale(1.16) translateY(1.2%);opacity:1}
}

/* Keep the barrier canvases aligned to the exact same track container geometry. */
.cag-shell .cag-race-stage .cag-barrier-motion{
  inset:0!important;
}

/* Make distant hurdle artwork fully visible but genuinely tiny only at the
   horizon; near hurdles remain opaque and anchored by their feet. */
.cag-shell .cag-race-stage .cag-race-hurdle,
.cag-shell .cag-race-stage .cag-hurdle-asset{
  opacity:1!important;
}

/* Collectibles use the JS ground plane; prevent legacy Core transforms from
   pulling them away from their projected lane coordinates. */
.cag-shell .cag-race-stage .cag-collectible{
  margin:0!important;
  opacity:1!important;
}


/* =========================================================
   v0.3.0 — HURDLE-ONLY CALIBRATION BUILD
   ========================================================= */

/* Strip all reward/barrier systems from view until hurdle geometry is approved. */
.cag-shell .cag-race-stage .cag-barrier-motion,
.cag-shell .cag-race-stage .cag-collectible,
.cag-shell .cag-race-stage .cag-reward-lanes,
.cag-shell .cag-race-stage .cag-reward-hud{
  display:none!important;
}

/* Critical centre lock: Core camera/lane rules must not translate the hurdle layer. */
.cag-shell .cag-race-stage .cag-race-lanes{
  position:absolute!important;
  inset:0!important;
  left:0!important;
  right:0!important;
  width:100%!important;
  transform:none!important;
  translate:none!important;
  margin:0!important;
  padding:0!important;
}

/* Every hurdle row uses the same absolute centre anchor. */
.cag-shell .cag-race-stage .cag-race-hurdle.cag-centre-calibration{
  left:50%!important;
  right:auto!important;
  margin-left:0!important;
  transform:translate(-50%,-100%)!important;
  transform-origin:50% 100%!important;
}

/* Lock Abi and her shadow to the same centre coordinate for visual calibration. */
.cag-shell .cag-race-stage .cag-runner,
.cag-shell .cag-race-stage .cag-runner.lane-left,
.cag-shell .cag-race-stage .cag-runner.lane-centre,
.cag-shell .cag-race-stage .cag-runner.lane-right{
  left:50%!important;
}
.cag-shell .cag-race-stage .cag-runner-shadow{
  left:50%!important;
}

/* Disable visible side-lane feedback during calibration. */
.cag-shell .cag-race-controls [data-move="-1"],
.cag-shell .cag-race-controls [data-move="1"]{
  opacity:.45!important;
}


/* =========================================================
   v0.3.1 — SINGLE COORDINATE SYSTEM CALIBRATION
   ========================================================= */

/* The supplied track already contains transparent sky above y=300.
   It must fill the complete stage; any Core top-offset would double-apply
   the horizon and make hurdles appear in the air. */
.cag-shell .cag-race-stage .cag-race-road.cag-photo-track{
  position:absolute!important;
  inset:0!important;
  top:0!important;
  right:0!important;
  bottom:0!important;
  left:0!important;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  transform:none!important;
  perspective:none!important;
  background:transparent!important;
  overflow:hidden!important;
}
.cag-shell .cag-race-stage .cag-track-image-static{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  object-fit:fill!important;
  object-position:50% 50%!important;
  transform:none!important;
  opacity:1!important;
}

/* Hide legacy decorative geometry that was built for the previous baked track.
   This leaves one authoritative perspective image and one hurdle layer. */
.cag-shell .cag-race-stage .cag-road-stripes,
.cag-shell .cag-race-stage .cag-track-shadow,
.cag-shell .cag-race-stage .cag-track-stitch,
.cag-shell .cag-race-stage .cag-trackside,
.cag-shell .cag-race-stage .cag-spectator-strip{
  display:none!important;
}

/* The hurdle layer and runner share the exact full-stage coordinate box. */
.cag-shell .cag-race-stage .cag-race-lanes{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  transform:none!important;
  overflow:visible!important;
}

/* Centre hurdle: the CSS anchor is the centre of the stage, and the bottom
   centre of the actual PNG is the ground contact point. */
.cag-shell .cag-race-stage .cag-race-hurdle.cag-centre-calibration{
  position:absolute!important;
  left:50%!important;
  right:auto!important;
  bottom:auto!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  transform:translate(-50%,-100%)!important;
  transform-origin:50% 100%!important;
  overflow:visible!important;
  background:transparent!important;
}
.cag-shell .cag-race-stage .cag-centre-calibration .cag-hurdle-visual{
  position:relative!important;
  display:block!important;
  width:100%!important;
  height:auto!important;
  left:0!important;
  top:0!important;
  margin:0!important;
  padding:0!important;
  transform:none!important;
}
.cag-shell .cag-race-stage .cag-centre-calibration .cag-hurdle-asset{
  position:relative!important;
  display:block!important;
  width:100%!important;
  height:auto!important;
  margin:0!important;
  padding:0!important;
  transform:none!important;
  object-fit:contain!important;
  object-position:50% 100%!important;
}

/* For calibration the lead hurdle is deliberately drawn just above Abi so the
   complete bar is visible and its centre can be judged. After clearance the
   existing pass-behind class drops it behind Abi. */
.cag-shell .cag-race-stage .cag-race-hurdle[data-row="0"]:not(.cag-hurdle-pass-behind){
  z-index:34!important;
}
.cag-shell .cag-race-stage .cag-runner{
  z-index:30!important;
}

/* Nothing except the centre hurdle participates in this calibration. */
.cag-shell .cag-race-stage .cag-collectible,
.cag-shell .cag-race-stage .cag-reward-lanes,
.cag-shell .cag-race-stage .cag-reward-hud,
.cag-shell .cag-race-stage .cag-barrier-motion{
  display:none!important;
}


/* =========================================================
   v0.3.2 — JS PIXEL-RECT HURDLE CALIBRATION
   ========================================================= */

/* JS now owns the hurdle rectangle completely. Remove all transforms from every
   historic hurdle rule so CSS cannot shift the calculated pixel geometry. */
.cag-shell .cag-race-stage .cag-race-hurdle.cag-centre-calibration{
  transform:none!important;
  translate:none!important;
  transform-origin:0 0!important;
  box-sizing:border-box!important;
  overflow:visible!important;
}
.cag-shell .cag-race-stage .cag-centre-calibration .cag-hurdle-visual{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  margin:0!important;
  padding:0!important;
  transform:none!important;
  translate:none!important;
}
.cag-shell .cag-race-stage .cag-centre-calibration .cag-hurdle-asset{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  margin:0!important;
  padding:0!important;
  transform:none!important;
  translate:none!important;
  object-fit:fill!important;
  opacity:1!important;
}

/* One authoritative centre line for this calibration. */
.cag-shell .cag-race-stage .cag-runner{
  left:50%!important;
  transform:translateX(-50%)!important;
}


/* =========================================================
   v0.3.3 — PHYSICAL JUMP + DISTANT GROUND CONTACT
   ========================================================= */

/* JS owns the jump transform frame-by-frame. This explicit rule prevents older
   Core sprite rules from substituting a static jump pose. */
.cag-shell .cag-race-stage .cag-runner.sprite-jump,
.cag-shell .cag-race-stage .cag-runner.sprite-landing{
  will-change:transform!important;
  transition:none!important;
}

/* Once the leap reaches its apex the hurdle genuinely travels behind Abi. */
.cag-shell .cag-race-stage .cag-race-hurdle.cag-hurdle-pass-behind{
  z-index:17!important;
}


/* =========================================================
   v0.3.4 — CONTINUOUS WORLD MOTION
   ========================================================= */

/* Distant rows now move continuously via JS world-distance projection.
   Keep every row fully opaque; size and spacing alone communicate depth. */
.cag-shell .cag-race-stage .cag-race-hurdle{
  opacity:1!important;
  will-change:left,top,width,height!important;
}

/* The active hurdle remains above Abi during take-off, then JS applies
   cag-hurdle-pass-behind around the apex so it visibly travels underneath. */
.cag-shell .cag-race-stage .cag-race-hurdle[data-row="0"]:not(.cag-hurdle-pass-behind){
  z-index:34!important;
}
.cag-shell .cag-race-stage .cag-race-hurdle.cag-hurdle-pass-behind{
  z-index:17!important;
}


/* =========================================================
   v0.3.5 — HURDLE PASSES UNDER ABI AND EXITS VIEW
   ========================================================= */

/* Let the hurdle layer itself extend through the bottom edge; the stage clips
   the final object naturally at the game-frame boundary. */
.cag-shell .cag-race-stage .cag-race-lanes{
  overflow:visible!important;
}

/* Once Abi is airborne, the passed hurdle remains behind her but fully opaque
   until its geometry carries it below the viewport. */
.cag-shell .cag-race-stage .cag-race-hurdle.cag-hurdle-pass-behind{
  opacity:1!important;
  visibility:visible!important;
  z-index:17!important;
  pointer-events:none!important;
}
