/* DiversCOM LAB OFFLINE | Gas procedural vivo: mudanca interna do campo de ruido. */
#mapa-pan-host .hdbr-camera-rig{position:absolute;inset:0;transform-origin:50% 50%;transform-style:preserve-3d;backface-visibility:visible;will-change:transform;}
#mapa-pan-host .hdbr-camera-rig:not(.hdbr-tilted){will-change:auto;}
#mapa-pan-host .hdbr-camera-rig #mapa-pan-surface{position:absolute;inset:0;transform-origin:0 0;}

/* EXCLUSIVIDADE: original OU nebulosas. NUNCA os dois efeitos. */
body.hdbr-logic-mode-nebula #mapa-svg .mapa-tcs-pulse,
body.hdbr-logic-mode-nebula #mapa-svg .mapa-gloom-clouds{display:none!important;}
body.hdbr-logic-mode-original #mapa-svg .hdbr-logic-nebula-layer{display:none!important;}
body.hdbr-logic-mode-original .hdbr-nebula-screen-canvas{visibility:hidden!important;}
#mapa-svg .hdbr-live-nebula-layer{display:none!important;}
/* Um unico Canvas WebGL dentro do SVG, sob rotas e planetas. */
#mapa-svg .hdbr-logic-nebula-layer{
  pointer-events:none!important;opacity:var(--hdbr-logic-opacity,1);
}
#mapa-svg .hdbr-procedural-foreign,
#mapa-svg .hdbr-procedural-foreign *{
  pointer-events:none!important;
}
#mapa-svg .hdbr-procedural-canvas{display:block;width:100%;height:100%;}

.mapa-zoom-controls .hdbr-lab-zoom{display:flex;flex-direction:column;gap:4px;margin-top:6px;}
.mapa-zoom-controls .hdbr-lab-zoom button{width:auto;min-width:73px;height:28px;padding:3px 6px;font:700 9px/1.2 system-ui,Arial,sans-serif;letter-spacing:.3px;white-space:nowrap;background:rgba(9,15,24,.95);border:1px solid #566574;color:#dceaf5;border-radius:4px;cursor:pointer;}
.mapa-zoom-controls .hdbr-lab-zoom button[aria-pressed=true]{color:#ffe680;border-color:#ffe680;background:#2d2c1a;}
/* LAB 2.5D: o mapa base continua na bandeja; planeta, rotulo e iconografia
   tornam-se billboards independentes (sem achatamento ao inclinar a camera). */
#mapa-pan-host .hdbr-depth-overlay{
 position:absolute;inset:0;z-index:7;width:100%;height:100%;
 pointer-events:none;overflow:visible;contain:layout style;
}
#mapa-pan-host .hdbr-depth-dots{pointer-events:none;}
#mapa-pan-host .hdbr-depth-station{pointer-events:visiblePainted;cursor:pointer;}
#mapa-pan-host .hdbr-depth-station:focus-visible{outline:none;filter:drop-shadow(0 0 5px #e9e8bd);}
#mapa-pan-host .hdbr-depth-tether{pointer-events:none;stroke:#a9d4ec;stroke-width:1.2px;stroke-opacity:.40;stroke-dasharray:3 3;}
#mapa-pan-host .hdbr-depth-anchor{opacity:0;pointer-events:none;}
body.hdbr-depth-active #mapa-svg .mapa-dots{
 opacity:0!important;visibility:hidden!important;transition:none!important;pointer-events:none!important;
}
body.hdbr-depth-active.hdbr-logic-mode-nebula .hdbr-depth-overlay .mapa-tcs-pulse{display:none!important;}
body.hdbr-depth-active .hdbr-depth-overlay .mapa-planet-group.filtered-out{display:none!important;}
body.hdbr-depth-active .hdbr-depth-overlay .mapa-planet-group.selection-muted{opacity:.13;}
body.hdbr-depth-active .hdbr-depth-overlay .mapa-planet-group.selected{opacity:1;}
/* Legibilidade: textos nativos nao recebem pitch e continuam orientados a camera. */
body.hdbr-depth-active .hdbr-depth-overlay .mapa-planet-label,
body.hdbr-depth-active .hdbr-depth-overlay .mapa-player-label,
body.hdbr-depth-active .hdbr-depth-overlay .mapa-event-label{text-rendering:optimizeLegibility;}

/* Linhas vetoriais são desenhadas no overlay, sem textura inclinada. */
#mapa-svg .hdbr-depth-calibration{opacity:0;pointer-events:none!important;}
body.hdbr-depth-active #mapa-svg.hdbr-vector-ready #mapa-viewport
 :is(.mapa-lines,.mapa-route-layer,.mapa-sector-borders,.mapa-sectors)
 :is(path,line,polyline,polygon):not(defs *){
 stroke-opacity:0!important;
}
.hdbr-vector-lines{pointer-events:none;shape-rendering:geometricPrecision;}
/* Rotulos 2.5D em tamanho constante, sem drop-shadow artificial.
   Cor calculada a partir do estilo ORIGINAL de cada planeta. */
#mapa-pan-host .hdbr-depth-overlay .hdbr-depth-name,
#mapa-pan-host .hdbr-depth-overlay .hdbr-depth-player{
 transform:none!important;filter:none!important;
 paint-order:stroke fill markers;
 stroke-linejoin:round;
 text-rendering:geometricPrecision;
 pointer-events:none!important;
}

/* Tamanho 2.5D controlado em JS; não altera diâmetro no modo 2D. */
#mapa-pan-host .hdbr-depth-station,
#mapa-pan-host .hdbr-depth-station .mapa-planet-group{filter:none!important;}
#mapa-pan-host .hdbr-depth-station.hdbr-depth-name-hidden .mapa-planet-label{visibility:hidden!important;}
#mapa-pan-host .hdbr-depth-station.hdbr-depth-player-hidden .mapa-player-label{visibility:hidden!important;}
#mapa-pan-host .hdbr-depth-overlay .mapa-planet-hit{pointer-events:visibleFill;}

/* Os indicadores de campanha permanecem junto do escudo no billboard. */
.hdbr-depth-overlay.mapa-detail-on :is(.mapa-event-icon,.mapa-event-label),
.hdbr-depth-overlay.kotlin-detail-on :is(.desktop-tactical,.campaign-active) :is(.mapa-event-icon,.mapa-event-label),
.hdbr-depth-overlay .selected :is(.mapa-event-icon,.mapa-event-label){display:block;opacity:1;}
.hdbr-depth-overlay .mapa-kotlin-progress-stem{display:none;}
.hdbr-depth-overlay.mapa-detail-on [data-defense=true] .mapa-kotlin-progress-stem,
.hdbr-depth-overlay.kotlin-detail-on .desktop-tactical [data-defense=true] .mapa-kotlin-progress-stem,
.hdbr-depth-overlay .selected [data-defense=true] .mapa-kotlin-progress-stem{display:inline;}
.hdbr-depth-overlay .mapa-kotlin-progress-label{
 font:700 calc(16 * var(--hdbr-progress-size,1px)) 'HDBR Map Condensed','Arial Narrow',Arial,sans-serif;
 letter-spacing:0;stroke:#000;stroke-width:calc(2.5 * var(--hdbr-progress-size,1px));
 paint-order:stroke;
}
.hdbr-depth-overlay [data-defense=false] .mapa-kotlin-progress-label{font-size:calc(12 * var(--hdbr-progress-size,1px));}
.hdbr-depth-overlay .mapa-infrastructure :is(path,line),
.hdbr-depth-overlay:is(.mapa-clean,.map-hide-progress) :is(.mapa-event-icon,.mapa-event-label,.mapa-attacker-badge,.mapa-kotlin-progress-stem),
.hdbr-depth-overlay:is(.mapa-clean,.map-hide-infrastructure) :is(.mapa-infrastructure,.mapa-tcs-pulse),
.hdbr-depth-overlay:is(.mapa-clean,.map-hide-presences) :is(.mapa-presences,.mapa-presences-android),
.hdbr-depth-overlay.map-hide-ships :is(.mapa-presence-ship,.mapa-presence-android-ship){display:none!important;}
.hdbr-depth-overlay .mapa-special-icon[data-gif-src$="/penta.gif"]{filter:url(#hdbr-depth-black-hole);}

.hdbr-tilted #mapa-svg :is(.hdbr-planet-cast-shadows,.hdbr-planet-self-shade){display:none!important;}

#mapa-pan-host .hdbr-depth-overlay .hdbr-snapshot *{pointer-events:none!important;}

.hdbr-tilted #mapa-svg :is(.mapa-invasion-pulse,.mapa-route-energy){display:none!important;}

@media(max-width:700px),(any-pointer:coarse){
 .mapa-zoom-controls .hdbr-lab-zoom{margin-top:0;gap:5px;}
 .mapa-immersive .mapa-zoom-controls .hdbr-lab-zoom{flex-direction:row;}
 .mapa-zoom-controls .hdbr-lab-zoom button{width:44px;min-width:44px;height:44px;padding:0;}
}


#mapa-pan-host .hdbr-camera-rig.hdbr-flat-fallback{transform:none!important;}

/* Reserva um lugar para a alternância de câmera na fileira de controles. */
.mapa-immersive .mapa-zoom-controls .hdbr-lab-zoom{margin-top:0;}
.mapa-immersive .mapa-zoom-controls .hdbr-lab-zoom button{width:44px;min-width:44px;height:44px;padding:0;}
.mapa-immersive:has(.hdbr-lab-zoom) .mapa-telemetry{left:264px;right:auto;}

/* Faixas vetoriais no plano da câmera, sem ampliação de uma textura 3D. */
body.hdbr-depth-active #mapa-svg.hdbr-hatch-ready .mapa-sector-hatch{
 fill-opacity:0!important;
}
.hdbr-vector-hatches{pointer-events:none;shape-rendering:geometricPrecision;}
