.mobile-driving { display: none; }
@media (pointer: coarse), (max-width: 700px) {
  .mobile-driving { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 8px 12px; align-items: center; width: 100%; max-width: 440px; box-sizing: border-box; color: #20362b; }
  .yard-hud.mobile-controls-mounted .yard-pad, .drive-hud.mobile-controls-mounted .drive-pad { display: none; }
  .mobile-driving-wheel { width: 108px; height: 108px; display: grid; place-items: center; border-radius: 50%; cursor: grab; outline-offset: 3px; touch-action: none; user-select: none; -webkit-user-select: none; }
  .mobile-driving-wheel.is-held { cursor: grabbing; }
  .mobile-driving-rim { position: relative; display: block; width: 92px; height: 92px; border: 9px solid #d9e3e9; border-radius: 50%; box-sizing: border-box; background: #121e29; box-shadow: 0 2px 9px #0007, inset 0 0 0 2px #637684; transition: transform 220ms ease-out; pointer-events: none; }
  .mobile-driving-wheel.is-held .mobile-driving-rim { transition: none; }
  .mobile-driving-spoke { position: absolute; left: 50%; top: 50%; width: 34px; height: 7px; transform-origin: 0 50%; background: #8296a4; border-radius: 4px; }
  .mobile-driving-spoke.spoke-0 { transform: rotate(-90deg); background: #f6c974; }
  .mobile-driving-spoke.spoke-1 { transform: rotate(30deg); }
  .mobile-driving-spoke.spoke-2 { transform: rotate(150deg); }
  .mobile-driving-hub { position: absolute; width: 23px; height: 23px; left: 50%; top: 50%; transform: translate(-50%, -50%); background: #e2ebef; border: 3px solid #758997; border-radius: 50%; box-sizing: border-box; }
  .mobile-driving-pedals { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; min-width: 0; }
  .mobile-driving .mobile-driving-pedal, .mobile-driving .mobile-driving-tilt { min-width: 0; min-height: 44px; border: 1px solid #7a919f; border-radius: 8px; padding: 6px 8px; background: #182a39; color: #f3f6f8; font: inherit; font-size: 12px; line-height: 1.2; font-weight: 650; }
  .mobile-driving .mobile-driving-pedal { touch-action: none; user-select: none; -webkit-user-select: none; }
  .mobile-driving .mobile-driving-pedal[aria-pressed="true"] { background: #385469; box-shadow: inset 0 0 0 2px #bdd6e6; }
  .mobile-driving .mobile-driving-pedal.pedal-go { background: #214535; border-color: #79b89b; }
  .mobile-driving .mobile-driving-pedal.pedal-brake { grid-column: 1 / -1; background: #582b31; border-color: #d09299; }
  .mobile-driving-options { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px; }
  .mobile-driving .mobile-driving-tilt { min-height: 36px; padding: 6px 9px; font-size: 11px; }
  .mobile-driving .mobile-driving-tilt:disabled { opacity: .7; }
  .mobile-driving-status { font-size: 11px; line-height: 1.3; overflow-wrap: anywhere; }
  .mobile-driving :focus-visible { outline: 2px solid #f6c974; }
}
@media (pointer: coarse) and (orientation: landscape) and (max-height: 450px), (max-width: 700px) and (orientation: landscape) and (max-height: 450px) {
  .mobile-driving { grid-template-columns: 88px minmax(0, 1fr); gap: 5px 8px; max-width: 350px; }
  .mobile-driving-wheel { width: 84px; height: 84px; }
  .mobile-driving-rim { width: 76px; height: 76px; border-width: 8px; }
  .mobile-driving-spoke { width: 27px; }
  .mobile-driving-pedals { gap: 5px; }
  .mobile-driving .mobile-driving-pedal { min-height: 44px; padding: 4px; font-size: 11px; }
  .mobile-driving-options { gap: 6px; }
  .mobile-driving-status { font-size: 10px; }
}
@media (pointer: coarse), (max-width: 700px) {
  .yard-short-wide .mobile-driving { grid-template-columns: 88px minmax(0, 1fr); gap: 5px 8px; }
  .yard-short-wide .mobile-driving-wheel { width: 84px; height: 84px; }
  .yard-short-wide .mobile-driving-rim { width: 76px; height: 76px; border-width: 8px; }
  .yard-short-wide .mobile-driving-spoke { width: 27px; }
  .yard-short-wide .mobile-driving-pedals { gap: 5px; }
  .yard-short-wide .mobile-driving .mobile-driving-pedal { min-height: 44px; padding: 4px; font-size: 11px; }
  .yard-short-wide .mobile-driving-status { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .mobile-driving-rim { transition: none; }
}

@media (max-width: 350px) {
  .yard-hud .mobile-driving { grid-template-columns: 88px minmax(0, 1fr); gap: 6px 8px; }
  .yard-hud .mobile-driving-wheel { width: 84px; height: 84px; }
  .yard-hud .mobile-driving-rim { width: 76px; height: 76px; border-width: 8px; }
  .yard-hud .mobile-driving-spoke { width: 27px; }
  .yard-hud .mobile-driving .mobile-driving-pedal { font-size: 11px; padding: 6px; overflow-wrap: anywhere; }
}

/* Page Drive: forgiving one-axis thumb steering; Garage keeps its wheel. */
@media (pointer: coarse), (max-width: 700px) {
  .mobile-driving.mobile-driving-thumb { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 7px 9px; -webkit-touch-callout: none; }
  .mobile-driving-thumb .mobile-driving-wheel { position: relative; width: 100%; height: 90px; min-width: 0; border-radius: 14px; padding: 6px; border: 1px solid #8fa497; background: #e3e9dc; box-sizing: border-box; }
  .mobile-driving-thumb .mobile-driving-steer-label { position: absolute; top: 9px; left: 5px; right: 5px; text-align: center; color: #2d503b; font-size: 11px; font-weight: 700; pointer-events: none; }
  .mobile-driving-thumb .mobile-driving-rim { position: relative; width: 100%; height: 40px; margin-top: 16px; border: 0; border-radius: 22px; background: #c7d4c4; box-shadow: inset 0 1px 4px #20362b26; transform: none; transition: none; }
  .mobile-driving-thumb .mobile-driving-rim::before { content: ''; position: absolute; left: 9px; right: 9px; top: 19px; height: 2px; border-radius: 2px; background: #708b76; }
  .mobile-driving-thumb .mobile-driving-center { position: absolute; left: 50%; top: 10px; width: 2px; height: 20px; background: #708b76; }
  .mobile-driving-thumb .mobile-driving-thumb-grip { position: absolute; left: calc(50% - 19px); top: 1px; width: 38px; height: 38px; border: 2px solid #486c51; border-radius: 50%; background: #f8f7e9; box-sizing: border-box; box-shadow: 0 2px 5px #18352335; transform: translateX(var(--steering-position, 0px)); transition: transform 140ms ease-out; }
  .mobile-driving-thumb.is-held .mobile-driving-thumb-grip, .mobile-driving-thumb .is-held .mobile-driving-thumb-grip { transition: none; background: #edca83; }
  .mobile-driving-thumb .mobile-driving-pedals { gap: 6px; }
  .mobile-driving-thumb .mobile-driving-options { align-items: center; }
}
@media (prefers-reduced-motion: reduce) { .mobile-driving-thumb .mobile-driving-thumb-grip { transition: none; } }

/* Keep the full pedal labels inside the narrow Page Drive controls. */
@media (max-width: 360px) {
  .mobile-driving.mobile-driving-thumb .mobile-driving-pedal { font-size: 11px; padding-inline: 4px; }
}
