/* =========================================================================
   MAP-HUD.CSS — Contenedor del mapa, marco HUD y barra superior
   Sistema NEOBAUHAUS: el lienzo del mapa conserva alto contraste (oscuro);
   todo el chrome de interfaz pasa a panel opaco claro (ver 3.2 del sistema).
   ========================================================================= */

#map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Controles de atribucion/branding para Mapbox y MapLibre */
.mapboxgl-ctrl-logo, .maplibregl-ctrl-logo, .mapboxgl-ctrl-attrib, .maplibregl-ctrl-attrib { filter: grayscale(1) opacity(0.5); }
.mapboxgl-ctrl-attrib, .maplibregl-ctrl-attrib { background: rgba(0, 0, 0, 0.5) !important; padding: 1px 4px !important; font-size: 10px !important; }
.mapboxgl-ctrl-attrib-inner a, .maplibregl-ctrl-attrib-inner a { color: #aaa !important; }
.mapboxgl-popup-tip, .maplibregl-popup-tip { display: none; }
.mapboxgl-canvas, .maplibregl-canvas { outline: none; }

/* ---------- HUD: marco de visor tipo instrumento — marcas de registro de plano ---------- */
.hud-frame { position: absolute; inset: 0; pointer-events: none; z-index: 20; }
.hud-corner { position: absolute; width: 22px; height: 22px; border-color: var(--on-map); opacity: 0.9; }
.hud-corner.tl { top: 8px; left: 8px; border-top: 2px solid; border-left: 2px solid; }
.hud-corner.tr { top: 8px; right: 8px; border-top: 2px solid; border-right: 2px solid; }
.hud-corner.bl { bottom: 8px; left: 8px; border-bottom: 2px solid; border-left: 2px solid; }
.hud-corner.br { bottom: 8px; right: 8px; border-bottom: 2px solid; border-right: 2px solid; }

.hud-crosshair {
  position: absolute; top: 50%; left: 50%; width: 18px; height: 18px;
  transform: translate(-50%, -50%); pointer-events: none; z-index: 20; opacity: 0.7;
}
.hud-crosshair::before, .hud-crosshair::after {
  content: ''; position: absolute; background: var(--on-map);
}
.hud-crosshair::before { top: 50%; left: 0; width: 100%; height: 1px; transform: translateY(-50%); }
.hud-crosshair::after { left: 50%; top: 0; height: 100%; width: 1px; transform: translateX(-50%); }

/* ---------- Barra superior: panel opaco, no degradado sobre el mapa ---------- */
.topbar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 30;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-strong);
  padding: 14px 14px 12px 14px;
}
.topbar-inner {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding-bottom: 10px;
}
/* Barra de navegación inferior móvil y widgets flotantes (Ocultos por defecto en Desktop) */
.mobile-bottom-bar,
.mobile-identity-widget,
.mobile-admin-quickmenu,
.mobile-splash,
.mobile-map-controls {
  display: none !important;
}
.panel-backdrop {
  display: none;
}

/* Ocultar splash screen si ya fue mostrado en la sesión actual */
.splash-already-shown .mobile-splash,
.splash-already-shown .splash-screen,
.splash-already-shown #mobile-splash-screen,
.splash-already-shown #app-splash-screen {
  display: none !important;
}

@media (max-width: 768px) {
  /* Pantalla de Carga Móvil / Splash Screen (Neo-Bauhaus) */
  .mobile-splash {
    display: flex !important;
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 9999 !important;
    background: var(--bg-panel, #F4F1EA) !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease-in-out, visibility 0.4s ease-in-out;
    will-change: opacity;
  }

  body.dark-mode .mobile-splash {
    background: #141411 !important;
  }

  .mobile-splash.splash-hidden {
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
  }

  .mobile-splash-card {
    border: 2px solid var(--border-strong, #141411);
    box-shadow: 4px 4px 0px var(--border-strong, #141411);
    background: var(--bg-panel, #F4F1EA);
    padding: 24px 28px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    max-width: 86vw;
    animation: splashPop 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  }

  @keyframes splashPop {
    from { transform: scale(0.94); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
  }

  body.dark-mode .mobile-splash-card {
    background: #1C1C1A;
  }

  .mobile-splash-kicker {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 800;
    color: var(--accent, #E84E1B);
    letter-spacing: 0.08em;
  }

  .mobile-splash-brand {
    font-family: 'League Spartan', sans-serif !important;
    font-weight: 900;
    font-size: 40px;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--fg, #141411);
    text-transform: lowercase;
  }

  .mobile-splash-dot {
    color: var(--accent, #E84E1B);
  }

  .mobile-splash-bar-wrap {
    width: 140px;
    height: 10px;
    border: 1px solid var(--border-strong, #141411);
    background: var(--bg-raised, #ECE6D8);
    padding: 1px;
    display: flex;
    margin: 4px 0 2px;
    overflow: hidden;
  }

  body.dark-mode .mobile-splash-bar-wrap {
    background: #282825;
  }

  .mobile-splash-bar {
    display: flex;
    width: 100%;
    height: 100%;
    gap: 2px;
  }

  .mobile-splash-block {
    flex: 1;
    background: var(--border-strong, #141411);
    opacity: 0.15;
    animation: splashBlockPulse 1.2s infinite ease-in-out;
  }

  .mobile-splash-block.block-1 { animation-delay: 0s; }
  .mobile-splash-block.block-2 { animation-delay: 0.2s; }
  .mobile-splash-block.block-3 { animation-delay: 0.4s; }
  .mobile-splash-block.block-4 { animation-delay: 0.6s; }

  @keyframes splashBlockPulse {
    0%, 100% {
      opacity: 0.15;
      background: var(--border-strong, #141411);
    }
    50% {
      opacity: 1;
      background: var(--accent, #E84E1B);
    }
  }

  .mobile-splash-status {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 700;
    color: var(--fg-dim, #666);
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }

  .mobile-splash-footer {
    position: absolute;
    bottom: calc(24px + env(safe-area-inset-bottom));
    left: 0;
    right: 0;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--fg-dim, #666666);
    text-transform: uppercase;
    pointer-events: none;
  }

  body.dark-mode .mobile-splash-footer {
    color: #888884;
  }
  /* Lienzo del mapa a pantalla completa sin capas bloqueantes */
  #map {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 1 !important;
  }

  .mapboxgl-canvas-container,
  .maplibregl-canvas-container,
  .mapboxgl-canvas,
  .maplibregl-canvas {
    width: 100% !important;
    height: 100% !important;
    z-index: 1 !important;
  }

  .hud-frame,
  .hud-crosshair {
    display: none !important;
    pointer-events: none !important;
  }

  .mapboxgl-ctrl-bottom-right,
  .maplibregl-ctrl-bottom-right,
  .mapboxgl-ctrl-bottom-left,
  .maplibregl-ctrl-bottom-left {
    bottom: calc(62px + env(safe-area-inset-bottom)) !important;
    z-index: 20 !important;
    pointer-events: none !important;
  }

  .mapboxgl-ctrl-attrib,
  .maplibregl-ctrl-attrib {
    pointer-events: auto !important;
  }

  /* Ocultar barra superior en móviles para maximizar mapa a pantalla completa */
  .topbar {
    display: none !important;
  }

  /* Widget de identidad y sesión flotante en esquina superior izquierda */
  .mobile-identity-widget {
    display: flex !important;
    position: fixed;
    top: max(10px, env(safe-area-inset-top));
    left: 10px;
    z-index: 40;
    align-items: center;
    background: var(--bg-panel, #F4F1EA);
    border: 1px solid var(--border-strong, #141411);
    box-shadow: 2px 2px 0px var(--border-strong, #141411);
    padding: 0;
    font-family: 'JetBrains Mono', monospace;
  }

  body.dark-mode .mobile-identity-widget {
    background: #1C1C1A;
  }

  .mobile-identity-brand {
    font-family: 'League Spartan', sans-serif !important;
    font-weight: 900;
    font-size: 18px;
    line-height: 1;
    color: var(--accent, #E95C0C);
    text-decoration: none;
    letter-spacing: -0.03em;
    padding: 7px 9px 5px 8px;
    display: inline-block;
  }

  .mobile-identity-brand span {
    color: var(--fg, #141411);
  }

  .mobile-identity-btn {
    border: 0;
    border-left: 1px solid var(--border-strong, #141411);
    background: transparent;
    color: var(--fg, #141411);
    padding: 6px 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    touch-action: manipulation;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    transition: background 0.12s ease, color 0.12s ease;
  }

  .mobile-identity-btn:active {
    background: var(--fg, #141411);
    color: var(--bg-panel, #F4F1EA);
  }

  .mobile-identity-btn.user-logged {
    background: var(--bg-raised, #ECE6D8);
    color: var(--accent, #E95C0C);
  }

  .mobile-identity-btn.admin-logged {
    background: #E84E1B !important;
    color: #FFFFFF !important;
    border-left-color: #141411 !important;
  }

  .mobile-admin-quickmenu {
    position: fixed;
    top: calc(max(10px, env(safe-area-inset-top)) + 40px);
    left: 10px;
    z-index: 46;
    background: var(--bg-panel, #F4F1EA);
    border: 1px solid var(--border-strong, #141411);
    box-shadow: 3px 3px 0px var(--border-strong, #141411);
    width: min(280px, calc(100vw - 20px));
    display: flex;
    flex-direction: column;
    padding: 0;
    animation: quickMenuPop 0.15s ease-out;
  }

  .mobile-admin-quickmenu[hidden] {
    display: none !important;
  }

  @keyframes quickMenuPop {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .mobile-admin-quickmenu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: #E84E1B;
    color: #FFFFFF;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.05em;
  }

  .mobile-admin-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 10px;
    border: 0;
    border-bottom: 1px solid var(--border);
    background: transparent;
    color: var(--fg, #141411);
    font-family: 'League Spartan', sans-serif !important;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    touch-action: manipulation;
    text-align: left;
    min-height: 48px;
  }

  .mobile-admin-menu-item:last-child {
    border-bottom: 0;
  }

  .mobile-admin-menu-item:active {
    background: var(--bg-raised);
    color: var(--accent);
  }

  /* Buscador Flotante y Expansivo (Desktop & Móvil) */
  .mobile-search-widget {
    display: flex !important;
    z-index: 45;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .mobile-search-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--bg-panel, #F4F1EA);
    border: 2px solid var(--border-strong, #111111);
    box-shadow: 2px 2px 0px var(--border-strong, #111111);
    color: var(--fg, #111111);
    cursor: pointer;
    touch-action: manipulation;
    border-radius: 0 !important;
    transition: transform 0.08s ease, background 0.12s ease;
  }

  body.dark-mode .mobile-search-trigger,
  body.dark-mode .mobile-search-bar,
  body.dark-mode .mobile-search-dropdown {
    background: #1C1C1A !important;
  }

  .mobile-search-trigger:active {
    transform: scale(0.92);
    background: var(--fg, #141411);
    color: var(--bg-panel, #F4F1EA);
  }

  .mobile-search-widget.collapsed .mobile-search-bar,
  .mobile-search-widget.collapsed .mobile-search-dropdown {
    display: none !important;
  }

  .mobile-search-widget.expanded .mobile-search-trigger {
    display: none !important;
  }

  .mobile-search-bar {
    display: flex;
    align-items: center;
    width: 100%;
    height: 42px;
    background: var(--bg-panel, #F4F1EA);
    border: 2px solid var(--border-strong, #141411);
    box-shadow: 3px 3px 0px var(--border-strong, #141411);
    padding: 0 4px 0 10px;
    gap: 6px;
    animation: searchBarExpand 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
  }

  @keyframes searchBarExpand {
    from { opacity: 0; transform: scaleX(0.85); transform-origin: right center; }
    to { opacity: 1; transform: scaleX(1); }
  }

  .mobile-search-icon {
    color: var(--accent, #E95C0C);
    flex-shrink: 0;
  }

  .mobile-search-input {
    flex: 1;
    height: 100%;
    border: 0;
    background: transparent;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    color: var(--fg, #141411);
    outline: none;
    text-transform: uppercase;
  }

  .mobile-search-input::placeholder {
    font-size: 9.5px;
    color: var(--fg-dim, #888);
  }

  .mobile-search-close {
    width: 32px;
    height: 32px;
    border: 0;
    background: transparent;
    color: var(--fg, #141411);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    touch-action: manipulation;
  }

  .mobile-search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 60vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    background: var(--bg-panel, #F4F1EA);
    border: 2px solid var(--border-strong, #111111);
    box-shadow: 4px 4px 0px var(--border-strong, #111111);
    z-index: 50;
    padding: 10px;
    box-sizing: border-box;
  }

  body.dark-mode .mobile-search-dropdown {
    background: #171715;
    border-color: var(--border-strong, #4E4E48);
    box-shadow: 4px 4px 0px #000000;
  }

  .mobile-search-dropdown[hidden] {
    display: none !important;
  }

  #mobile-search-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .mobile-search-filter-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 14px;
    background: #111111 !important;
    color: #F4F1EA !important;
    border: 2px solid #111111;
    box-shadow: 3px 3px 0px var(--accent, #E84E1B);
    font-family: 'League Spartan', sans-serif !important;
    font-weight: 900 !important;
    font-size: 11.5px !important;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    touch-action: manipulation;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
    box-sizing: border-box;
  }

  .mobile-search-filter-action i {
    color: var(--accent, #E84E1B) !important;
    flex-shrink: 0;
  }

  .mobile-search-filter-action:active {
    background: #1F1F1C !important;
    transform: translate(1px, 1px);
    box-shadow: 2px 2px 0px var(--accent, #E84E1B);
  }

  body.dark-mode .mobile-search-filter-action {
    background: #20201D !important;
    color: #FFFFFF !important;
    border-color: #4E4E48;
    box-shadow: 3px 3px 0px var(--accent, #E84E1B);
  }

  .mobile-search-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 12px 14px;
    border: 2px solid var(--border-strong, #111111);
    box-shadow: 3px 3px 0px var(--border-strong, #111111);
    background: var(--bg-panel, #F8F1DF);
    width: 100%;
    text-align: left;
    cursor: pointer;
    color: var(--fg, #111111);
    touch-action: manipulation;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
    box-sizing: border-box;
    border-radius: 0 !important;
  }

  body.dark-mode .mobile-search-item {
    background: #1C1C19;
    border-color: var(--border-strong, #4E4E48);
    box-shadow: 3px 3px 0px #000000;
    color: var(--fg, #F8F1DF);
  }

  .mobile-search-item:active {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0px var(--border-strong, #111111);
    background: var(--bg-raised, #ECE6D8);
  }

  body.dark-mode .mobile-search-item:active {
    background: #252522;
  }

  .mobile-search-item-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    min-width: 0;
  }

  .mobile-search-item-top-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 1px;
  }

  .mobile-search-cat-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    display: inline-block;
  }

  .mobile-search-item-title {
    font-family: 'League Spartan', sans-serif;
    font-weight: 900;
    font-size: 15px;
    line-height: 1.25;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #111111;
    word-break: break-word;
  }

  body.dark-mode .mobile-search-item-title {
    color: #FFFFFF;
  }

  .mobile-search-item-sub {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 5px;
    font-family: 'Inter', sans-serif;
    font-size: 11.5px;
    line-height: 1.45;
    color: #333333;
    margin-top: 1px;
  }

  body.dark-mode .mobile-search-item-sub {
    color: #C5C5BE;
  }

  .mobile-search-meta-text {
    font-family: 'Inter', sans-serif;
    font-size: 11.5px;
    font-weight: 500;
    color: #333333;
    word-break: break-word;
  }

  body.dark-mode .mobile-search-meta-text {
    color: #C5C5BE;
  }

  @media (min-width: 769px) {
    .mobile-search-widget {
      position: absolute;
      top: 12px;
      right: 18px;
    }
    .mobile-search-widget.expanded {
      width: 440px;
      max-width: calc(100vw - 320px);
    }
  }

  @media (max-width: 768px) {
    .mobile-search-widget {
      position: fixed;
      top: max(10px, env(safe-area-inset-top));
      right: 10px;
    }
    .mobile-search-trigger {
      width: 48px;
      height: 48px;
    }
    .mobile-search-widget.expanded {
      left: 10px;
      right: 10px;
    }
    .mobile-search-bar {
      height: 38px;
    }
  }

  /* Controles Flotantes Derechos (Móvil) */
  .mobile-map-controls {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    bottom: calc(68px + env(safe-area-inset-bottom)) !important;
    right: 14px;
    z-index: 42;
    gap: 10px;
    pointer-events: auto;
  }

  .mobile-float-btn {
    width: 48px;
    height: 48px;
    background: var(--bg-panel, #F4F1EA);
    border: 2px solid var(--border-strong, #111111);
    box-shadow: 2px 2px 0px var(--border-strong, #111111);
    border-radius: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--fg, #111111);
    cursor: pointer;
    touch-action: manipulation;
    transition: transform 0.08s ease, background 0.12s ease, color 0.12s ease;
  }

  .mobile-float-btn svg {
    width: 20px !important;
    height: 20px !important;
    stroke: currentColor !important;
    stroke-width: 2px !important;
    fill: none !important;
    display: block !important;
    flex-shrink: 0;
  }

  body.dark-mode .mobile-float-btn {
    background: #1C1C1A;
  }

  .mobile-float-btn:active {
    transform: scale(0.92);
    background: var(--fg, #111111);
    color: var(--bg-panel, #F4F1EA);
  }

  .mobile-float-btn.active-state {
    color: var(--accent, #E84E1B) !important;
    border-color: var(--accent, #E84E1B) !important;
    background: var(--bg-panel, #F4F1EA) !important;
  }

  /* Botón de Acción Primaria Flotante [+] (Añadir Proyecto) */
  .mobile-float-btn-primary {
    background-color: var(--accent, #E84E1B) !important;
    color: #FFFFFF !important;
    border: 2px solid var(--border-strong, #111111) !important;
    box-shadow: 2px 2px 0px var(--border-strong, #111111) !important;
  }

  .mobile-float-btn-primary svg {
    color: #FFFFFF !important;
    stroke: #FFFFFF !important;
    transition: transform 0.15s ease, stroke 0.12s ease;
  }

  .mobile-float-btn-primary:active {
    transform: scale(0.92);
    background-color: #111111 !important;
    color: #FFFFFF !important;
  }

  .mobile-float-btn-primary.active-state {
    background-color: #111111 !important;
    border-color: var(--accent, #E84E1B) !important;
    box-shadow: 2px 2px 0px var(--accent, #E84E1B) !important;
  }

  .mobile-float-btn-primary.active-state svg {
    color: var(--accent, #E84E1B) !important;
    stroke: var(--accent, #E84E1B) !important;
    transform: rotate(45deg);
  }

  .mobile-bottom-bar {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 45;
    background: var(--bg-panel, #F4F1EA);
    border-top: 2px solid var(--border-strong, #141411);
    padding-bottom: max(6px, env(safe-area-inset-bottom));
    min-height: 56px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
  }

  .mobile-nav-btn {
    flex: 1;
    min-height: 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: 0;
    border-right: 1px solid var(--border, #141411);
    background: transparent !important;
    color: var(--fg, #141411);
    font-family: 'League Spartan', sans-serif !important;
    font-weight: 800;
    font-size: 10px;
    line-height: 1;
    letter-spacing: 0.04em;
    cursor: pointer;
    touch-action: manipulation;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.08s ease, color 0.12s ease;
  }

  .mobile-nav-btn:last-child {
    border-right: 0;
  }

  .mobile-nav-btn:active {
    transform: scale(0.92);
  }

  .mobile-nav-btn.active {
    background: transparent !important;
    color: var(--accent, #E84E1B) !important;
  }

  .mobile-nav-btn.active i,
  .mobile-nav-btn.active svg {
    color: var(--accent, #E84E1B) !important;
    stroke: var(--accent, #E84E1B) !important;
  }

  .mobile-nav-btn.active span {
    color: var(--accent, #E84E1B) !important;
    font-weight: 900 !important;
  }

  /* Botón Central Destacado Neo-Bauhaus (MI RADAR) */
  .mobile-nav-radar-btn {
    position: relative;
    font-weight: 900 !important;
  }

  .radar-btn-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 24px;
    background: var(--bg-raised, #ECE6D8);
    border: 1px solid var(--border-strong, #141411);
    box-shadow: 1px 1px 0px var(--border-strong, #141411);
    color: var(--fg, #141411);
    margin-bottom: 2px;
    transition: all 0.12s ease;
  }

  body.dark-mode .mobile-bottom-bar {
    background: var(--bg-panel, #1c1c1a) !important;
    border-top-color: var(--border-strong, #4E4E48) !important;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.4) !important;
  }

  body.dark-mode .mobile-nav-btn {
    color: var(--fg, #F8F1DF) !important;
    border-right-color: var(--border, #32322E) !important;
  }

  body.dark-mode .mobile-nav-btn.active {
    color: var(--accent, #E84E1B) !important;
  }

  body.dark-mode .radar-btn-inner {
    background: #252522;
    border-color: var(--border-strong, #4E4E48);
    box-shadow: 1px 1px 0px var(--border-strong, #4E4E48);
    color: var(--fg, #F8F1DF);
  }

  .mobile-nav-radar-btn.active .radar-btn-inner,
  .mobile-nav-radar-btn:active .radar-btn-inner {
    background: var(--bg-panel, #F4F1EA) !important;
    color: var(--accent, #E84E1B) !important;
    border-color: var(--accent, #E84E1B) !important;
    box-shadow: 1px 1px 0px var(--accent, #E84E1B) !important;
  }

  body.dark-mode .mobile-nav-radar-btn.active .radar-btn-inner,
  body.dark-mode .mobile-nav-radar-btn:active .radar-btn-inner {
    background: #1c1c1a !important;
  }

  .mobile-nav-radar-btn.active .radar-btn-inner svg,
  .mobile-nav-radar-btn:active .radar-btn-inner svg {
    color: var(--accent, #E84E1B) !important;
    stroke: var(--accent, #E84E1B) !important;
  }

  .panel-backdrop {
    display: none !important;
    position: fixed;
    inset: 0;
    background: rgba(20, 20, 17, 0.45);
    z-index: -1 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
    transition: opacity 0.2s ease, visibility 0s linear 0.2s;
    will-change: opacity;
  }

  .panel-backdrop.active {
    display: block !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: 48 !important;
    visibility: visible !important;
    transition: opacity 0.2s ease;
  }
}