/* LaixePro 3D Simulator Co-Pilot, RPM & Clutch Pod, Auto-Drive & Sat Hach Vien HUD */
.lx-sim-only {
  font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  pointer-events: none;
}
.lx-sim-only button,
.lx-sim-only a,
.lx-sim-only select {
  pointer-events: auto;
}

#hud-tour-clutch,
#hud-tour-pedals {
  opacity: 0.96 !important;
}

.lx-sim-guide-pulse {
  outline: 2.5px solid #10b981 !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.3), 0 0 22px rgba(16, 185, 129, 0.55) !important;
  border-radius: 14px !important;
  /* LX-082: KHONG lam hoat hinh box-shadow nua. Do 29/11 trong luc dang lai:
     lxSimPulse la hieu ung vo tan DUY NHAT lam hoat hinh thuoc tinh phai VE LAI
     (box-shadow mo 28px) — moi khung hinh deu ve lai, ngay tren khung 3D. Vong
     sang ben ngoai gio dung yen (ve 1 lan); phan nhap nhay chuyen sang ::after
     ben duoi, chi doi opacity => GPU tu xu ly, khong ve lai. */
}
.lx-sim-guide-pulse-neo { position: relative !important; }
.lx-sim-guide-pulse::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  /* inset de nam TRONG nut: #hud-tour-brake co overflow:hidden, ve ra ngoai se bi cat */
  box-shadow: inset 0 0 0 3px rgba(16, 185, 129, 0.6), inset 0 0 18px rgba(16, 185, 129, 0.5);
  opacity: 0.25;
  animation: lxSimPulseOp 1.35s ease-in-out infinite;
  will-change: opacity;
}
@keyframes lxSimPulseOp {
  0%, 100% { opacity: 0.25; }
  50%      { opacity: 1; }
}
@keyframes lxSimPulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25), 0 0 14px rgba(16, 185, 129, 0.45); }
  50%      { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.48), 0 0 28px rgba(16, 185, 129, 0.78); }
}

/* Top-Center Live Startup & Driving Co-Pilot */
#lx-copilot-bar {
  position: fixed;
  top: 66px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 42;
  width: min(540px, calc(100vw - 24px));
  background: rgba(10, 17, 32, 0.91);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(56, 189, 248, 0.34);
  border-radius: 14px;
  padding: 9px 14px;
  color: #f8fafc;
  box-shadow: 0 12px 32px rgba(2, 6, 23, 0.55);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
#lx-copilot-bar.is-emergency {
  background: rgba(127, 29, 29, 0.94);
  border-color: #f87171;
  box-shadow: 0 0 28px rgba(239, 68, 68, 0.6);
}
#lx-copilot-bar.is-auto {
  border-color: #10b981;
  box-shadow: 0 0 22px rgba(16, 185, 129, 0.35);
}
#lx-copilot-bar.is-compact {
  width: auto;
  max-width: calc(100vw - 24px);
  padding: 6px 12px;
  border-radius: 999px;
  border-color: rgba(148, 163, 184, 0.28);
}

/* Prominent Landmark Proximity Callout Banner */
#lx-landmark-callout {
  position: fixed;
  top: 132px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 43;
  width: min(560px, calc(100vw - 24px));
  display: none;
  background: linear-gradient(135deg, rgba(180, 83, 9, 0.96), rgba(146, 64, 14, 0.96));
  border: 2px solid #fbbf24;
  border-radius: 14px;
  padding: 10px 14px;
  color: #ffffff;
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.55);
  animation: lxLandmarkGlow 1.15s ease-in-out infinite;
}
#lx-landmark-callout.open { display: block; }
#lx-landmark-callout.is-success {
  background: linear-gradient(135deg, rgba(6, 95, 70, 0.96), rgba(4, 120, 87, 0.96));
  border-color: #34d399;
  box-shadow: 0 0 26px rgba(16, 185, 129, 0.5);
}
@keyframes lxLandmarkGlow {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50%      { transform: translateX(-50%) scale(1.015); }
}
.lx-lm-title {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #fde68a;
}
#lx-landmark-callout.is-success .lx-lm-title { color: #a7f3d0; }
.lx-lm-desc {
  font-size: 12.5px;
  font-weight: 600;
  margin-top: 2px;
  color: #ffffff;
  line-height: 1.38;
}

.lx-cp-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.lx-cp-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.32;
}
.lx-cp-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.lx-cp-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(30, 41, 59, 0.92);
  color: #f8fafc;
  cursor: pointer;
  white-space: nowrap;
}
.lx-cp-btn:hover { background: rgba(51, 65, 85, 0.96); }
.lx-cp-btn-primary {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: #34d399;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.35);
}
.lx-cp-btn-amber {
  background: rgba(245, 158, 11, 0.24);
  border-color: rgba(245, 158, 11, 0.6);
  color: #fde68a;
}
.lx-cp-btn-danger {
  background: rgba(220, 38, 38, 0.88);
  border-color: #f87171;
  color: #ffffff;
}
.lx-cp-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}
.lx-step-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #cbd5e1;
}
.lx-step-chip.done {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.55);
  color: #6ee7b7;
}
.lx-step-chip.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #ffffff;
}
.lx-kbd {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 5px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.45);
  color: #fde047;
}

/* Bottom-Left Live RPM Tachometer, Clutch Bar & Direct Gear Selector */
#lx-rpm-pod {
  position: fixed;
  bottom: 185px;
  left: 12px;
  z-index: 41;
  width: 262px;
  background: rgba(10, 17, 32, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 13px;
  padding: 9px 11px;
  color: #f8fafc;
  box-shadow: 0 10px 26px rgba(2, 6, 23, 0.52);
}
.lx-rpm-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.lx-rpm-val {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 17px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #38bdf8;
}
.lx-rpm-meta {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  color: #cbd5e1;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.lx-tx-toggle {
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid rgba(99, 102, 241, 0.55);
  background: rgba(59, 130, 246, 0.22);
  color: #e0f2fe;
  font-family: inherit;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  line-height: 1.2;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.lx-tx-toggle:hover {
  background: rgba(16, 185, 129, 0.3);
  border-color: #34d399;
  color: #ffffff;
}
.lx-rpm-track {
  position: relative;
  height: 9px;
  margin-top: 5px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.95);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.lx-rpm-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e 0%, #38bdf8 48%, #f59e0b 78%, #ef4444 100%);
  transition: width 0.08s linear;
}
.lx-tel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-top: 6px;
  font-size: 10.5px;
  font-weight: 700;
}
.lx-tel-pill {
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #94a3b8;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.lx-tel-pill.gas-on   { background: rgba(16, 185, 129, 0.25); border-color: #10b981; color: #6ee7b7; }
.lx-tel-pill.brake-on { background: rgba(239, 68, 68, 0.28); border-color: #ef4444; color: #fca5a5; }
.lx-tel-pill.sig-on   { background: rgba(245, 158, 11, 0.28); border-color: #f59e0b; color: #fde047; animation: lxBlink 0.6s infinite; }
.lx-tel-pill.gear-on  { background: rgba(59, 130, 246, 0.24); border-color: #60a5fa; color: #bfdbfe; }
.lx-tel-pill[data-sig] { cursor: pointer; user-select: none; pointer-events: auto; }
.lx-audio-strip {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 4px;
  margin-top: 6px;
}
.lx-audio-btn {
  padding: 4px 5px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 800;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(30, 41, 59, 0.88);
  color: #e2e8f0;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.lx-audio-btn.is-on  { background: rgba(16, 185, 129, 0.22); border-color: rgba(52, 211, 153, 0.55); color: #a7f3d0; }
.lx-audio-btn.is-off { background: rgba(239, 68, 68, 0.22); border-color: rgba(248, 113, 113, 0.52); color: #fecaca; }
.lx-audio-btn.is-neutral { background: rgba(51, 65, 85, 0.9); border-color: rgba(148, 163, 184, 0.45); color: #e2e8f0; }
.lx-mobile-tools-strip {
  grid-template-columns: 1fr 1fr;
  margin-top: 5px;
}

#lx-lobby-mobile-banner {
  position: fixed;
  bottom: 10px;
  left: 8px;
  right: 8px;
  z-index: 45;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 13px;
  background: rgba(10, 17, 32, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #f8fafc;
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.6);
  max-width: 560px;
  margin: 0 auto;
}
#lx-lobby-mobile-banner.is-webview {
  border-color: rgba(245, 158, 11, 0.72);
  background: linear-gradient(135deg, rgba(69, 26, 3, 0.95), rgba(15, 23, 42, 0.95));
}
.lx-lmb-body { flex: 1; min-width: 0; }
.lx-lmb-title { font-size: 12.5px; font-weight: 800; color: #f8fafc; line-height: 1.3; }
.lx-lmb-sub { font-size: 11px; color: #cbd5e1; margin-top: 3px; line-height: 1.35; }
.lx-lmb-close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(30, 41, 59, 0.9);
  color: #e2e8f0;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.lx-sim-mobile-active {
  overscroll-behavior: none;
}
body.lx-sim-mobile-active canvas,
body.lx-sim-mobile-active #hud-tour-pedals,
body.lx-sim-mobile-active #hud-tour-pedals button,
body.lx-sim-mobile-active #hud-tour-brake,
body.lx-sim-mobile-active #hud-tour-clutch,
body.lx-sim-mobile-active #hud-tour-clutch > div,
body.lx-sim-mobile-active #hud-tour-gear,
body.lx-sim-mobile-active #hud-tour-gear button,
body.lx-sim-mobile-active button[aria-label="Đánh lái trái"],
body.lx-sim-mobile-active button[aria-label="Đánh lái phải"] {
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
@keyframes lxBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.42; }
}

/* Direct Gear Buttons & 3-Step Visual MT Clutch Presets */
.lx-gear-strip {
  display: flex;
  gap: 4px;
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}
.lx-gear-btn {
  flex: 1;
  padding: 4px 0;
  border-radius: 6px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 800;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(30, 41, 59, 0.88);
  color: #cbd5e1;
  cursor: pointer;
  text-align: center;
}
.lx-gear-btn.active {
  background: #2563eb;
  border-color: #60a5fa;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.45);
}
.lx-clutch-box {
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}
.lx-clutch-zones {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 3px;
  margin-top: 4px;
}
.lx-clutch-preset {
  padding: 4px 2px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(30, 41, 59, 0.86);
  color: #e2e8f0;
  cursor: pointer;
  text-align: center;
}
.lx-clutch-preset.is-full.active { background: rgba(239, 68, 68, 0.35); border-color: #f87171; color: #fecaca; }
.lx-clutch-preset.is-bite.active { background: rgba(245, 158, 11, 0.35); border-color: #fbbf24; color: #fde68a; }
.lx-clutch-preset.is-free.active { background: rgba(16, 185, 129, 0.32); border-color: #34d399; color: #a7f3d0; }

/* Top-Right Sát Hạch Viên, Thầy Chỉ Điểm Canh & Xe Mẫu Tự Lái Panel */
#lx-coach-panel {
  position: fixed;
  top: 66px;
  right: 12px;
  z-index: 42;
  width: 344px;
  max-width: calc(100vw - 24px);
  background: rgba(10, 17, 32, 0.91);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  color: #f8fafc;
  box-shadow: 0 12px 32px rgba(2, 6, 23, 0.55);
  overflow: hidden;
}
#lx-coach-panel.is-minimized { width: auto; }
.lx-coach-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 10px;
  background: rgba(15, 23, 42, 0.94);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}
.lx-mode-tabs {
  display: inline-flex;
  gap: 3px;
  background: rgba(30, 41, 59, 0.9);
  padding: 2px;
  border-radius: 8px;
}
.lx-mode-tab {
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.lx-mode-tab.active {
  background: #2563eb;
  color: #ffffff;
}
.lx-coach-body {
  padding: 9px 11px;
  font-size: 12px;
  line-height: 1.44;
  max-height: 50vh;
  overflow-y: auto;
}
.lx-lesson-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 7px;
}
.lx-lesson-title {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
}
.lx-coach-block {
  margin-bottom: 6px;
  padding: 7px 9px;
  border-radius: 9px;
  background: rgba(30, 41, 59, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.16);
}
.lx-coach-block strong {
  display: block;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 3px;
  color: #6ee7b7;
}
.lx-coach-block.warn strong { color: #fca5a5; }
.lx-coach-block.cmd strong  { color: #93c5fd; }
.lx-coach-block.fix strong  { color: #fde047; }
.lx-coach-block b {
  color: #ffffff;
  font-weight: 700;
}
.lx-step-list,
.lx-fix-list {
  margin: 4px 0 0 0;
  padding-left: 16px;
}
.lx-step-list li,
.lx-fix-list li {
  margin-bottom: 4px;
  line-height: 1.45;
  color: #e2e8f0;
}
.lx-step-list li:last-child,
.lx-fix-list li:last-child {
  margin-bottom: 0;
}

.lx-auto-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.92);
}
.lx-auto-select {
  flex: 1;
  min-width: 0;
  background: #1e293b;
  color: #f8fafc;
  border: 1px solid #334155;
  border-radius: 7px;
  padding: 4px 6px;
  font-size: 11px;
  font-weight: 600;
}
.lx-coach-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  padding: 7px 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.85);
}

/* Keymap + Hotline Modal [H] */
#lx-keymap-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  pointer-events: auto;
}
#lx-keymap-modal.open { display: flex; }
.lx-km-card {
  width: min(720px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: #0f172a;
  color: #f8fafc;
  border: 1px solid rgba(59, 130, 246, 0.45);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
}
.lx-km-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin: 12px 0;
}
.lx-km-box {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 12.5px;
  line-height: 1.65;
}
html[data-lx-page] #lx-keymap-modal h3 { color: #ffffff !important; }
html[data-lx-page] #lx-keymap-modal .lx-km-box h4 {
  font-size: 11.5px;
  font-weight: 800;
  color: #60a5fa !important;
  text-transform: uppercase;
  margin: 0 0 6px 0;
}

/* Detailed Instructor Guide Modal (#lx-guide-modal) */
#lx-guide-modal {
  position: fixed;
  inset: 0;
  z-index: 91;
  background: rgba(2, 6, 23, 0.76);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  pointer-events: auto;
}
#lx-guide-modal.open { display: flex; }
.lx-gm-card {
  width: min(760px, 100%);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: #0f172a;
  color: #f8fafc;
  border: 1px solid rgba(52, 211, 153, 0.45);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75);
}
.lx-gm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.lx-gm-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}
.lx-gm-tab {
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(30, 41, 59, 0.9);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.lx-gm-tab.active {
  background: #2563eb;
  border-color: #60a5fa;
  color: #ffffff;
}
.lx-gm-select {
  margin-left: auto;
  max-width: 220px;
  background: #1e293b;
  color: #f8fafc;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 600;
}
.lx-gm-body {
  flex: 1;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.52;
  padding-right: 4px;
}
.lx-gm-body .lx-coach-block {
  padding: 10px 12px;
  margin-bottom: 8px;
}
.lx-gm-body .lx-coach-block strong {
  font-size: 11.5px;
  margin-bottom: 4px;
}
html[data-lx-page] #lx-guide-modal h3,
html[data-lx-page] #lx-guide-modal .lx-lesson-title {
  color: #ffffff !important;
}
html[data-lx-page] #lx-guide-modal h4 {
  color: #60a5fa !important;
}
html[data-lx-page] #lx-guide-modal li,
html[data-lx-page] #lx-guide-modal .lx-gm-body div {
  color: #e2e8f0;
}
.lx-hotline-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(37, 99, 235, 0.18));
  border: 1px solid rgba(16, 185, 129, 0.45);
  border-radius: 12px;
  padding: 10px 14px;
  margin-top: 8px;
}

/* Mobile-Compact Mini Pills for RPM Pod & Coach Panel */
#lx-rpm-pod.is-minimized {
  width: auto;
  padding: 4px 5px;
  border-radius: 10px;
}
.lx-rpm-mini {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.lx-rpm-mini-open {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  font-size: 11px;
}
.lx-rpm-mini-val {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.lx-rpm-mini-gear {
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(37, 99, 235, 0.35);
  border: 1px solid #60a5fa;
  color: #dbeafe;
  font-size: 10.5px;
  font-weight: 800;
}
.lx-rpm-mini-mute {
  padding: 4px 7px;
  font-size: 12px;
}
.lx-rpm-mini-mute.is-on  { background: rgba(16, 185, 129, 0.28); border-color: rgba(52, 211, 153, 0.65); }
.lx-rpm-mini-mute.is-off { background: rgba(239, 68, 68, 0.28); border-color: rgba(248, 113, 113, 0.65); }
.lx-rpm-min-btn {
  padding: 2px 6px;
  font-size: 11px;
  line-height: 1.2;
}
.lx-coach-mini {
  padding: 4px 5px;
  gap: 4px;
}

/* Mobile Portrait (e.g. 390x844) */
@media (max-width: 768px) and (min-height: 521px) {
  #lx-copilot-bar {
    top: 84px;
    width: calc(100vw - 16px);
    padding: 6px 9px;
    border-radius: 11px;
  }
  #lx-copilot-bar .lx-cp-top { gap: 6px; flex-wrap: nowrap; }
  #lx-copilot-bar .lx-cp-title { font-size: 11px; line-height: 1.25; }
  #lx-copilot-bar .lx-cp-btn { padding: 4px 7px; font-size: 10.5px; }
  #lx-copilot-bar button[data-act="keymap"],
  #lx-copilot-bar .lx-cp-steps { display: none; }

  #lx-landmark-callout {
    top: 184px;
    width: calc(100vw - 16px);
    padding: 7px 10px;
  }

  #lx-rpm-pod.is-minimized {
    top: 144px;
    bottom: auto;
    left: 8px;
    z-index: 43;
  }
  #lx-coach-panel.is-minimized {
    top: 144px;
    right: 8px;
    z-index: 43;
  }

  #lx-rpm-pod:not(.is-minimized) {
    top: 184px;
    bottom: auto;
    left: 8px;
    width: min(296px, calc(100vw - 16px));
    max-height: calc(100vh - 340px);
    overflow-y: auto;
    z-index: 46;
    padding: 8px 10px;
  }
  .lx-rpm-val { font-size: 14px; }

  #lx-coach-panel:not(.is-minimized) {
    top: 184px;
    left: 8px;
    right: 8px;
    width: auto;
    max-height: calc(100vh - 340px);
    display: flex;
    flex-direction: column;
    z-index: 46;
  }
  #lx-coach-panel:not(.is-minimized) .lx-coach-body {
    max-height: none;
    flex: 1;
    min-height: 0;
  }

  #hud-tour-center-control {
    transform: none !important;
  }
}

/* Touch-Friendly Enlarged Native Controls (Mobile & Touch Devices) */
@media (max-width: 900px), (max-height: 520px) {
  body.lx-sim-mobile-active #hud-tour-pedals {
    gap: 10px !important;
  }
  body.lx-sim-mobile-active #hud-tour-brake {
    min-width: 54px !important;
    width: 54px !important;
    min-height: 82px !important;
    height: 82px !important;
    font-size: 11px !important;
  }
  body.lx-sim-mobile-active #hud-tour-pedals > button:last-child {
    min-width: 56px !important;
    width: 56px !important;
    min-height: 98px !important;
    height: 98px !important;
    font-size: 12px !important;
  }
  body.lx-sim-mobile-active button[aria-label="Đánh lái trái"],
  body.lx-sim-mobile-active button[aria-label="Đánh lái phải"] {
    min-width: 52px !important;
    min-height: 48px !important;
  }
  body.lx-sim-mobile-active #hud-tour-clutch > div {
    min-width: 44px !important;
  }
  body.lx-sim-mobile-active #hud-tour-gear > button {
    min-width: 48px !important;
    min-height: 44px !important;
  }
}

/* Mobile Landscape (e.g. 844x390) */
@media (max-height: 500px), (max-width: 900px) and (max-height: 520px) {
  #lx-copilot-bar {
    top: 44px;
    width: min(410px, calc(100vw - 380px));
    padding: 4px 9px;
    border-radius: 10px;
  }
  #lx-copilot-bar .lx-cp-top { gap: 6px; flex-wrap: nowrap; }
  #lx-copilot-bar .lx-cp-title { font-size: 11px; line-height: 1.2; }
  #lx-copilot-bar .lx-cp-btn { padding: 3px 7px; font-size: 10.5px; }
  #lx-copilot-bar button[data-act="keymap"],
  #lx-copilot-bar .lx-cp-steps { display: none; }

  #lx-landmark-callout {
    top: 90px;
    width: min(440px, calc(100vw - 220px));
    padding: 6px 10px;
  }

  #lx-rpm-pod.is-minimized {
    top: 44px;
    bottom: auto;
    left: 10px;
    z-index: 43;
  }
  #lx-coach-panel.is-minimized {
    top: 44px;
    right: 10px;
    z-index: 43;
  }

  #lx-rpm-pod:not(.is-minimized) {
    top: 90px;
    bottom: auto;
    left: 10px;
    width: 256px;
    max-height: calc(100vh - 196px);
    overflow-y: auto;
    z-index: 46;
    padding: 7px 9px;
  }
  .lx-rpm-val { font-size: 14px; }

  #lx-coach-panel:not(.is-minimized) {
    top: 90px;
    right: 138px;
    width: min(306px, calc(100vw - 154px));
    max-height: calc(100vh - 106px);
    display: flex;
    flex-direction: column;
    z-index: 46;
  }
  #lx-coach-panel:not(.is-minimized) .lx-coach-body {
    max-height: none;
    flex: 1;
    min-height: 0;
  }

  .lx-gm-card {
    padding: 10px 14px;
    max-height: 94vh;
  }
  .lx-gm-head { margin-bottom: 6px; }
  .lx-gm-tabs { margin-bottom: 6px; padding-bottom: 6px; }
}

/* ============================================================
   LX-082 — Bo backdrop-filter tren 3 bang HUD trong luc lai.
   Do 29/11: #lx-copilot-bar blur(12px), #lx-rpm-pod blur(10px),
   #lx-coach-panel blur(12px) — 9% man hinh, nam DE LEN khung 3D
   doi moi khung hinh => GPU phai lam mo lai vung duoi ca 3 bang
   60 lan/giay. Ma nen cua chung DA DUC 90-91%: lop blur chi lo ra
   ~9%, mat gan nhu khong thay. Tra toan bo chi phi de doi lay
   mot hieu ung gan nhu vo hinh. Bo blur, nang nen len 0.95 de
   bu phan 9% vua mat (khung 3D sau lung khong lo ra net qua).
   Giu nguyen blur o cac hop thoai/ban o sanh (nen dung yen, re).
   ============================================================ */
#lx-copilot-bar,
#lx-rpm-pod,
#lx-coach-panel {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: rgba(10, 17, 32, 0.95) !important;
}

/* ============================================================
   LX-083 - Nut dieu khien de bam tren dien thoai (Henry duyet 29/11).
   Do tren 740x360: xi nhan 32x32, cach hang nut lai 4px; xi nhan BAT BUOC
   o bai 1 va nhieu bai => ngon cai nham nut lai de trung xi nhan (bat/tat
   nham = loi tru diem). Nut ENGINE cao 20px.
   Chuan: vung cham >= 44x44 (Apple HIG), hai nut khac chuc nang cach >= 8px.
   Chi doi kich thuoc / khoang cach, khong doi chuc nang.
   ============================================================ */
#hud-tour-center-control button.rounded-full {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
}
#hud-tour-center-control button.rounded-full svg {
  width: 20px !important;
  height: 20px !important;
}
/* Hang xi nhan: tach khoi hang nut lai (truoc 4px). */
#hud-tour-center-control div:has(> button.rounded-full) {
  margin-bottom: 10px !important;
}
/* Nut ENGINE: cao toi thieu 36px (truoc 20px). */
#hud-tour-engine-btn {
  min-height: 36px !important;
  min-width: 56px !important;
}
/* Nut chinh trong dai nhac (vd "Vao So D"): cao toi thieu 32px (truoc 24px). */
#lx-copilot-bar .lx-cp-btn {
  min-height: 32px !important;
}

