/* Rallyver V19.2.348 — controller placement and visual preference rules for the three native controllers.
 * This file scopes placement and controller-only presentation preferences;
 * native markup, pointer input, and physics remain owned by v4.final.html.
 */
#touchControls,#touchControlsMedium,#touchControlsAdvanced{
  position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;
  max-width:100vw!important;max-height:100dvh!important;padding:0!important;margin:0!important;
  box-sizing:border-box!important;
}
/* Drag zones are positioned inside the viewport; their dimensions and visuals
   remain the native .tc-steer-zone/.tc-throttle-zone dimensions from common.css. */
#touchControlsMedium .tc-drag-zone,#touchControlsAdvanced #tcSteerZone{
  position:absolute!important
}
#touchControlsMedium #tcSteerZoneMedium,#touchControlsAdvanced #tcSteerZone{
  left:calc(10px + env(safe-area-inset-left))!important;right:auto!important;top:auto!important;
  bottom:calc(10px + env(safe-area-inset-bottom))!important
}
#touchControlsMedium #tcThrottleZoneMedium{
  position:absolute!important;right:calc(8px + env(safe-area-inset-right))!important;left:auto!important;
  top:auto!important;bottom:calc(var(--rv240-small-screen-meter-h,160px) + 22px + env(safe-area-inset-bottom))!important
}
#touchControlsAdvanced .tc-throttle-wrap{
  position:absolute!important;right:calc(8px + env(safe-area-inset-right))!important;left:auto!important;
  top:auto!important;bottom:calc(var(--rv240-small-screen-meter-h,160px) + 22px + env(safe-area-inset-bottom))!important;
}
#touchControlsAdvanced #tcThrottleZone{position:relative!important}
#tcGearIndicator{position:absolute!important;top:-21px!important;right:50%!important;transform:translateX(50%)!important}
/* The neutral line follows the native throttle neutral value set by setupDragZone(). */
#tcThrottleZone .tc-zone-line-h{top:85.7143%!important;left:5px!important;right:5px!important}
#tcThrottleZoneMedium .tc-zone-line-h{top:50%!important;left:5px!important;right:5px!important}
/* Button controller placement; button dimensions and visual states remain native. */
#touchControls .tc-left{position:absolute!important;left:calc(10px + env(safe-area-inset-left))!important;right:auto!important;top:auto!important;bottom:calc(10px + env(safe-area-inset-bottom))!important}
#touchControls .tc-right{position:absolute!important;right:calc(8px + env(safe-area-inset-right))!important;left:auto!important;top:auto!important;bottom:calc(var(--rv240-small-screen-meter-h,160px) + 22px + env(safe-area-inset-bottom))!important}

/* User-defined position presets retained from V8. */
body[data-rv240-steer-position="bottom-center"] #touchControlsMedium #tcSteerZoneMedium,body[data-rv240-steer-position="bottom-center"] #touchControlsAdvanced #tcSteerZone{left:50%!important;right:auto!important;transform:translateX(-50%)!important}

body[data-rv240-steer-position="bottom-right"] #touchControlsMedium #tcSteerZoneMedium,body[data-rv240-steer-position="bottom-right"] #touchControlsAdvanced #tcSteerZone{left:auto!important;right:calc(10px + env(safe-area-inset-right))!important;transform:none!important}

body[data-rv240-steer-position="left-center"] #touchControlsMedium #tcSteerZoneMedium,body[data-rv240-steer-position="left-center"] #touchControlsAdvanced #tcSteerZone{left:calc(8px + env(safe-area-inset-left))!important;right:auto!important;top:50%!important;bottom:auto!important;transform:translateY(-50%)!important}

body[data-rv240-steer-position="right-center"] #touchControlsMedium #tcSteerZoneMedium,body[data-rv240-steer-position="right-center"] #touchControlsAdvanced #tcSteerZone{left:auto!important;right:calc(8px + env(safe-area-inset-right))!important;top:50%!important;bottom:auto!important;transform:translateY(-50%)!important}

body[data-rv240-throttle-position="bottom-left"] #touchControlsMedium #tcThrottleZoneMedium,body[data-rv240-throttle-position="bottom-left"] #touchControlsAdvanced .tc-throttle-wrap{left:calc(10px + env(safe-area-inset-left))!important;right:auto!important;bottom:calc(10px + env(safe-area-inset-bottom))!important;top:auto!important}

body[data-rv240-throttle-position="bottom-center"] #touchControlsMedium #tcThrottleZoneMedium,body[data-rv240-throttle-position="bottom-center"] #touchControlsAdvanced .tc-throttle-wrap{left:50%!important;right:auto!important;bottom:calc(10px + env(safe-area-inset-bottom))!important;top:auto!important;transform:translateX(-50%)!important}

body[data-rv240-throttle-position="bottom-right"] #touchControlsMedium #tcThrottleZoneMedium,body[data-rv240-throttle-position="bottom-right"] #touchControlsAdvanced .tc-throttle-wrap{left:auto!important;right:calc(10px + env(safe-area-inset-right))!important;bottom:calc(10px + env(safe-area-inset-bottom))!important;top:auto!important}

body[data-rv240-throttle-position="left-center"] #touchControlsMedium #tcThrottleZoneMedium,body[data-rv240-throttle-position="left-center"] #touchControlsAdvanced .tc-throttle-wrap{left:calc(8px + env(safe-area-inset-left))!important;right:auto!important;top:50%!important;bottom:auto!important;transform:translateY(-50%)!important}

body[data-rv240-throttle-position="right-center"] #touchControlsMedium #tcThrottleZoneMedium,body[data-rv240-throttle-position="right-center"] #touchControlsAdvanced .tc-throttle-wrap{left:auto!important;right:calc(8px + env(safe-area-inset-right))!important;top:50%!important;bottom:auto!important;transform:translateY(-50%)!important}

body[data-rv240-throttle-position="above-speedometer"][data-rv240-meter-position="top-left"] #touchControlsMedium #tcThrottleZoneMedium,body[data-rv240-throttle-position="above-speedometer"][data-rv240-meter-position="top-left"] #touchControlsAdvanced .tc-throttle-wrap{left:calc(10px + env(safe-area-inset-left))!important;right:auto!important;top:calc(76px + var(--rv6-safe-t) + 160px + 16px)!important;bottom:auto!important}

body[data-rv240-throttle-position="above-speedometer"][data-rv240-meter-position="top-right"] #touchControlsMedium #tcThrottleZoneMedium,body[data-rv240-throttle-position="above-speedometer"][data-rv240-meter-position="top-right"] #touchControlsAdvanced .tc-throttle-wrap{left:auto!important;right:calc(10px + env(safe-area-inset-right))!important;top:calc(76px + var(--rv6-safe-t) + 160px + 16px)!important;bottom:auto!important}

body[data-rv240-throttle-position="above-speedometer"][data-rv240-meter-position="bottom-left"] #touchControlsMedium #tcThrottleZoneMedium,body[data-rv240-throttle-position="above-speedometer"][data-rv240-meter-position="bottom-left"] #touchControlsAdvanced .tc-throttle-wrap{left:calc(10px + env(safe-area-inset-left))!important;right:auto!important;top:auto!important;bottom:calc(160px + 22px + env(safe-area-inset-bottom))!important}

body[data-rv240-throttle-position="above-speedometer"][data-rv240-meter-position="bottom-right"] #touchControlsMedium #tcThrottleZoneMedium,body[data-rv240-throttle-position="above-speedometer"][data-rv240-meter-position="bottom-right"] #touchControlsAdvanced .tc-throttle-wrap{left:auto!important;right:calc(8px + env(safe-area-inset-right))!important;top:auto!important;bottom:calc(160px + 22px + env(safe-area-inset-bottom))!important}

@media (max-height:500px) and (orientation:landscape) {
body[data-rv240-throttle-position="above-speedometer"][data-rv240-meter-position="top-left"] #touchControlsMedium #tcThrottleZoneMedium,body[data-rv240-throttle-position="above-speedometer"][data-rv240-meter-position="top-left"] #touchControlsAdvanced .tc-throttle-wrap{top:calc(76px + var(--rv6-safe-t) + 100px + 16px)!important}
}

@media (max-height:500px) and (orientation:landscape) {
body[data-rv240-throttle-position="above-speedometer"][data-rv240-meter-position="top-right"] #touchControlsMedium #tcThrottleZoneMedium,body[data-rv240-throttle-position="above-speedometer"][data-rv240-meter-position="top-right"] #touchControlsAdvanced .tc-throttle-wrap{top:calc(76px + var(--rv6-safe-t) + 100px + 16px)!important}
}

@media (max-height:500px) and (orientation:landscape) {
body[data-rv240-throttle-position="above-speedometer"][data-rv240-meter-position="bottom-left"] #touchControlsMedium #tcThrottleZoneMedium,body[data-rv240-throttle-position="above-speedometer"][data-rv240-meter-position="bottom-left"] #touchControlsAdvanced .tc-throttle-wrap{bottom:calc(100px + 16px + env(safe-area-inset-bottom))!important}
}

@media (max-height:500px) and (orientation:landscape) {
body[data-rv240-throttle-position="above-speedometer"][data-rv240-meter-position="bottom-right"] #touchControlsMedium #tcThrottleZoneMedium,body[data-rv240-throttle-position="above-speedometer"][data-rv240-meter-position="bottom-right"] #touchControlsAdvanced .tc-throttle-wrap{bottom:calc(100px + 16px + env(safe-area-inset-bottom))!important}
}

body[data-rv240-steer-position="bottom-center"] #touchControls .tc-left{left:50%!important;right:auto!important;transform:translateX(-50%)!important}

body[data-rv240-steer-position="bottom-right"] #touchControls .tc-left{left:auto!important;right:calc(10px + env(safe-area-inset-right))!important;transform:none!important}

body[data-rv240-steer-position="left-center"] #touchControls .tc-left{left:calc(8px + env(safe-area-inset-left))!important;top:50%!important;bottom:auto!important;transform:translateY(-50%)!important}

body[data-rv240-steer-position="right-center"] #touchControls .tc-left{left:auto!important;right:calc(8px + env(safe-area-inset-right))!important;top:50%!important;bottom:auto!important;transform:translateY(-50%)!important}

body[data-rv240-throttle-position="bottom-left"] #touchControls .tc-right{left:calc(10px + env(safe-area-inset-left))!important;right:auto!important;bottom:calc(10px + env(safe-area-inset-bottom))!important;top:auto!important}

body[data-rv240-throttle-position="bottom-center"] #touchControls .tc-right{left:50%!important;right:auto!important;bottom:calc(10px + env(safe-area-inset-bottom))!important;top:auto!important;transform:translateX(-50%)!important}

body[data-rv240-throttle-position="bottom-right"] #touchControls .tc-right{left:auto!important;right:calc(10px + env(safe-area-inset-right))!important;bottom:calc(10px + env(safe-area-inset-bottom))!important;top:auto!important}

body[data-rv240-throttle-position="left-center"] #touchControls .tc-right{left:calc(8px + env(safe-area-inset-left))!important;right:auto!important;top:50%!important;bottom:auto!important;transform:translateY(-50%)!important}

body[data-rv240-throttle-position="right-center"] #touchControls .tc-right{left:auto!important;right:calc(8px + env(safe-area-inset-right))!important;top:50%!important;bottom:auto!important;transform:translateY(-50%)!important}

/* Short landscape safety: preserve the native 220px throttle zone and move
   it vertically into the available strip above the compact speed pod.
   This changes placement only; common.css remains the sole size/skin owner. */
@media (max-height:500px) and (orientation:landscape) {
  #touchControlsMedium #tcThrottleZoneMedium,
  #touchControlsAdvanced .tc-throttle-wrap {
    top:auto!important;
    bottom:calc(88px + env(safe-area-inset-bottom))!important;
  }
  body[data-rv240-throttle-position="above-speedometer"] #touchControlsMedium #tcThrottleZoneMedium,
  body[data-rv240-throttle-position="above-speedometer"] #touchControlsAdvanced .tc-throttle-wrap {
    top:auto!important;
    bottom:calc(88px + env(safe-area-inset-bottom))!important;
  }
}

/* V19.2.344: standard throttle zone matches the steering-zone width in height.
   Its neutral guide and idle handle are centered vertically. */
#touchControlsMedium #tcThrottleZoneMedium{height:188px!important;min-height:188px!important;max-height:188px!important}
#touchControlsMedium #tcThrottleZoneMedium .tc-zone-line-h{top:50%!important;left:5px!important;right:5px!important}

/* Controller surface opacity presets. The final two modes remove every
   surface fill/border/active tint while retaining the axis guide and handle. */
#touchControlsMedium .tc-drag-zone[data-rv-opacity="25"],
#touchControlsAdvanced .tc-drag-zone[data-rv-opacity="25"]{background:rgba(0,0,0,.25)!important;border-color:rgba(255,255,255,.25)!important}
#touchControlsMedium .tc-drag-zone[data-rv-opacity="50"],
#touchControlsAdvanced .tc-drag-zone[data-rv-opacity="50"]{background:rgba(0,0,0,.50)!important;border-color:rgba(255,255,255,.42)!important}
#touchControlsMedium .tc-drag-zone[data-rv-opacity="75"],
#touchControlsAdvanced .tc-drag-zone[data-rv-opacity="75"]{background:rgba(0,0,0,.75)!important;border-color:rgba(255,255,255,.55)!important}
#touchControlsMedium .tc-drag-zone[data-rv-opacity="line"],
#touchControlsAdvanced .tc-drag-zone[data-rv-opacity="line"],
#touchControlsMedium .tc-drag-zone[data-rv-opacity="line-soft"],
#touchControlsAdvanced .tc-drag-zone[data-rv-opacity="line-soft"]{background:transparent!important;background-image:none!important;border-color:transparent!important;box-shadow:none!important}
#touchControlsMedium .tc-drag-zone[data-rv-opacity="line"].active-pos,
#touchControlsMedium .tc-drag-zone[data-rv-opacity="line"].active-neg,
#touchControlsAdvanced .tc-drag-zone[data-rv-opacity="line"].active-pos,
#touchControlsAdvanced .tc-drag-zone[data-rv-opacity="line"].active-neg,
#touchControlsMedium .tc-drag-zone[data-rv-opacity="line-soft"].active-pos,
#touchControlsMedium .tc-drag-zone[data-rv-opacity="line-soft"].active-neg,
#touchControlsAdvanced .tc-drag-zone[data-rv-opacity="line-soft"].active-pos,
#touchControlsAdvanced .tc-drag-zone[data-rv-opacity="line-soft"].active-neg{background:transparent!important;background-image:none!important;box-shadow:none!important}
#touchControlsMedium .tc-drag-zone[data-rv-opacity="line"] .tc-zone-line,
#touchControlsAdvanced .tc-drag-zone[data-rv-opacity="line"] .tc-zone-line,
#touchControlsMedium .tc-drag-zone[data-rv-opacity="line"] .tc-zone-handle,
#touchControlsAdvanced .tc-drag-zone[data-rv-opacity="line"] .tc-zone-handle{opacity:1!important}
#touchControlsMedium .tc-drag-zone[data-rv-opacity="line-soft"] .tc-zone-line,
#touchControlsAdvanced .tc-drag-zone[data-rv-opacity="line-soft"] .tc-zone-line,
#touchControlsMedium .tc-drag-zone[data-rv-opacity="line-soft"] .tc-zone-handle,
#touchControlsAdvanced .tc-drag-zone[data-rv-opacity="line-soft"] .tc-zone-handle{opacity:.48!important}

@media(max-width:480px){#touchControlsMedium #tcThrottleZoneMedium{height:155px!important;min-height:155px!important;max-height:155px!important}}
/* Keep the native active feedback hues while applying the selected opacity. */
#touchControlsMedium .tc-drag-zone[data-rv-opacity="25"].tc-steer-zone.active-pos,
#touchControlsMedium .tc-drag-zone[data-rv-opacity="25"].tc-steer-zone.active-neg,
#touchControlsAdvanced .tc-drag-zone[data-rv-opacity="25"].tc-steer-zone.active-pos,
#touchControlsAdvanced .tc-drag-zone[data-rv-opacity="25"].tc-steer-zone.active-neg{background:rgba(0,140,255,.10)!important}
#touchControlsMedium .tc-drag-zone[data-rv-opacity="50"].tc-steer-zone.active-pos,
#touchControlsMedium .tc-drag-zone[data-rv-opacity="50"].tc-steer-zone.active-neg,
#touchControlsAdvanced .tc-drag-zone[data-rv-opacity="50"].tc-steer-zone.active-pos,
#touchControlsAdvanced .tc-drag-zone[data-rv-opacity="50"].tc-steer-zone.active-neg{background:rgba(0,140,255,.20)!important}
#touchControlsMedium .tc-drag-zone[data-rv-opacity="75"].tc-steer-zone.active-pos,
#touchControlsMedium .tc-drag-zone[data-rv-opacity="75"].tc-steer-zone.active-neg,
#touchControlsAdvanced .tc-drag-zone[data-rv-opacity="75"].tc-steer-zone.active-pos,
#touchControlsAdvanced .tc-drag-zone[data-rv-opacity="75"].tc-steer-zone.active-neg{background:rgba(0,140,255,.30)!important}
#touchControlsMedium .tc-drag-zone[data-rv-opacity="25"].tc-throttle-zone.active-pos,
#touchControlsAdvanced .tc-drag-zone[data-rv-opacity="25"].tc-throttle-zone.active-pos{background:rgba(0,200,83,.10)!important}
#touchControlsMedium .tc-drag-zone[data-rv-opacity="50"].tc-throttle-zone.active-pos,
#touchControlsAdvanced .tc-drag-zone[data-rv-opacity="50"].tc-throttle-zone.active-pos{background:rgba(0,200,83,.20)!important}
#touchControlsMedium .tc-drag-zone[data-rv-opacity="75"].tc-throttle-zone.active-pos,
#touchControlsAdvanced .tc-drag-zone[data-rv-opacity="75"].tc-throttle-zone.active-pos{background:rgba(0,200,83,.30)!important}
#touchControlsMedium .tc-drag-zone[data-rv-opacity="25"].tc-throttle-zone.active-neg,
#touchControlsAdvanced .tc-drag-zone[data-rv-opacity="25"].tc-throttle-zone.active-neg{background:rgba(225,6,0,.10)!important}
#touchControlsMedium .tc-drag-zone[data-rv-opacity="50"].tc-throttle-zone.active-neg,
#touchControlsAdvanced .tc-drag-zone[data-rv-opacity="50"].tc-throttle-zone.active-neg{background:rgba(225,6,0,.20)!important}
#touchControlsMedium .tc-drag-zone[data-rv-opacity="75"].tc-throttle-zone.active-neg,
#touchControlsAdvanced .tc-drag-zone[data-rv-opacity="75"].tc-throttle-zone.active-neg{background:rgba(225,6,0,.30)!important}


/* V19.2.344 — controller geometry and stacking.  All three native control
   roots sit above HUD/leaderboard (z=2005/1809) but below game menus. */
#touchControls,#touchControlsMedium,#touchControlsAdvanced{z-index:2020!important}
#touchControlsMedium{--rv-controller-steer-width:188px}
#touchControlsMedium #tcThrottleZoneMedium{
  width:74px!important;
  height:calc(var(--rv-controller-steer-width) - 5px)!important;
  min-height:calc(var(--rv-controller-steer-width) - 5px)!important;
  max-height:calc(var(--rv-controller-steer-width) - 5px)!important;
}
@media(max-width:480px){#touchControlsMedium{--rv-controller-steer-width:155px}}
#touchControlsMedium #tcThrottleZoneMedium .tc-zone-line-h{top:50%!important;left:5px!important;right:5px!important}

/* Simple steering buttons swap visual positions and remain true squares. */
#touchControls .tc-left{direction:ltr!important;flex-direction:row!important;gap:12px!important}
#touchControls #tcLeft,#touchControls #tcRight{
  width:64px!important;height:64px!important;min-width:64px!important;min-height:64px!important;
  max-width:64px!important;max-height:64px!important;padding:0!important;box-sizing:border-box!important;
  display:flex!important;align-items:center!important;justify-content:center!important
}

/* Five-speed analog throttle: one-seventh of the full pedal is brake (half
   the previous two-sevenths); the gas travel loses exactly that same height.
   Green glow grows from gear 1 to 5, anchored immediately above the neutral line. */
#touchControlsAdvanced #tcThrottleZone .tc-zone-line-h{top:85.7143%!important}
#touchControlsAdvanced #tcThrottleZone .tc-zone-handle{top:85.7143%}
#touchControlsAdvanced #tcThrottleZone.analog-throttle:after{bottom:14.2857%!important}
#touchControlsAdvanced #tcThrottleZone.active-pos.tc-level-1{background:radial-gradient(ellipse 22% 16% at 50% 85.7143%,rgba(0,255,145,.20) 0%,rgba(0,220,120,.10) 55%,transparent 100%)!important}
#touchControlsAdvanced #tcThrottleZone.active-pos.tc-level-2{background:radial-gradient(ellipse 34% 24% at 50% 85.7143%,rgba(0,255,145,.29) 0%,rgba(0,220,120,.13) 58%,transparent 100%)!important}
#touchControlsAdvanced #tcThrottleZone.active-pos.tc-level-3{background:radial-gradient(ellipse 48% 34% at 50% 85.7143%,rgba(0,255,145,.39) 0%,rgba(0,220,120,.17) 60%,transparent 100%)!important}
#touchControlsAdvanced #tcThrottleZone.active-pos.tc-level-4{background:radial-gradient(ellipse 64% 46% at 50% 85.7143%,rgba(0,255,145,.49) 0%,rgba(0,220,120,.21) 62%,transparent 100%)!important}
#touchControlsAdvanced #tcThrottleZone.active-pos.tc-level-5{background:radial-gradient(ellipse 82% 60% at 50% 85.7143%,rgba(0,255,145,.60) 0%,rgba(0,220,120,.26) 64%,transparent 100%)!important}

/* Transparency is applied to each complete controller, including the gear
   badge. Values denote transparency, not opacity. */
#touchControlsMedium .tc-drag-zone[data-rv-opacity="25"],#touchControlsAdvanced #tcSteerZone[data-rv-opacity="25"]{opacity:.75!important}
#touchControlsMedium .tc-drag-zone[data-rv-opacity="50"],#touchControlsAdvanced #tcSteerZone[data-rv-opacity="50"]{opacity:.50!important}
#touchControlsMedium .tc-drag-zone[data-rv-opacity="75"],#touchControlsAdvanced #tcSteerZone[data-rv-opacity="75"]{opacity:.25!important}
#touchControlsMedium .tc-drag-zone[data-rv-opacity="100"],#touchControlsAdvanced #tcSteerZone[data-rv-opacity="100"]{opacity:0!important}
#touchControlsAdvanced .tc-throttle-wrap[data-rv-opacity="25"]{opacity:.75!important}
#touchControlsAdvanced .tc-throttle-wrap[data-rv-opacity="50"]{opacity:.50!important}
#touchControlsAdvanced .tc-throttle-wrap[data-rv-opacity="75"]{opacity:.25!important}
#touchControlsAdvanced .tc-throttle-wrap[data-rv-opacity="100"]{opacity:0!important}
#touchControls .tc-left[data-rv-opacity="25"],#touchControls .tc-right[data-rv-opacity="25"]{opacity:.75!important}
#touchControls .tc-left[data-rv-opacity="50"],#touchControls .tc-right[data-rv-opacity="50"]{opacity:.50!important}
#touchControls .tc-left[data-rv-opacity="75"],#touchControls .tc-right[data-rv-opacity="75"]{opacity:.25!important}
#touchControls .tc-left[data-rv-opacity="100"],#touchControls .tc-right[data-rv-opacity="100"]{opacity:0!important}

/* Outline-free modes: remove all zone fills, borders, active color and halo;
   only axis line and movable handle remain. Gear badge follows pedal opacity. */
#touchControlsMedium .tc-drag-zone[data-rv-opacity="line"],#touchControlsAdvanced .tc-drag-zone[data-rv-opacity="line"],
#touchControlsMedium .tc-drag-zone[data-rv-opacity="line-soft"],#touchControlsAdvanced .tc-drag-zone[data-rv-opacity="line-soft"]{
 background:transparent!important;background-image:none!important;border-color:transparent!important;box-shadow:none!important
}
#touchControlsMedium .tc-drag-zone[data-rv-opacity^="line"].active-pos,#touchControlsMedium .tc-drag-zone[data-rv-opacity^="line"].active-neg,
#touchControlsAdvanced .tc-drag-zone[data-rv-opacity^="line"].active-pos,#touchControlsAdvanced .tc-drag-zone[data-rv-opacity^="line"].active-neg{
 background:transparent!important;background-image:none!important;box-shadow:none!important
}
#touchControlsMedium .tc-drag-zone[data-rv-opacity="line"] .tc-zone-line,#touchControlsMedium .tc-drag-zone[data-rv-opacity="line"] .tc-zone-handle,
#touchControlsAdvanced .tc-drag-zone[data-rv-opacity="line"] .tc-zone-line,#touchControlsAdvanced .tc-drag-zone[data-rv-opacity="line"] .tc-zone-handle{opacity:1!important}
#touchControlsMedium .tc-drag-zone[data-rv-opacity="line-soft"] .tc-zone-line,#touchControlsMedium .tc-drag-zone[data-rv-opacity="line-soft"] .tc-zone-handle,
#touchControlsAdvanced .tc-drag-zone[data-rv-opacity="line-soft"] .tc-zone-line,#touchControlsAdvanced .tc-drag-zone[data-rv-opacity="line-soft"] .tc-zone-handle{opacity:.48!important}
#touchControlsAdvanced .tc-throttle-wrap[data-rv-opacity="line"] #tcGearIndicator{opacity:1!important}
#touchControlsAdvanced .tc-throttle-wrap[data-rv-opacity="line-soft"] #tcGearIndicator{opacity:.48!important}
/* For button-only mode the two line-only presets degrade gracefully to
   translucent buttons because no axis line/handle exists in that controller. */
#touchControls .tc-left[data-rv-opacity="line"],#touchControls .tc-right[data-rv-opacity="line"]{opacity:.75!important}
#touchControls .tc-left[data-rv-opacity="line-soft"],#touchControls .tc-right[data-rv-opacity="line-soft"]{opacity:.48!important}

/* Keep the touch controllers above HUD/leaderboard, never above the menu. */
#touchControls,#touchControlsMedium,#touchControlsAdvanced{z-index:2020!important}

/* V19.2.344: default pedal location is exactly 5px outside the speed pod.
   Match all three controller modes and all four speed-pod corners. */
body[data-rv240-throttle-position="above-speedometer"][data-rv240-meter-position="top-left"] #touchControls .tc-right{left:calc(10px + env(safe-area-inset-left))!important;right:auto!important;top:calc(76px + var(--rv6-safe-t) + 160px + 5px)!important;bottom:auto!important}
body[data-rv240-throttle-position="above-speedometer"][data-rv240-meter-position="top-right"] #touchControls .tc-right{left:auto!important;right:calc(10px + env(safe-area-inset-right))!important;top:calc(76px + var(--rv6-safe-t) + 160px + 5px)!important;bottom:auto!important}
body[data-rv240-throttle-position="above-speedometer"][data-rv240-meter-position="bottom-left"] #touchControls .tc-right{left:calc(10px + env(safe-area-inset-left))!important;right:auto!important;top:auto!important;bottom:calc(160px + 5px + env(safe-area-inset-bottom))!important}
body[data-rv240-throttle-position="above-speedometer"][data-rv240-meter-position="bottom-right"] #touchControls .tc-right{left:auto!important;right:calc(8px + env(safe-area-inset-right))!important;top:auto!important;bottom:calc(160px + 5px + env(safe-area-inset-bottom))!important}
body[data-rv240-throttle-position="above-speedometer"][data-rv240-meter-position="top-left"] #touchControlsMedium #tcThrottleZoneMedium,
body[data-rv240-throttle-position="above-speedometer"][data-rv240-meter-position="top-left"] #touchControlsAdvanced .tc-throttle-wrap{top:calc(76px + var(--rv6-safe-t) + 160px + 5px)!important;bottom:auto!important}
body[data-rv240-throttle-position="above-speedometer"][data-rv240-meter-position="top-right"] #touchControlsMedium #tcThrottleZoneMedium,
body[data-rv240-throttle-position="above-speedometer"][data-rv240-meter-position="top-right"] #touchControlsAdvanced .tc-throttle-wrap{top:calc(76px + var(--rv6-safe-t) + 160px + 5px)!important;bottom:auto!important}
body[data-rv240-throttle-position="above-speedometer"][data-rv240-meter-position="bottom-left"] #touchControlsMedium #tcThrottleZoneMedium,
body[data-rv240-throttle-position="above-speedometer"][data-rv240-meter-position="bottom-left"] #touchControlsAdvanced .tc-throttle-wrap{bottom:calc(160px + 5px + env(safe-area-inset-bottom))!important;top:auto!important}
body[data-rv240-throttle-position="above-speedometer"][data-rv240-meter-position="bottom-right"] #touchControlsMedium #tcThrottleZoneMedium,
body[data-rv240-throttle-position="above-speedometer"][data-rv240-meter-position="bottom-right"] #touchControlsAdvanced .tc-throttle-wrap{bottom:calc(160px + 5px + env(safe-area-inset-bottom))!important;top:auto!important}
@media(max-height:500px) and (orientation:landscape){
 body[data-rv240-throttle-position="above-speedometer"] #touchControls .tc-right,
 body[data-rv240-throttle-position="above-speedometer"] #touchControlsMedium #tcThrottleZoneMedium,
 body[data-rv240-throttle-position="above-speedometer"] #touchControlsAdvanced .tc-throttle-wrap{top:auto!important;bottom:calc(100px + 5px + env(safe-area-inset-bottom))!important}
}

/* V19.2.347: strongest controller visibility preset (0% transparency). */
#touchControlsMedium .tc-drag-zone[data-rv-opacity="0"],#touchControlsAdvanced .tc-drag-zone[data-rv-opacity="0"],#touchControlsAdvanced .tc-throttle-wrap[data-rv-opacity="0"],#touchControls .tc-left[data-rv-opacity="0"],#touchControls .tc-right[data-rv-opacity="0"]{opacity:1!important}
/* Five distinct throttle halo strengths, anchored at the active gas band above the neutral line. */
#touchControlsAdvanced #tcThrottleZone.active-pos.tc-level-1{background:radial-gradient(ellipse 30% 10% at 50% 85.7143%,rgba(0,230,120,.20) 0%,rgba(0,230,120,.08) 58%,transparent 100%)!important}
#touchControlsAdvanced #tcThrottleZone.active-pos.tc-level-2{background:radial-gradient(ellipse 42% 18% at 50% 85.7143%,rgba(0,235,125,.28) 0%,rgba(0,235,125,.11) 60%,transparent 100%)!important}
#touchControlsAdvanced #tcThrottleZone.active-pos.tc-level-3{background:radial-gradient(ellipse 56% 28% at 50% 85.7143%,rgba(0,240,130,.38) 0%,rgba(0,240,130,.15) 62%,transparent 100%)!important}
#touchControlsAdvanced #tcThrottleZone.active-pos.tc-level-4{background:radial-gradient(ellipse 72% 40% at 50% 85.7143%,rgba(0,248,138,.50) 0%,rgba(0,248,138,.20) 64%,transparent 100%)!important}
#touchControlsAdvanced #tcThrottleZone.active-pos.tc-level-5{background:radial-gradient(ellipse 90% 54% at 50% 85.7143%,rgba(0,255,145,.62) 0%,rgba(0,255,145,.25) 66%,transparent 100%)!important}
/* Restore the white steering halo at all five native analog levels. */
#touchControlsAdvanced #tcSteerZone.tc-level-1{background:radial-gradient(ellipse 24% 42% at 50% 50%,rgba(255,255,255,.20),transparent 100%)!important}
#touchControlsAdvanced #tcSteerZone.tc-level-2{background:radial-gradient(ellipse 38% 58% at 50% 50%,rgba(255,255,255,.27),transparent 100%)!important}
#touchControlsAdvanced #tcSteerZone.tc-level-3{background:radial-gradient(ellipse 52% 72% at 50% 50%,rgba(255,255,255,.35),transparent 100%)!important}
#touchControlsAdvanced #tcSteerZone.tc-level-4{background:radial-gradient(ellipse 68% 86% at 50% 50%,rgba(255,255,255,.43),transparent 100%)!important}
#touchControlsAdvanced #tcSteerZone.tc-level-5{background:radial-gradient(ellipse 84% 100% at 50% 50%,rgba(255,255,255,.52),transparent 100%)!important}
/* The settings/menu layer owns input while open: controllers become non-rendering and non-interactive. */
body:has(#uiPanel:not(.hidden)) #touchControls,body:has(#uiPanel:not(.hidden)) #touchControlsMedium,body:has(#uiPanel:not(.hidden)) #touchControlsAdvanced{visibility:hidden!important;pointer-events:none!important}


/* V19.2.347 — suspend the full-screen controller roots while the main menu is open.
   display:none is intentional here: visibility alone can leave a full-screen
   fixed root in the stacking/hit-test path on some mobile browsers. */
#touchControls.rv-menu-suspended,
#touchControlsMedium.rv-menu-suspended,
#touchControlsAdvanced.rv-menu-suspended{display:none!important;visibility:hidden!important;pointer-events:none!important}


/* V19.2.347 — shorter 5-speed pedal.  Keep its original one-seventh brake
   region and 85.7143% neutral axis; only reduce physical height. */
#touchControlsAdvanced #tcThrottleZone{
  height:180px!important;min-height:180px!important;max-height:180px!important;
}
@media(max-width:480px){
  #touchControlsAdvanced #tcThrottleZone{
    height:150px!important;min-height:150px!important;max-height:150px!important;
  }
}

/* The gas/brake pedal is right-aligned with the speedometer when the user
   chooses the above-meter preset.  Runtime computes its exact top and right. */

/* V19.2.347 — strict line-only rendering.  No active green/red/white fill,
   gradient, halo, stripe, border or gear badge survives either line preset. */
#touchControlsMedium .tc-drag-zone[data-rv-opacity="line"],
#touchControlsMedium .tc-drag-zone[data-rv-opacity="line-soft"],
#touchControlsMedium .tc-drag-zone[data-rv-opacity^="line"].active-pos,
#touchControlsMedium .tc-drag-zone[data-rv-opacity^="line"].active-neg,
#touchControlsAdvanced #tcSteerZone[data-rv-opacity="line"],
#touchControlsAdvanced #tcSteerZone[data-rv-opacity="line-soft"],
#touchControlsAdvanced #tcThrottleZone[data-rv-opacity="line"],
#touchControlsAdvanced #tcThrottleZone[data-rv-opacity="line-soft"],
#touchControlsAdvanced #tcSteerZone[data-rv-opacity^="line"].active-pos,
#touchControlsAdvanced #tcSteerZone[data-rv-opacity^="line"].active-neg,
#touchControlsAdvanced #tcThrottleZone[data-rv-opacity^="line"].active-pos,
#touchControlsAdvanced #tcThrottleZone[data-rv-opacity^="line"].active-neg{
  background:transparent!important;background-color:transparent!important;background-image:none!important;
  border-color:transparent!important;box-shadow:none!important;
}
#touchControlsMedium .tc-drag-zone[data-rv-opacity^="line"]::before,
#touchControlsMedium .tc-drag-zone[data-rv-opacity^="line"]::after,
#touchControlsAdvanced .tc-drag-zone[data-rv-opacity^="line"]::before,
#touchControlsAdvanced .tc-drag-zone[data-rv-opacity^="line"]::after{display:none!important;content:none!important;opacity:0!important}
#touchControlsMedium .tc-drag-zone[data-rv-opacity^="line"] .tc-zone-handle,
#touchControlsAdvanced .tc-drag-zone[data-rv-opacity^="line"] .tc-zone-handle{
  background:rgba(255,255,255,.88)!important;background-image:none!important;
  box-shadow:0 0 5px rgba(0,0,0,.35)!important;border:0!important;transition:none!important;
}
#touchControlsMedium .tc-drag-zone[data-rv-opacity="line-soft"] .tc-zone-line,
#touchControlsMedium .tc-drag-zone[data-rv-opacity="line-soft"] .tc-zone-handle,
#touchControlsAdvanced .tc-drag-zone[data-rv-opacity="line-soft"] .tc-zone-line,
#touchControlsAdvanced .tc-drag-zone[data-rv-opacity="line-soft"] .tc-zone-handle{opacity:.48!important}
#touchControlsAdvanced .tc-throttle-wrap[data-rv-opacity^="line"] #tcGearIndicator{display:flex!important;opacity:1!important;background:transparent!important;background-image:none!important;border-color:transparent!important;box-shadow:none!important}

/* V6 is the active menu shell. display:none is required because child drag
   zones use pointer-events:auto and can otherwise intercept scrolling. */
body.rv-v6-workspace-open #touchControls,
body.rv-v6-workspace-open #touchControlsMedium,
body.rv-v6-workspace-open #touchControlsAdvanced{
  display:none!important;visibility:hidden!important;pointer-events:none!important;
}

/* Higher-specificity active-level mask: the five analog-level backgrounds
   are !important too, so each level is explicitly neutralized here. */
#touchControlsAdvanced #tcThrottleZone[data-rv-opacity^="line"].active-pos.tc-level-1,
#touchControlsAdvanced #tcThrottleZone[data-rv-opacity^="line"].active-pos.tc-level-2,
#touchControlsAdvanced #tcThrottleZone[data-rv-opacity^="line"].active-pos.tc-level-3,
#touchControlsAdvanced #tcThrottleZone[data-rv-opacity^="line"].active-pos.tc-level-4,
#touchControlsAdvanced #tcThrottleZone[data-rv-opacity^="line"].active-pos.tc-level-5,
#touchControlsAdvanced #tcThrottleZone[data-rv-opacity^="line"].active-neg.tc-level-1,
#touchControlsAdvanced #tcThrottleZone[data-rv-opacity^="line"].active-neg.tc-level-2,
#touchControlsAdvanced #tcThrottleZone[data-rv-opacity^="line"].active-neg.tc-level-3,
#touchControlsAdvanced #tcThrottleZone[data-rv-opacity^="line"].active-neg.tc-level-4,
#touchControlsAdvanced #tcThrottleZone[data-rv-opacity^="line"].active-neg.tc-level-5,
#touchControlsAdvanced #tcSteerZone[data-rv-opacity^="line"].active-pos.tc-level-1,
#touchControlsAdvanced #tcSteerZone[data-rv-opacity^="line"].active-pos.tc-level-2,
#touchControlsAdvanced #tcSteerZone[data-rv-opacity^="line"].active-pos.tc-level-3,
#touchControlsAdvanced #tcSteerZone[data-rv-opacity^="line"].active-pos.tc-level-4,
#touchControlsAdvanced #tcSteerZone[data-rv-opacity^="line"].active-pos.tc-level-5,
#touchControlsAdvanced #tcSteerZone[data-rv-opacity^="line"].active-neg.tc-level-1,
#touchControlsAdvanced #tcSteerZone[data-rv-opacity^="line"].active-neg.tc-level-2,
#touchControlsAdvanced #tcSteerZone[data-rv-opacity^="line"].active-neg.tc-level-3,
#touchControlsAdvanced #tcSteerZone[data-rv-opacity^="line"].active-neg.tc-level-4,
#touchControlsAdvanced #tcSteerZone[data-rv-opacity^="line"].active-neg.tc-level-5{
  background:none!important;background-color:rgba(0,0,0,0)!important;background-image:none!important;
  transition:none!important;
}


/* V19.2.348 — gear badge sits 2px to the left of the analog throttle zone,
   vertically centered on the neutral line; its opacity is inherited from the
   same throttle-wrap preference that controls the pedal. */
#touchControlsAdvanced .tc-throttle-wrap{position:absolute!important;}
#touchControlsAdvanced #tcGearIndicator{
  position:absolute!important;left:-23px!important;right:auto!important;
  top:85.7143%!important;transform:translateY(-50%)!important;
  width:21px!important;min-width:21px!important;height:24px!important;
  box-sizing:border-box!important;display:flex!important;align-items:center!important;
  justify-content:center!important;z-index:7!important;pointer-events:none!important;
}
#touchControlsAdvanced .tc-throttle-wrap::before{
  content:"N";position:absolute;left:-39px;top:85.7143%;transform:translateY(-50%);
  width:14px;text-align:center;color:#fff;font:800 11px/1 Arial,sans-serif;
  text-shadow:0 1px 3px rgba(0,0,0,.75);pointer-events:none;z-index:7;
}
/* Line-only presets keep the gear text and neutral N readable at the same
   opacity as the pedal, but remove badge fill/border so no controller frame returns. */
#touchControlsAdvanced .tc-throttle-wrap[data-rv-opacity^="line"] #tcGearIndicator{
  display:flex!important;background:transparent!important;background-image:none!important;
  border-color:transparent!important;box-shadow:none!important;
}
#touchControlsAdvanced .tc-throttle-wrap[data-rv-opacity="line"] #tcGearIndicator,
#touchControlsAdvanced .tc-throttle-wrap[data-rv-opacity="line"]::before{opacity:1!important}
#touchControlsAdvanced .tc-throttle-wrap[data-rv-opacity="line-soft"] #tcGearIndicator,
#touchControlsAdvanced .tc-throttle-wrap[data-rv-opacity="line-soft"]::before{opacity:.48!important}

/* V19.2.352: neutral marker for the standard throttle controller. */
#touchControlsMedium #tcThrottleZoneMedium{position:absolute!important;overflow:visible!important}
#touchControlsMedium #tcThrottleZoneMedium::before{content:"N";position:absolute;left:-23px;top:50%;transform:translateY(-50%);width:18px;height:20px;display:flex;align-items:center;justify-content:center;color:#fff;background:rgba(0,0,0,.55);border:1px solid rgba(255,255,255,.22);border-radius:4px;font:800 11px/1 Arial,sans-serif;pointer-events:none;z-index:6}
/* When HUD is docked at the bottom, touch controls stay above its visual layer. */
#touchControls,#touchControlsMedium,#touchControlsAdvanced{z-index:1250!important}
#rvV6GameHud{z-index:1200!important}

/* V19.2.350: standard throttle neutral marker. */
#touchControlsMedium #tcThrottleZoneMedium{overflow:visible!important}
#touchControlsMedium #tcThrottleZoneMedium::before{content:"N";position:absolute;left:-23px;top:50%;transform:translateY(-50%);width:21px;height:24px;display:flex;align-items:center;justify-content:center;color:#fff;background:rgba(0,0,0,.7);border:1px solid rgba(255,255,255,.26);border-radius:6px;font:900 11px/1 Arial,sans-serif;pointer-events:none;z-index:7}
