/* ==========================================================================
   RedMoviSim 2.0 · bus.css — HUD del bus (conducir y viajar)
   Mismo lenguaje que la partida de Metro (css/game.css): paneles de vidrio,
   radio 14, botón Menú con texto y menú de pausa igual al del Metro.
   ========================================================================== */

/* Paneles sobre la calle */
.bus-brand, .bus-pill, .bus-icon-btn, .bus-panel, .bus-guide, .bus-lead, .bus-keys, .bus-toast {
  border-radius: 14px; background: #0d1117d9; border: 1px solid #ffffff1a;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 8px 28px #0006;
}
.bus-brand { padding: 8px 16px 8px 8px; }
.bus-badge { min-width: 50px; height: 38px; border-radius: 10px; background: var(--brand); font-size: 18px; }
.bus-route strong { font-size: 16px; }
.bus-pill { padding: 8px 14px; }
.bus-pill strong { font-size: 18px; }
.bus-icon-btn { width: 52px; height: 52px; transition: background .15s, border-color .15s; }
.bus-icon-btn:hover { background: #1a2029ee; border-color: #ffffff33; }
.bus-menu-btn { display: inline-flex; width: auto; gap: 8px; padding: 0 16px; font: 600 15px/1 var(--f-body); }
.bus-menu-btn svg { width: 20px; height: 20px; }
@media (max-width: 900px), (max-height: 520px) {
  .bus-icon-btn { width: 42px; height: 42px; }
  .bus-menu-btn { width: 42px; padding: 0; justify-content: center; }
  .bus-menu-btn span { display: none; }
}

/* Esquema del recorrido */
.bus-strip-track { background: var(--brand); }
.bus-strip-stop i { border-color: var(--brand); }
.bus-strip-bus { border-radius: 5px; box-shadow: 0 0 0 2px var(--brand), 0 2px 6px #0008; }

/* Avisos */
.bus-toast { padding: 11px 18px; font-size: 14.5px; }
.bus-bell { border-radius: 999px; background: var(--brand); padding: 8px 18px; }

/* Consola de abajo */
.bus-bottom { gap: 12px; }
.bus-panel { padding: 14px 16px; }
.bus-next { width: min(460px, 52vw); }
.bus-next strong { font-size: 26px; }

/* 2.10 · Tablero: velocímetro de aguja con luces testigo, como el del bus o el taxi */
.bus-cluster {
  grid-template-columns: auto auto; gap: 6px 12px; padding: 12px 14px 12px 12px; border-radius: 22px;
  background: radial-gradient(120% 90% at 35% 30%, #1b222b 0%, #0b0f14 70%); border: 1px solid #ffffff1f;
  box-shadow: inset 0 1px 0 #ffffff14, inset 0 -6px 14px #0009, 0 8px 24px #0007;
}
.bus-gauge { position: relative; width: 132px; height: 132px; border-radius: 50%; background: radial-gradient(circle at 50% 45%, #10161d 0 58%, #070a0e 72%); box-shadow: inset 0 0 0 2px #2a323c, inset 0 0 0 5px #0a0d11, inset 0 3px 10px #000c; }
.bus-gauge-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.bus-gauge-svg .track { fill: none; stroke: #ffffff12; stroke-width: 3; }
.bus-gauge-svg .red { fill: none; stroke: #ff3b30; stroke-width: 3; opacity: .85; }
.bus-gauge-svg .ticks line { stroke: #c7d0da; stroke-width: 1; stroke-linecap: round; }
.bus-gauge-svg .ticks line.maj { stroke: #fff; stroke-width: 2; }
.bus-gauge-svg text { fill: #e8edf2; font: 600 10px var(--f-data); text-anchor: middle; dominant-baseline: central; }
.bus-gauge-svg .needle { fill: #ff4b2b; filter: drop-shadow(0 0 3px #ff4b2b99); }
.bus-gauge-svg .hub { fill: #1d242c; stroke: #3a434d; stroke-width: 1.5; }
.bus-gauge .bus-speed-num { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); gap: 1px; }
.bus-gauge .bus-speed-num strong { font: 700 21px/1 var(--f-data); color: #f2f6fa; text-shadow: 0 0 6px #5cc8ff44; }
.bus-gauge .bus-speed-num .bus-label { font-size: 8px; }
.bus-speed-num.over strong { color: var(--emergency); text-shadow: 0 0 8px #ff4d4d88; }
.bus-cluster-side { display: grid; justify-items: center; align-content: center; gap: 18px; }
.bus-tells { display: grid; grid-template-columns: repeat(3, 22px); gap: 5px; }
.bus-tells i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 5px; background: #05080b; box-shadow: inset 0 0 0 1px #ffffff12; color: #ffffff1f; transition: color .12s, box-shadow .12s; }
.bus-tells svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bus-tells i.lit { color: #ffb21e; box-shadow: inset 0 0 0 1px #ffb21e55, 0 0 8px #ffb21e55; }
.bus-tells i.brk.lit { color: #ff4636; box-shadow: inset 0 0 0 1px #ff463655, 0 0 8px #ff463655; }
.bus-tells i.lim.lit { color: #34d17c; box-shadow: inset 0 0 0 1px #34d17c55, 0 0 8px #34d17c55; }
.bus-cluster .bus-pedals { padding: 0 4px; }

/* 2.10 · Consola del conductor: pantalla con el próximo paradero (o la carrera del taxi) */
.bus-next {
  position: relative; border-radius: 16px; padding: 12px 16px 12px;
  background: linear-gradient(180deg, #0d141c 0%, #081017 100%); border: 1px solid #ffffff1f;
  box-shadow: inset 0 0 0 4px #05080b, inset 0 0 0 5px #ffffff0d, inset 0 10px 30px #5cc8ff0a, 0 8px 24px #0007;
}
.bus-next::after { content: ""; position: absolute; inset: 5px; border-radius: 11px; pointer-events: none; background: repeating-linear-gradient(0deg, #ffffff05 0 1px, transparent 1px 3px); }
.bus-next-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 5px; border-bottom: 1px solid #ffffff12; }
.bus-next-head .bus-label { color: #8fd3ff; }
.bus-next-badge { padding: 2px 8px; border-radius: 5px; background: var(--c); color: #fff; font: 700 12px/1.3 var(--f-data); letter-spacing: .4px; }
.bus-next-row > span:empty { display: none; }
.bus-next-row > span:not(:empty) { padding: 2px 8px; border-radius: 6px; background: #ffffff0a; box-shadow: inset 0 0 0 1px #ffffff0d; font-family: var(--f-data); font-size: 12.5px; }
.bus-next-sub > span:not(:empty) { font-family: var(--f-body); font-size: 12.5px; }
.bus-next .bus-hint { padding-top: 6px; border-top: 1px dashed #ffffff14; }
.bus-next .bus-hint:empty { display: none; }
/* Taxímetro: el aparato con números rojos (verde «LIBRE» cuando no hay carrera) */
.bus-next .taxi-meter { display: inline-flex; align-items: baseline; gap: 8px; padding: 3px 10px; border-radius: 6px; background: #020303; box-shadow: inset 0 0 0 1px #ffffff1a, inset 0 2px 6px #000; }
.bus-next .taxi-meter small { font: 700 8.5px/1 var(--f-data); letter-spacing: .8px; color: #7d8792; }
.bus-next .taxi-meter b { font: 700 17px/1.1 var(--f-data); letter-spacing: 1px; color: #3dff8b; text-transform: uppercase; text-shadow: 0 0 8px #3dff8b66; }
.bus-next .taxi-meter.on b { color: #ff3b2b; text-shadow: 0 0 8px #ff3b2b88; }
.bus-guide { padding: 10px 14px; }
.bus-guide-bar i { background: var(--brand); }

/* Lista de teclas: se ve al empezar y después desde Menú › Controles */
.bus-keys { padding: 10px 14px; gap: 6px; }
.bus-screen:not(.bus-keys-on) .bus-keys { display: none; }

/* Botones táctiles */
.bus-touch button { border-radius: 16px; background: #0d1117c7; border-color: #ffffff26; }
.bus-ride-btn { border-radius: 16px; background: #0d1117d9; border-color: #ffffff26; }
.bus-ride-btn.bell.on { background: #e8343fcc; border-color: var(--brand-hi); }

/* Menú de pausa (mismas piezas que el menú de la partida de Metro) */
.bus-overlay { background: #05070acc; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.bus-card { border-radius: 18px; background: linear-gradient(180deg, #161b23, var(--surface)); border: 1px solid var(--panel-border); box-shadow: 0 30px 80px #000c; padding: 24px; }
.bus-menu-card { width: min(94vw, 420px); text-align: left; gap: 12px; }
.bus-menu-route { font-size: 14px; color: var(--muted); line-height: 1.4; }
.bus-menu-route b { display: inline-block; margin-right: 6px; padding: 2px 8px; border-radius: 6px; background: var(--brand); color: #fff; font: 700 13px/1.3 var(--f-data); }
.bus-touch-mode .game-menu-item kbd { display: none; }

/* Informe al terminar el recorrido */
.bus-btn { min-height: 46px; padding: 0 20px; border-radius: 10px; border-color: var(--panel-border); font-weight: 600; }
.bus-btn.primary { background: var(--brand); box-shadow: 0 6px 18px #e8343f40; }
.bus-btn:hover { filter: none; background: var(--raise); }
.bus-btn.primary:hover { background: var(--brand-hi); }

/* Paradero en la calle (modo pasajero) */
.bus-stop-panel { background: #05070acc; backdrop-filter: blur(6px); }
.bus-stop-dir { border-radius: 12px; background: var(--surface); }
.bus-stop-dir:hover { border-color: var(--brand); background: var(--raise); }
.bus-stop-dir b i { background: var(--brand); }

/* ---------- 2.2 · Taxi ---------- */
.bus-badge.taxi, .bus-menu-route b.taxi { background: #f2c200; color: #111; font-family: var(--f-display); letter-spacing: .5px; }
.bus-strip-bus.taxi { width: 14px; height: 12px; margin-left: -7px; top: 4px; border-radius: 4px; background: #f2c200; box-shadow: 0 0 0 2px #111, 0 2px 6px #0008; }
.taxi-strip-pin { position: absolute; top: -6px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: #ffd23a; border: 2px solid #111; box-shadow: 0 2px 6px #0008; transition: left .2s; }
.taxi-strip-pin.dest { background: var(--ok); }
.taxi-meter b { font-family: var(--f-data); color: var(--text); }
.taxi-meter.on b { color: #ff6b5b; text-shadow: 0 0 8px #ff3b3055; }
.bus-strip-bus.taxi.back { box-shadow: 0 0 0 2px #111, 0 0 0 4px #3ad37f99, 0 2px 6px #0008; }

/* ---------- 2.8 · Radio del taxi y (2.8.1) del bus: emisoras de Santiago en vivo ---------- */
.taxi-radio-btn { display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 14px 0 12px; color: var(--text); cursor: pointer; text-align: left; font: inherit; transition: background .15s, border-color .15s; }
.taxi-radio-btn:hover, .taxi-radio-btn.open { background: #1a2029ee; border-color: #ffffff33; }
.taxi-radio-btn > svg, .taxi-radio svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.taxi-radio-btn-text { display: grid; gap: 3px; }
.taxi-radio-btn strong { font: 700 15px/1 var(--f-data); white-space: nowrap; max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.taxi-radio-btn.on { border-color: #f2c20066; }
.taxi-radio-btn.on > svg, .taxi-radio-btn.on strong { color: #f2c200; }
@media (max-width: 1100px), (max-height: 520px) {
  .taxi-radio-btn { width: 42px; height: 42px; padding: 0; justify-content: center; }
  .taxi-radio-btn-text { display: none; }
}
.taxi-radio { position: absolute; z-index: 3; top: calc(max(12px, env(safe-area-inset-top)) + 62px); right: max(14px, env(safe-area-inset-right));
  width: min(360px, calc(100% - 28px)); max-height: calc(100% - max(12px, env(safe-area-inset-top)) - 74px); overflow: auto; overscroll-behavior: contain; touch-action: pan-y;
  display: grid; gap: 10px; padding: 12px; border-radius: 14px; background: #0d1117f2; border: 1px solid #ffffff1a;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 12px 32px #0009; }
@media (max-height: 520px) and (orientation: landscape) { .taxi-radio { top: calc(max(8px, env(safe-area-inset-top)) + 52px); max-height: calc(100% - max(8px, env(safe-area-inset-top)) - 60px); } }
/* Táctil: el panel queda a la izquierda de los pedales (se puede seguir acelerando y frenando con él abierto) */
.bus-touch-mode .taxi-radio { right: calc(max(12px, env(safe-area-inset-right)) + 192px); width: min(290px, calc(100% - 220px)); gap: 8px; padding: 10px; }
.bus-touch-mode .taxi-radio-dial strong { font-size: 24px; }
.bus-touch-mode .taxi-radio-lcd { padding: 6px; }
.taxi-radio-head { display: flex; justify-content: space-between; align-items: center; padding-left: 2px; }
.taxi-radio-x { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.taxi-radio-x:hover { background: #ffffff12; color: var(--text); }
.taxi-radio-lcd { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; gap: 8px; padding: 10px 8px; border-radius: 10px; background: #181302; border: 1px solid #f2c20033; }
.taxi-radio-dial { display: grid; justify-items: center; gap: 3px; min-width: 0; text-align: center; }
.taxi-radio-dial strong { font: 700 30px/1 var(--f-data); color: #f2c200; letter-spacing: 1px; text-shadow: 0 0 10px #f2c20055; }
.taxi-radio-dial span { font: 700 17px/1.1 var(--f-display); letter-spacing: .4px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.taxi-radio-dial small { min-height: 14px; font: 500 11px/1.3 var(--f-data); color: #c9b46a; }
.taxi-radio[data-status="off"] .taxi-radio-dial strong { color: #5f5426; text-shadow: none; }
.taxi-radio[data-status="nosignal"] .taxi-radio-dial small { color: var(--warn); }
.taxi-radio[data-status="tuning"] .taxi-radio-dial small { animation: taxiRadioBlink 1s steps(2) infinite; }
@keyframes taxiRadioBlink { 50% { opacity: .35; } }
.taxi-radio-round { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid #f2c20040; background: #0006; color: #f2c200; cursor: pointer; }
.taxi-radio-round svg { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.taxi-radio-round:hover, .taxi-radio-power:hover, .taxi-radio-list button:hover { filter: brightness(1.2); }
.taxi-radio-row { display: flex; align-items: center; gap: 12px; }
.taxi-radio-power { display: flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 8px; border: 1px solid #ffffff1a; background: #ffffff0d; color: var(--text); font: 700 13px var(--f-body); cursor: pointer; }
.taxi-radio-power.on { color: #f2c200; border-color: #f2c20055; }
.taxi-radio-vol { flex: 1; display: flex; align-items: center; gap: 8px; color: var(--muted); }
.taxi-radio-vol input { flex: 1; min-width: 0; accent-color: #f2c200; }
.taxi-radio-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.taxi-radio-list button { display: grid; grid-template-columns: auto 1fr; column-gap: 7px; row-gap: 1px; align-items: baseline; padding: 7px 8px; border-radius: 8px; border: 1px solid #ffffff12; background: #ffffff08; color: var(--text); text-align: left; cursor: pointer; min-width: 0; }
.taxi-radio-list b { font: 700 12px var(--f-data); color: #c9b46a; }
.taxi-radio-list span { font: 600 13px/1.2 var(--f-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.taxi-radio-list small { grid-column: 1 / -1; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.taxi-radio-list button.on { border-color: #f2c200; background: #f2c2001a; }
.taxi-radio-list button.on b { color: #f2c200; }
.taxi-radio-note { font-size: 11px; line-height: 1.4; color: var(--muted); }

/* 2.10 · Tablero en pantallas chicas y en el celular */
@media (max-width: 900px), (max-height: 520px) {
  .bus-gauge { width: 104px; height: 104px; }
  .bus-gauge .bus-speed-num { bottom: 10px; }
  .bus-gauge .bus-speed-num strong { font-size: 17px; }
  .bus-cluster-side { gap: 12px; }
}
/* En el celular el tablero queda bajo la fila de botones (Puertas, Limitador…): no más de ~78 px de alto */
.bus-touch-mode .bus-cluster { padding: 4px 8px 4px 4px; gap: 4px 8px; border-radius: 16px; }
.bus-touch-mode .bus-gauge { width: 70px; height: 70px; }
.bus-touch-mode .bus-gauge-svg text { font-size: 12px; }
.bus-touch-mode .bus-gauge .bus-speed-num { bottom: 5px; }
.bus-touch-mode .bus-gauge .bus-speed-num strong { font-size: 13px; }
.bus-touch-mode .bus-gauge .bus-speed-num .bus-label { display: none; }
.bus-touch-mode .bus-cluster-side { gap: 6px; }
.bus-touch-mode .bus-limit { width: 32px; height: 32px; font-size: 12px; }
.bus-touch-mode .bus-next-row { gap: 4px 6px; }
.bus-touch-mode .bus-next-row > span:not(:empty) { padding: 1px 6px; font-size: 11px; }
.bus-touch-mode .bus-next .bus-hint { padding-top: 4px; font-size: 12px; }
.bus-touch-mode .bus-guide { bottom: 186px; }
.bus-touch-mode .bus-tells { grid-template-columns: repeat(3, 18px); gap: 3px; }
.bus-touch-mode .bus-tells i { width: 18px; height: 18px; }
.bus-touch-mode .bus-tells svg { width: 13px; height: 13px; }
.bus-touch-mode .bus-next { padding: 8px 12px; }
.bus-touch-mode .bus-next::after { inset: 4px; }
.bus-touch-mode .bus-next-head { padding-bottom: 3px; }
.bus-touch-mode .bus-next .taxi-meter b { font-size: 14px; }

/* ==========================================================================
   2.10.1 · Celular (modo táctil): más calle a la vista
   Barra de arriba de una línea, botones de acción solo con ícono, pedales y flechas más chicos,
   tablero y consola compactos en la franja de abajo, y la guía del paradero arriba (no en medio de la calle).
   ========================================================================== */
.bus-touch-mode .bus-top { padding-top: max(6px, env(safe-area-inset-top)); gap: 8px; }
.bus-touch-mode .bus-brand { padding: 4px 10px 4px 4px; gap: 8px; border-radius: 12px; min-width: 0; }
.bus-touch-mode .bus-badge { min-width: 40px; height: 30px; border-radius: 8px; font-size: 15px; }
.bus-touch-mode .bus-route strong { font-size: 12px; }
.bus-touch-mode .bus-right { gap: 6px; }
.bus-touch-mode .bus-pill { display: flex; align-items: center; height: 38px; padding: 0 10px; border-radius: 12px; }
.bus-touch-mode .bus-pill .bus-label { display: none; }
.bus-touch-mode .bus-pill strong { font-size: 15px; }
@media (max-width: 1000px) { .bus-touch-mode .bus-weather { display: none; } }
.bus-touch-mode .bus-icon-btn, .bus-touch-mode .taxi-radio-btn { width: 38px; height: 38px; border-radius: 12px; }
.bus-touch-mode .bus-icon-btn svg, .bus-touch-mode .taxi-radio-btn > svg { width: 19px; height: 19px; }
.bus-touch-mode .bus-strip { top: calc(max(6px, env(safe-area-inset-top)) + 44px); height: 22px; }
.bus-touch-mode .bus-bell { top: calc(max(6px, env(safe-area-inset-top)) + 70px); padding: 5px 14px; font-size: 13px; }
.bus-touch-mode .bus-toast { top: calc(max(6px, env(safe-area-inset-top)) + 132px); max-width: min(520px, calc(100% - 340px)); padding: 6px 12px; font-size: 12.5px; }
.bus-touch-mode .bus-guide { top: calc(max(6px, env(safe-area-inset-top)) + 70px); bottom: auto; left: 50%; transform: translateX(-50%); width: min(280px, calc(100% - 32px)); padding: 6px 12px; font-size: 12.5px; }
.bus-touch-mode .bus-guide-bar { height: 8px; margin-top: 5px; }
.bus-touch-mode .bus-guide small { margin-top: 4px; font-size: 11px; }
.bus-touch-mode .bus-lead { top: calc(max(6px, env(safe-area-inset-top)) + 70px); padding: 4px 10px; }
.bus-touch-mode .bus-lead strong { font-size: 16px; }
.bus-touch-mode .bus-lead .bus-label { font-size: 8px; }
.bus-touch-mode .taxi-radio { top: calc(max(6px, env(safe-area-inset-top)) + 48px); right: calc(max(10px, env(safe-area-inset-right)) + 164px); max-height: calc(100% - max(6px, env(safe-area-inset-top)) - 56px); }

/* Controles: flechas de pista abajo a la izquierda, acciones (solo ícono) encima, pedales a la derecha */
.bus-touch-mode .bus-touch-left { left: max(10px, env(safe-area-inset-left)); bottom: max(10px, env(safe-area-inset-bottom)); gap: 8px; }
.bus-touch-mode .bus-touch-left button { width: 58px; height: 58px; border-radius: 14px; }
.bus-touch-mode .bus-touch-left svg { width: 26px; height: 26px; }
.bus-touch-mode .bus-touch-mid { left: max(10px, env(safe-area-inset-left)); bottom: calc(max(10px, env(safe-area-inset-bottom)) + 82px); gap: 6px; }
.bus-touch-mode .bus-touch-mid button { width: 44px; height: 44px; border-radius: 12px; }
.bus-touch-mode .bus-touch-mid button > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bus-touch-mode .bus-touch-mid svg { width: 20px; height: 20px; }
.bus-touch-mode .bus-lim-ico { width: 24px; height: 24px; }
.bus-touch-mode .bus-touch-right { right: max(10px, env(safe-area-inset-right)); bottom: max(10px, env(safe-area-inset-bottom)); gap: 8px; }

/* 2.68.1 · Pedales con forma real: freno colgante ancho con goma de estrías horizontales y brazo arriba;
   acelerador de piso (tipo órgano) alto y angosto con estrías verticales y bisagra abajo. Se hunden e
   inclinan según --p (0..1 = cuánto están pisados) y una luz al costado marca la fuerza. */
.bus-touch .bus-pedal, .bus-touch .bus-pedal.on {
  --p: 0; --acc: #5cc8ff; position: relative; display: block; width: 78px; height: 112px; padding: 0;
  border: 0; border-radius: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; overflow: visible;
}
.bus-touch .bus-pedal.brake { --acc: #ffb547; }
.bus-touch .bus-pedal.gas { width: 62px; height: 136px; }
.pedal-pad {
  position: absolute; left: 0; right: 0; bottom: 20px; overflow: hidden; pointer-events: none;
  border: 3px solid #8b949f; border-top-color: #b9c1ca; border-bottom-color: #5d656f;
  box-shadow: inset 0 0 0 1px #000c, inset 0 2px 1px #ffffff30,
    0 calc(7px - var(--p) * 5px) 0 #0a0d12, 0 calc(10px - var(--p) * 6px) 16px #000b;
  transition: transform .07s linear, box-shadow .07s linear, filter .1s;
}
.pedal-pad::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, #ffffff22, transparent 35%, transparent 70%, #00000055); }
.bus-pedal.brake .pedal-pad {
  top: 22px; border-radius: 12px 12px 14px 14px;
  background: repeating-linear-gradient(180deg, #14171c 0 4px, #30353e 4px 6px, #14171c 6px 8px), #14171c;
  transform-origin: 50% -40px;
  transform: perspective(240px) translateY(calc(var(--p) * 5px)) rotateX(calc(var(--p) * -20deg)) scale(calc(1 - var(--p) * .05));
}
.bus-pedal.gas .pedal-pad {
  top: 0; border-radius: 10px 10px 7px 7px;
  background: repeating-linear-gradient(90deg, #14171c 0 5px, #30353e 5px 7px, #14171c 7px 10px), #14171c;
  transform-origin: 50% 100%;
  transform: perspective(260px) rotateX(calc(var(--p) * 26deg));
}
.bus-pedal.on .pedal-pad { border-color: color-mix(in srgb, var(--acc) 55%, #8b949f); filter: brightness(1.08); }
/* Luz de fuerza: sube por el costado del pedal */
.bus-touch .bus-pedal .pedal-pad i {
  position: absolute; z-index: 1; right: 3px; bottom: 3px; left: auto; width: 4px; height: 0; max-height: calc(100% - 6px);
  border-radius: 2px; background: var(--acc); box-shadow: 0 0 8px var(--acc);
}
/* Brazo del freno (cuelga desde arriba) y bisagra del acelerador (abajo) */
.pedal-arm {
  position: absolute; top: 0; left: 50%; width: 12px; height: 26px; margin-left: -6px; border-radius: 4px 4px 0 0; pointer-events: none;
  background: linear-gradient(90deg, #4d555f, #c3cad2 45%, #6b737d); box-shadow: 0 2px 4px #0008;
  transform: translateY(calc(var(--p) * 4px)); transition: transform .07s linear;
}
.pedal-hinge {
  position: absolute; left: 14%; right: 14%; bottom: 15px; height: 8px; border-radius: 4px; pointer-events: none;
  background: linear-gradient(180deg, #c3cad2, #6b737d 60%, #3b424b); box-shadow: 0 2px 3px #000a;
}
.bus-touch .bus-pedal .pedal-lbl {
  position: absolute; left: -6px; right: -6px; bottom: 0; text-align: center; pointer-events: none;
  font: 800 10px/1 var(--f-body); letter-spacing: .8px; color: var(--acc); text-shadow: 0 1px 2px #000, 0 0 6px #000;
}
.bus-touch-mode .bus-pedal.brake { width: 78px; height: 104px; }
.bus-touch-mode .bus-pedal.gas { width: 62px; height: 128px; }

/* Franja de abajo: tablero y consola entre las flechas y los pedales */
.bus-touch-mode .bus-bottom { gap: 8px; padding: 0 calc(max(10px, env(safe-area-inset-right)) + 158px) max(10px, env(safe-area-inset-bottom)) calc(max(10px, env(safe-area-inset-left)) + 132px); }
.bus-touch-mode .bus-cluster { flex: none; padding: 4px 8px 4px 4px; }
.bus-touch-mode .bus-gauge { width: 64px; height: 64px; }
.bus-touch-mode .bus-gauge-svg text { font-size: 13px; }
.bus-touch-mode .bus-gauge .bus-speed-num { bottom: 4px; }
.bus-touch-mode .bus-gauge .bus-speed-num strong { font-size: 12px; }
.bus-touch-mode .bus-limit { width: 30px; height: 30px; border-width: 4px; font-size: 11px; }
.bus-touch-mode .bus-cluster-side { gap: 5px; }
.bus-touch-mode .bus-tells { grid-template-columns: repeat(3, 16px); gap: 3px; }
.bus-touch-mode .bus-tells i { width: 16px; height: 16px; border-radius: 4px; }
.bus-touch-mode .bus-tells svg { width: 12px; height: 12px; }
.bus-touch-mode .bus-next { flex: 1 1 auto; width: auto; min-width: 0; max-width: 420px; gap: 2px; padding: 6px 10px; border-radius: 13px; }
.bus-touch-mode .bus-next::after { inset: 3px; border-radius: 10px; }
.bus-touch-mode .bus-next-head { padding-bottom: 2px; }
.bus-touch-mode .bus-next-head .bus-label { font-size: 8.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bus-touch-mode .bus-next-badge { padding: 0 6px; font-size: 10.5px; }
.bus-touch-mode .bus-next strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bus-touch-mode .bus-next-row { flex-wrap: nowrap; gap: 4px; overflow: hidden; }
.bus-touch-mode .bus-next-row > span:not(:empty) { flex: none; padding: 1px 5px; border-radius: 5px; font-size: 10.5px; white-space: nowrap; }
.bus-touch-mode .bus-next .taxi-meter { padding: 1px 7px; gap: 5px; }
.bus-touch-mode .bus-next .taxi-meter small { font-size: 7px; }
.bus-touch-mode .bus-next .taxi-meter b { font-size: 13px; }
.bus-touch-mode .bus-next .bus-hint { min-height: 0; padding-top: 3px; font-size: 11px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bus-touch-mode .bus-next .bus-hint:empty { display: none; }
/* Muy angosto (≤ 700 px): sin las luces testigo, la consola necesita el espacio */
@media (max-width: 700px) { .bus-touch-mode .bus-tells { display: none; } .bus-touch-mode .bus-touch-mid button { width: 40px; height: 40px; } }
/* Viajando de pasajero: no hay tablero ni flechas; la consola llega hasta los botones de Timbre y Bajarse */
.bus-ride-mode.bus-touch-mode .bus-bottom { justify-content: flex-start; padding-left: max(10px, env(safe-area-inset-left)); padding-right: 330px; }
@media (max-width: 720px) { .bus-ride-mode.bus-touch-mode .bus-bottom { padding-right: 260px; } }
