/* =====================================================================
   v8 · HORÓMETRO AJUSTADO, CLIMA NOCTURNO, INCLINACIÓN, DESPLAZAMIENTO,
        PIEZAS INTERCAMBIABLES (Bônus 04)
   ===================================================================== */
/* ---------- Horómetro del tablero: sin desbordes ---------- */
.lcd { width: 512px; }
.lcd-row { grid-template-columns: 96px minmax(122px, 1fr) 96px 148px; gap: 7px; }
.lcd-side { min-width: 0; }
.lcd-side .hm-row { display: grid; grid-template-columns: 12px minmax(0, 1fr) 8px 18px 18px; align-items: center; gap: 3px; padding: 3px 4px; min-width: 0; }
.lcd-side .hm-row .hg { width: 12px; height: 12px; }
.lcd-side .hm-row b { font-size: 13px; letter-spacing: .03em; white-space: nowrap; overflow: hidden; }
.lcd-side .hm-row > i { font-size: 9px; }
.lcd-side .hm-btn { width: 18px; height: 18px; }
.lcd-side .hm-btn svg { width: 9px; height: 9px; }
.lcd-side .lb.flow { min-width: 0; white-space: nowrap; }
.lcd-side .lb.flow b { font-size: 13px; }
@media (max-width: 1350px) { .lcd { width: 462px; } .lcd-row { grid-template-columns: 78px minmax(122px, 1fr) 78px 140px; gap: 7px; } }

/* ---------- Velocidad e inclinómetro en la pantalla ---------- */
.lcd-spd, .lcd-incl { font-size: 10px; color: #5d7a94; letter-spacing: .04em; white-space: nowrap; }
.lcd-spd.on { color: #9fd36a; }
.lcd-incl.on { color: #ffc414; }
.lcd-incl.warn { color: #ff5a4f; animation: inclBlink .7s steps(2) infinite; }
@keyframes inclBlink { 50% { opacity: .35; } }

/* ---------- Opciones del tablero: 12 botones en 2 filas ---------- */
.dash-opts { grid-template-columns: repeat(6, 32px); }
#oSlope { font-size: 11px; letter-spacing: 0; }
.dopt[data-opt="slope"].on { color: #ffc414; border-color: rgba(255,196,20,.6); }
.dopt[data-opt="parts"] svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.dopt[data-opt="parts"].on { color: #48bfff; border-color: rgba(72,191,255,.6); box-shadow: inset 0 0 8px rgba(72,191,255,.2), 0 2px 0 #0e0f10; }
@media (max-width: 1350px) { .dash-opts { grid-template-columns: repeat(4, 30px); } }

/* ---------- Selector de inclinación (4 opciones reales) ---------- */
.slope-pop { gap: 4px; border-radius: 14px; }
.slbtn { width: 52px; height: 38px; padding: 2px 0 0; border-radius: 10px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  background: #1c1f23; border: 1px solid var(--line-soft); color: var(--text-dim); font-family: var(--mono); }
.slbtn b { font-size: 13px; color: var(--text); font-weight: 600; }
.slbtn small { font-size: 7px; letter-spacing: .06em; color: var(--text-faint); white-space: nowrap; }
.slbtn:hover { border-color: var(--accent); }
.slbtn.on { border-color: var(--accent); background: rgba(255,196,20,.14); }
.slbtn.on b { color: var(--accent); }
.slbtn.lim small { color: #ff8a7f; }
.slbtn.lim.on { border-color: #ff5a4f; background: rgba(255,90,79,.14); } .slbtn.lim.on b { color: #ff5a4f; }

/* ---------- Clima nocturno ---------- */
.wxbtn[data-wx="night"].on { color: #6f8cff; border-color: rgba(111,140,255,.7); box-shadow: 0 0 12px rgba(111,140,255,.35); }
body[data-wx="night"] { background: radial-gradient(ellipse at 50% 38%, #1d2230 0%, #11141c 45%, #08090d 80%, #040506 100%); }

/* ---------- Informe: aviso de m³ ---------- */
.krep.flash { animation: krepFlash .9s ease-out; }
@keyframes krepFlash { 0% { box-shadow: 0 0 0 0 rgba(69,212,131,.9); color: #45d483; } 100% { box-shadow: 0 0 0 14px rgba(69,212,131,0); } }

/* ---------- Panel de piezas intercambiables ---------- */
#partsPanel { display: none; position: fixed; z-index: 72; left: 50%; bottom: 196px; transform: translateX(-50%); width: min(690px, calc(100vw - 120px));
  padding: 10px 12px 10px; border-radius: 14px; background: rgba(18,20,23,.96); border: 1px solid var(--line-soft); box-shadow: 0 14px 40px rgba(0,0,0,.65);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
#partsPanel.show { display: block; animation: ppIn .22s ease-out; }
@keyframes ppIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
.pp-h { display: flex; align-items: center; gap: 8px; padding-bottom: 7px; margin-bottom: 6px; border-bottom: 1px solid var(--line-faint); }
.pp-h svg { width: 16px; height: 16px; fill: none; stroke: #48bfff; stroke-width: 1.8; }
.pp-h b { font-family: var(--mono); font-size: 11px; letter-spacing: .16em; color: var(--text); }
.pp-h small { font-family: var(--mono); font-size: 8.5px; letter-spacing: .14em; color: var(--text-faint); }
.pp-x { margin-left: auto; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-soft); background: none; color: var(--text-dim); cursor: pointer; font-size: 15px; line-height: 1; }
.pp-x:hover { color: var(--accent); border-color: var(--accent); }
.pp-g { display: grid; grid-template-columns: 88px 1fr; gap: 8px; align-items: center; padding: 4px 0; }
.pp-g > span { font-family: var(--mono); font-size: 8.5px; letter-spacing: .12em; color: var(--text-faint); line-height: 1.25; }
.pp-row { display: flex; flex-wrap: wrap; gap: 5px; }
.ppb { width: 84px; min-height: 62px; padding: 5px 3px 4px; border-radius: 10px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: #1c1f23; border: 1px solid var(--line-soft); color: var(--text-dim); transition: border-color .15s, background .15s; }
.ppb svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ppb b { font-size: 9.5px; line-height: 1.12; font-weight: 600; text-align: center; color: var(--text); }
.ppb small { font-family: var(--mono); font-size: 8px; color: var(--text-faint); }
.ppb:hover { border-color: #48bfff; color: #48bfff; }
.ppb.on { border-color: var(--accent); background: rgba(255,196,20,.12); color: var(--accent); }
.ppb.on small { color: var(--accent); }
.pp-f { margin-top: 6px; padding-top: 7px; border-top: 1px solid var(--line-faint); font-size: 11px; line-height: 1.4; color: var(--text-dim); min-height: 30px; }
.pp-f b { color: var(--text); } .pp-f span { color: var(--text-faint); }
@media (max-height: 760px) { #partsPanel { bottom: 170px; } .ppb { min-height: 54px; width: 78px; } }

/* ---------- Barra izquierda sin ojo: 5 pestañas ---------- */
.tabs { grid-template-columns: repeat(5, minmax(0, 1fr)); }
