/* ==========================================================================
   TrackPulse — Tema oscuro deportivo (acento Strava #FC4C02)
   ========================================================================== */

:root {
  --bg: #121212;
  --bg-elev: #1a1a1a;
  --bg-card: #242424;
  --bg-hover: #2e2e2e;
  --stroke: #333;
  --text: #f0f0f0;
  --muted: #a0a0a0;
  --orange: #fc4c02;
  --orange-dim: #d63f00;
  --orange-glow: rgba(252, 76, 2, 0.28);
  --green: #60d394;
  --blue: #4c9fff;
  --danger: #ff5a5a;
  --radius: 12px;
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, monospace;
  --header-h: 64px;
  /* Cabecera global real (padding + logo + acciones) */
  --app-main-header-h: 118px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  color-scheme: dark;
  scrollbar-width: thin;
  scrollbar-color: rgba(252, 76, 2, 0.45) rgba(255, 255, 255, 0.04);
}

/* Scrollbars (tema Relivex) */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(252, 76, 2, 0.45) rgba(255, 255, 255, 0.04);
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
  margin: 4px;
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(252, 76, 2, 0.55), rgba(214, 63, 0, 0.4));
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--orange), var(--orange-dim));
  border: 2px solid transparent;
  background-clip: padding-box;
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

button, input, select { font: inherit; color: inherit; }

#app { min-height: 100%; }

.view { display: none; min-height: 100vh; }
.view-active { display: block; }

/* Planificador / POIs: sin scroll de página (solo el panel derecho) */
html.relivex-lock-scroll,
html.relivex-lock-scroll body {
  height: 100%;
  overflow: hidden;
}

html.relivex-lock-scroll #app {
  height: 100%;
  max-height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

html.relivex-lock-scroll #appMainHeader {
  flex-shrink: 0;
}

html.relivex-lock-scroll #view-planner.view-active,
html.relivex-lock-scroll #view-pois.view-active {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  max-height: none;
  overflow: hidden;
}

html.relivex-lock-scroll #view-planner .planner-layout,
html.relivex-lock-scroll #view-pois .planner-layout {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  max-height: none;
}

/* -------------------------------------------------------------------------- */
/* Auth                                                                       */
/* -------------------------------------------------------------------------- */

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(ellipse 70% 50% at 50% 20%, rgba(252, 76, 2, 0.18), transparent 55%),
    var(--bg);
}

.auth-card {
  width: min(400px, 100%);
  background: var(--bg-elev);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 28px 24px 22px;
  box-shadow: var(--shadow);
}

.auth-brand { margin-bottom: 18px; }

.auth-title {
  margin: 0 0 16px;
  font-size: 1.15rem;
}

.auth-form .field { margin-bottom: 12px; }

.btn-block { width: 100%; justify-content: center; margin-top: 8px; }

.auth-error {
  color: var(--danger);
  font-size: 0.85rem;
  margin: 0 0 8px;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
}
.auth-error:not([hidden]) {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 90, 90, 0.12);
  border: 1px solid rgba(255, 90, 90, 0.35);
}

.auth-hint { margin: 16px 0 0; text-align: center; font-size: 0.8rem; }

.user-chip {
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--orange);
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--orange-glow);
  border: 1px solid rgba(252, 76, 2, 0.35);
}

/* -------------------------------------------------------------------------- */
/* Header                                                                     */
/* -------------------------------------------------------------------------- */

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  background: rgba(18, 18, 18, 0.92);
  border-bottom: 1px solid var(--stroke);
  backdrop-filter: blur(12px);
}

/* Misma altura en todos los módulos; sitio para la nave de Explora */
#appMainHeader.app-header {
  overflow: visible;
  padding-top: 30px;
  align-items: center;
}

#appMainHeader .header-actions {
  overflow: visible;
}

/* display:flex anula [hidden] del UA — forzar oculto en login */
#appMainHeader[hidden] {
  display: none !important;
}

.app-header.compact { gap: 12px; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Logo / marca → actividades (cabecera global) */
button.brand-home {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  flex-shrink: 0;
}

button.brand-home:focus-visible {
  outline: 2px solid rgba(252, 76, 2, 0.65);
  outline-offset: 3px;
  border-radius: 8px;
}

/* Título del módulo en la misma línea que el menú */
.app-module-ctx {
  flex: 1 1 160px;
  min-width: 0;
  display: flex;
  align-items: center;
}

.app-module-ctx[hidden] {
  display: none !important;
}

.app-module-panel[hidden] {
  display: none !important;
}

.app-view-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.app-view-actions[hidden] {
  display: none !important;
}

/* Ítem del menú de la vista actual (no redundante) */
#appMainHeader [data-nav-view][hidden] {
  display: none !important;
}

/* En módulos: tagline menos protagonismo (logo/menú = mismo tamaño que Dashboard) */
#appMainHeader.is-module .brand-tagline {
  display: none;
}

.brand-logo {
  display: block;
  width: auto;
  height: 96px;
  object-fit: contain;
  background: transparent;
  flex-shrink: 0;
}

.brand-logo--header {
  height: 72px;
}

.auth-brand .brand-logo {
  height: 128px;
}

.brand strong { display: block; font-size: 1.35rem; }
.brand span, .muted { color: var(--muted); font-size: 0.8rem; }
.auth-brand .brand strong { font-size: 1.65rem; }

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  align-self: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex-shrink: 0;
}

/* Desplegable Herramientas (naranja, acorde a la web) */
.header-menu {
  position: relative;
  z-index: 40;
}

.header-menu-trigger {
  gap: 4px;
  border-color: rgba(252, 76, 2, 0.45);
  color: #ffd2b8;
}

.header-menu-trigger:hover {
  border-color: rgba(252, 76, 2, 0.75);
  background: rgba(252, 76, 2, 0.12);
}

.header-menu-caret {
  font-size: 0.7em;
  opacity: 0.75;
  transition: transform 0.15s ease;
}

.header-menu.is-open .header-menu-caret {
  transform: rotate(180deg);
}

.header-menu-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 210px;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(252, 76, 2, 0.4);
  background:
    linear-gradient(160deg, rgba(42, 22, 12, 0.98), rgba(18, 14, 12, 0.98));
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.45),
    0 0 18px var(--orange-glow);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.header-menu-panel[hidden] {
  display: none !important;
}

.header-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.header-menu-item:hover,
.header-menu-item:focus-visible {
  outline: none;
  background: rgba(252, 76, 2, 0.16);
  color: #ffe0cc;
}

.header-menu-item--accent {
  color: #ffb088;
  border-top: 1px solid rgba(252, 76, 2, 0.28);
  margin-top: 2px;
  border-radius: 10px;
}

.header-menu-item--accent:hover,
.header-menu-item--accent:focus-visible {
  background: rgba(252, 76, 2, 0.22);
  color: #ffdcc8;
}

.analysis-title {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.analysis-title strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* -------------------------------------------------------------------------- */
/* Buttons                                                                    */
/* -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--stroke);
  background: var(--bg-card);
  color: var(--text);
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s, border-color 0.15s;
}

.btn:hover { background: var(--bg-hover); transform: translateY(-1px); }
.btn:active { transform: none; }

.btn-primary {
  background: var(--orange);
  border-color: transparent;
  color: #fff;
}
.btn-primary:hover { background: var(--orange-dim); }

.btn-accent {
  background: #fff;
  color: #111;
  border-color: transparent;
}

.btn-ghost { background: transparent; }
.btn-danger { color: var(--danger); border-color: rgba(255, 90, 90, 0.35); }

/* Nebulosa foggy + platillo WOTW — solo Explora tu territorio */
.btn-nebula {
  position: relative;
  overflow: visible;
  isolation: isolate;
  z-index: 2;
  margin: 0;
  align-self: center;
  border-color: rgba(80, 210, 90, 0.4);
  color: #f0fdf4;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
  background:
    radial-gradient(ellipse 90% 120% at 15% 30%, rgba(150, 230, 80, 0.5) 0%, transparent 58%),
    radial-gradient(ellipse 80% 100% at 85% 70%, rgba(34, 170, 70, 0.45) 0%, transparent 55%),
    radial-gradient(ellipse 70% 90% at 50% 110%, rgba(22, 120, 55, 0.55) 0%, transparent 60%),
    radial-gradient(ellipse 100% 80% at 40% 50%, rgba(60, 140, 70, 0.4) 0%, transparent 70%),
    linear-gradient(120deg, rgba(12, 40, 22, 0.88), rgba(18, 48, 28, 0.82), rgba(10, 32, 18, 0.9));
  background-size: 260% 260%, 280% 280%, 240% 240%, 220% 220%, 100% 100%;
  box-shadow:
    0 0 18px rgba(57, 255, 20, 0.22),
    inset 0 0 28px rgba(80, 210, 90, 0.2);
  animation:
    btn-nebula-drift 4.5s ease-in-out infinite,
    btn-nebula-glow 2.2s ease-in-out infinite;
}

.btn-nebula-label {
  position: relative;
  z-index: 2;
}

/* Niebla en movimiento */
.btn-nebula::before {
  content: "";
  position: absolute;
  inset: -12%;
  z-index: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 25% 40%, rgba(180, 240, 140, 0.5) 0%, transparent 48%),
    radial-gradient(circle at 75% 55%, rgba(80, 210, 90, 0.45) 0%, transparent 50%),
    radial-gradient(circle at 50% 90%, rgba(40, 120, 60, 0.5) 0%, transparent 52%),
    radial-gradient(circle at 60% 20%, rgba(200, 255, 160, 0.3) 0%, transparent 40%);
  filter: blur(7px);
  opacity: 0.9;
  animation: btn-nebula-swirl 3.2s ease-in-out infinite alternate;
  pointer-events: none;
}

/* Segunda capa de bruma */
.btn-nebula::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background:
    radial-gradient(ellipse 120% 80% at 30% 60%, rgba(100, 200, 90, 0.32) 0%, transparent 55%),
    radial-gradient(ellipse 100% 70% at 80% 30%, rgba(150, 230, 100, 0.28) 0%, transparent 50%);
  filter: blur(4px);
  animation: btn-nebula-fog 3.8s ease-in-out infinite;
  pointer-events: none;
}

.btn-nebula-saucer {
  position: absolute;
  left: 50%;
  top: -22px;
  z-index: 3;
  width: 44px;
  height: 28px;
  margin: 0;
  transform: translateX(-50%);
  pointer-events: none;
  filter: drop-shadow(0 0 6px rgba(57, 255, 20, 0.65));
  animation: btn-nebula-saucer-hover 2.8s ease-in-out infinite;
}

.btn-nebula-saucer svg {
  display: block;
  overflow: visible;
}

.btn-nebula-ray {
  transform-box: view-box;
  transform-origin: 35.2px 2.2px;
  animation: btn-nebula-ray-sweep 5.2s ease-in-out infinite;
  filter: drop-shadow(0 0 4px rgba(57, 255, 20, 0.95));
}

.btn-nebula:hover {
  border-color: rgba(150, 230, 80, 0.65);
}

@keyframes btn-nebula-drift {
  0% {
    background-position: 0% 30%, 100% 70%, 40% 100%, 20% 40%, 0 0;
  }
  25% {
    background-position: 40% 60%, 60% 20%, 70% 40%, 55% 70%, 0 0;
  }
  50% {
    background-position: 90% 50%, 10% 40%, 30% 0%, 80% 30%, 0 0;
  }
  75% {
    background-position: 55% 20%, 45% 80%, 60% 70%, 35% 60%, 0 0;
  }
  100% {
    background-position: 0% 30%, 100% 70%, 40% 100%, 20% 40%, 0 0;
  }
}

@keyframes btn-nebula-glow {
  0%,
  100% {
    box-shadow:
      0 0 14px rgba(57, 255, 20, 0.18),
      inset 0 0 22px rgba(80, 210, 90, 0.16);
  }
  50% {
    box-shadow:
      0 0 28px rgba(57, 255, 20, 0.4),
      inset 0 0 36px rgba(80, 210, 90, 0.32);
  }
}

@keyframes btn-nebula-swirl {
  from {
    transform: translate(-8%, -5%) scale(1);
    opacity: 0.55;
  }
  to {
    transform: translate(8%, 6%) scale(1.18);
    opacity: 1;
  }
}

@keyframes btn-nebula-fog {
  0%,
  100% {
    opacity: 0.45;
    transform: translateX(-6%) translateY(2%);
  }
  50% {
    opacity: 0.95;
    transform: translateX(8%) translateY(-3%);
  }
}

@keyframes btn-nebula-saucer-hover {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-3px);
  }
}

@keyframes btn-nebula-ray-sweep {
  0% {
    transform: rotate(-52deg) scaleX(0.28);
    opacity: 0.4;
  }
  18% {
    transform: rotate(-28deg) scaleX(1.45);
    opacity: 1;
  }
  35% {
    transform: rotate(0deg) scaleX(0.5);
    opacity: 0.65;
  }
  55% {
    transform: rotate(32deg) scaleX(1.65);
    opacity: 1;
  }
  72% {
    transform: rotate(50deg) scaleX(0.4);
    opacity: 0.55;
  }
  88% {
    transform: rotate(12deg) scaleX(1.35);
    opacity: 0.95;
  }
  100% {
    transform: rotate(-52deg) scaleX(0.28);
    opacity: 0.4;
  }
}

.btn.recording {
  background: var(--danger);
  color: #fff;
  animation: pulse 1.1s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 90, 90, 0.45); }
  50% { box-shadow: 0 0 0 8px transparent; }
}

.plus { font-size: 1.2rem; line-height: 1; }

/* -------------------------------------------------------------------------- */
/* Dashboard                                                                  */
/* -------------------------------------------------------------------------- */

.dashboard {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 20px;
  padding: 20px;
  max-width: 1280px;
  margin: 0 auto;
}

.sidebar {
  position: sticky;
  top: calc(var(--header-h) + 12px);
  align-self: start;
  max-height: calc(100vh - var(--header-h) - 24px);
  overflow: auto;
  background: var(--bg-elev);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 16px;
}

.period-analysis {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--stroke);
}
.period-analysis-title {
  margin: 0 0 4px;
  font-size: 0.9rem;
}
.period-analysis-label {
  margin: 0 0 12px;
  font-size: 0.78rem;
}
.period-hero {
  margin-bottom: 12px;
}
.period-hero strong {
  display: block;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.period-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
  margin-bottom: 14px;
}
.period-metric {
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.period-metric span {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.period-metric strong {
  font-size: 0.9rem;
  font-weight: 700;
}
.period-chart-wrap {
  margin-bottom: 12px;
}
.period-chart-wrap h4,
.period-volume h4 {
  margin: 0 0 8px;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.period-volume {
  margin-top: 0;
  padding-top: 12px;
}

.sidebar-title {
  margin: 0 0 12px;
  font-size: 0.95rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.field span { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }

.field input,
.field select,
.dropzone {
  width: 100%;
  border: 1px solid var(--stroke);
  background: var(--bg-card);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 12px;
  color-scheme: dark;
}

/* Menú nativo del <select> alineado al tema oscuro Relivex */
.field select option,
.planner-field-row select option,
.planner-card select option,
select option {
  background-color: #1a1a1a;
  color: #f0f0f0;
}

.field select option:checked,
.planner-field-row select option:checked,
.planner-card select option:checked,
select option:checked,
.field select option:hover,
.planner-field-row select option:hover,
.planner-card select option:hover,
select option:hover {
  background-color: #fc4c02;
  color: #fff;
}

.volume-card {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--stroke);
}

.volume-card h3 {
  margin: 0 0 10px;
  font-size: 0.85rem;
  color: var(--muted);
}

.totals-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.total-card {
  background: var(--bg-elev);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 14px;
}

.total-card span {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.total-card strong {
  font-size: 1.45rem;
  color: var(--orange);
}

.total-card strong small { font-size: 0.85rem; color: var(--muted); }

.total-card-year {
  grid-column: 1 / -1;
}

.total-card-year strong {
  font-size: 1.1rem;
  color: var(--text);
}

.feed-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}

.feed-head h1 { margin: 0; font-size: 1.35rem; }

.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.activity-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 14px;
  background: var(--bg-elev);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  transition: border-color 0.15s;
}

.activity-card:hover { border-color: rgba(252, 76, 2, 0.45); }

.mini-map {
  width: 140px;
  height: 110px;
  border-radius: 8px;
  background: #0e0e0e;
  overflow: hidden;
}

.mini-map canvas { width: 100%; height: 100%; display: block; }

.activity-body h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
}

.activity-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 8px 0 12px;
  font-size: 0.88rem;
}

.activity-meta span strong {
  color: var(--text);
  font-weight: 650;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--orange-glow);
  color: var(--orange);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.activity-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.activity-actions .btn {
  padding: 7px 10px;
  font-size: 0.8rem;
}

.feed-empty {
  text-align: center;
  padding: 48px 20px;
  background: var(--bg-elev);
  border: 1px dashed var(--stroke);
  border-radius: var(--radius);
}

.feed-empty h2 { margin: 0 0 8px; }

/* -------------------------------------------------------------------------- */
/* Analysis                                                                   */
/* -------------------------------------------------------------------------- */

.analysis-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 0;
  height: calc(100vh - var(--header-h));
}

.analysis-map-wrap { position: relative; min-height: 320px; }
.map-box, .map-3d { width: 100%; height: 100%; }

.analysis-side {
  overflow: auto;
  padding: 16px;
  background: var(--bg-elev);
  border-left: 1px solid var(--stroke);
}

.stat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.stat-pills .pill {
  background: var(--bg-card);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.85rem;
}

.stat-pills .pill strong { color: var(--orange); }

.hw-hero { margin-bottom: 12px; }
.hw-hero strong {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.hw-hero .muted { font-size: 0.85rem; }

.hw-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  margin-bottom: 14px;
}
.hw-metric {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.hw-metric span {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 2px;
}
.hw-metric strong { font-size: 0.98rem; font-weight: 700; }

.hw-chart-meta {
  margin: 0 0 8px;
  font-size: 0.8rem;
  color: var(--muted);
}

.hr-zones { margin-top: 12px; display: grid; gap: 6px; }
.hr-zone-row {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 6px 8px;
  align-items: center;
  font-size: 0.78rem;
}
.hr-zone-dot { width: 8px; height: 8px; border-radius: 50%; }
.hr-zone-time { color: var(--muted); font-variant-numeric: tabular-nums; }
.hr-zone-bar {
  grid-column: 2 / -1;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.hr-zone-bar i { display: block; height: 100%; border-radius: 2px; }

.splits-bars { display: grid; gap: 8px; margin-bottom: 12px; }
.split-bar-row {
  display: grid;
  grid-template-columns: 52px 1fr 56px;
  gap: 8px;
  align-items: center;
  font-size: 0.8rem;
}
.split-bar-label { color: var(--muted); }
.split-bar-val {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}
.split-bar-track {
  height: 10px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.split-bar-track i {
  display: block;
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, #fc4c02, #ff8a4c);
}

.chart-card, .splits-card {
  background: var(--bg-card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
}

.chart-card h3, .splits-card h3 {
  margin: 0 0 10px;
  font-size: 0.95rem;
}

.chart-hint {
  margin: 8px 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.analysis-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
}

.analysis-photos button {
  display: block;
  padding: 0;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  overflow: hidden;
  background: #1a1a1a;
  cursor: pointer;
  aspect-ratio: 1;
}

.analysis-photos button:hover,
.analysis-photos button:focus-visible {
  border-color: #fc4c02;
  outline: none;
}

.analysis-photos img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.analysis-photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: stretch;
  background: rgba(0, 0, 0, 0.88);
  border: 0;
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  color: #fff;
}

.analysis-photo-lightbox[hidden] {
  display: none;
}

.analysis-photo-lightbox__frame {
  flex: 1;
  position: relative;
  min-height: 0;
  display: flex;
  align-items: stretch;
}

.analysis-photo-lightbox__stage {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  touch-action: none;
}

.analysis-photo-lightbox__stage.is-dragging {
  cursor: grabbing;
}

.analysis-photo-lightbox__img {
  max-width: min(920px, 92vw);
  max-height: min(78vh, 100%);
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  transform-origin: center center;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.analysis-photo-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(20, 20, 20, 0.85);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  z-index: 5;
  pointer-events: auto;
}

.analysis-photo-lightbox__nav:hover,
.analysis-photo-lightbox__nav:focus-visible {
  border-color: #fc4c02;
  outline: none;
}

.analysis-photo-lightbox__nav[hidden] {
  display: none !important;
}

.analysis-photo-lightbox__nav--prev { left: 12px; }
.analysis-photo-lightbox__nav--next { right: 12px; }

.analysis-photo-lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 16px 18px;
  background: rgba(0, 0, 0, 0.45);
}

.analysis-photo-lightbox__bar button {
  min-width: 40px;
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(30, 30, 30, 0.9);
  color: #fff;
  font-size: 0.95rem;
  cursor: pointer;
}

.analysis-photo-lightbox__bar button:hover,
.analysis-photo-lightbox__bar button:focus-visible {
  border-color: #fc4c02;
  outline: none;
}

.analysis-photo-lightbox__meta {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
  min-width: 4.5rem;
  text-align: center;
}

.splits-table-wrap { max-height: 280px; overflow: auto; }

.splits-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.splits-table th,
.splits-table td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid var(--stroke);
}

.splits-table th { color: var(--muted); font-weight: 600; font-size: 0.72rem; text-transform: uppercase; }
.splits-table tr:hover td { background: var(--bg-hover); }

/* -------------------------------------------------------------------------- */
/* Modal 3D                                                                   */
/* -------------------------------------------------------------------------- */

.modal-3d {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: #000;
}

.modal-3d[hidden] { display: none !important; }

.modal-3d-inner {
  position: relative;
  width: 100%;
  height: 100%;
}

.player-3d-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(180deg, rgba(0,0,0,0.65), transparent);
  pointer-events: none;
}

.player-3d-header > * { pointer-events: auto; }

.header-actions-3d {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-actions-3d #btnAddPoi3d.active,
.header-actions-3d #btnCreateRoute3d.active {
  background: rgba(255, 180, 60, 0.22);
  border-color: rgba(255, 180, 60, 0.55);
  color: #ffd78a;
}

.relive-route-create {
  position: absolute;
  top: 72px;
  right: 16px;
  z-index: 25;
  width: min(340px, calc(100vw - 28px));
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius, 12px);
  /* Misma opacidad que .hud-3d (brújula) */
  background: rgba(12, 14, 16, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
  pointer-events: auto;
}

.relive-route-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  max-height: 140px;
  overflow: auto;
}

.relive-route-points[hidden] {
  display: none !important;
}

.relive-route-points li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 8px;
  align-items: start;
  font-size: 0.82rem;
  line-height: 1.35;
}

.relive-route-points .tag {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
}

.relive-route-points .tag-a { background: #34c759; }
.relive-route-points .tag-b { background: #ff3b30; }
.relive-route-points .tag-v { background: #5ac8fa; color: #0c0e10; }

.relive-route-points .lbl {
  color: rgba(255, 255, 255, 0.92);
  word-break: break-word;
}

.relive-route-create[hidden] {
  display: none !important;
}

.relive-route-create-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.relive-route-create-status {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.35;
}

.relive-route-sort-btn {
  width: 100%;
  justify-self: stretch;
}
.relive-route-sort-btn[hidden] {
  display: none !important;
}
.relive-route-sort-btn.is-sort-needed:not(:disabled) {
  animation: relive-sort-blink 1.1s ease-in-out infinite;
  border-color: rgba(252, 76, 2, 0.85);
  color: #fff;
}
@keyframes relive-sort-blink {
  0%,
  100% {
    background: rgba(252, 76, 2, 0.22);
    box-shadow: 0 0 0 0 rgba(252, 76, 2, 0.35);
  }
  50% {
    background: rgba(252, 76, 2, 0.55);
    box-shadow: 0 0 12px 1px rgba(252, 76, 2, 0.45);
  }
}

.relive-route-create-fields {
  display: grid;
  gap: 8px;
}

.relive-route-create-fields .field {
  display: grid;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--muted, #9aa3ad);
}

.relive-route-create-fields select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  font: inherit;
}

.relive-route-create-actions {
  display: grid;
  gap: 8px;
}

.relive-route-create-actions .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.relive-route-pick-marker {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #fff;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  /* auto: Ctrl+arrastrar / Ctrl+clic derecho en el punto */
  pointer-events: auto;
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.relive-route-pick-marker.is-dragging {
  cursor: grabbing;
}

/* Solo con ?reliveDebug=1 — contorno del canvas (lo que graba captureStream) */
.relive-debug-canvas {
  outline: 2px solid #60d394 !important;
  outline-offset: -2px;
}

/* Export vídeo: en viewport (la GPU pinta bien); cubierto por overlay */
#map3d-record-host {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0b0d10;
  pointer-events: all;
}
#map3d-record-host #map3d-record {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1920px !important;
  height: 1080px !important;
  transform: translate(-50%, -50%);
  flex: 0 0 auto;
}
#map3d-record-host .maplibregl-map,
#map3d-record-host .maplibregl-canvas,
#map3d-record-host .maplibregl-canvas-container {
  width: 100% !important;
  height: 100% !important;
}
#map3d-record-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(8, 10, 14, 0.88);
  color: #f2f4f8;
  font: 600 1rem/1.4 system-ui, sans-serif;
  text-align: center;
  pointer-events: all;
}
#map3d-record-cover small {
  font-weight: 500;
  opacity: 0.7;
  font-size: 0.85rem;
}

.map-hint-3d {
  position: absolute;
  top: 58px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  margin: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(18, 18, 18, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.72rem;
  white-space: nowrap;
  pointer-events: none;
  backdrop-filter: blur(8px);
}

@media (max-width: 720px) {
  .map-hint-3d { display: none; }
}

.relive-title-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.relive-version {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  color: #60d394;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Marcador Relive: círculo naranja + estela glow detrás */
.relive-marker {
  position: relative;
  width: 28px;
  height: 28px;
  pointer-events: none;
  overflow: visible;
}

.relive-runner-spin {
  width: 28px;
  height: 28px;
  overflow: visible;
}

.relive-dot {
  position: relative;
  width: 28px;
  height: 28px;
  overflow: visible;
}

/* Estela SVG: vector pantalla del tramo local (x2/y2 en JS) */
.relive-dot-wake-svg {
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 50%;
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
  overflow: visible;
  pointer-events: none;
  mix-blend-mode: screen;
}

.relive-dot-wake-svg [data-wake-soft] {
  filter: blur(2.1px);
}

.relive-dot-wake-svg [data-wake-line] {
  filter: blur(0.45px);
}

/* Círculo → esfera naranja */
.relive-dot-core {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  border: none;
  background:
    radial-gradient(
      circle at 32% 28%,
      #ffe0c2 0%,
      #ff9a4a 22%,
      #fc4c02 52%,
      #c43200 78%,
      #6a1a00 100%
    );
  box-shadow:
    inset 0 -2px 3px rgba(80, 10, 0, 0.45),
    inset 0 2px 3px rgba(255, 255, 255, 0.35),
    0 0 8px 1px rgba(252, 76, 2, 0.7),
    0 1px 2px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.relive-runner-spin.is-fast .relive-dot-core {
  box-shadow:
    inset 0 -2px 3px rgba(80, 10, 0, 0.45),
    inset 0 2px 3px rgba(255, 255, 255, 0.4),
    0 0 12px 2px rgba(252, 76, 2, 0.9),
    0 1px 2px rgba(0, 0, 0, 0.35);
}

.relive-runner-spin.is-still .relive-dot-wake-svg {
  opacity: 0.35;
}

/* Carteles POI en 3D (ligeros: sin filter CSS — pesa en cada frame) */
.relive-poi-sign {
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  will-change: transform;
}

.relive-poi-sign-board {
  min-width: 64px;
  max-width: 140px;
  padding: 4px 8px 5px;
  border-radius: 5px;
  background: #1a1d24;
  border: 1.5px solid #fc4c02;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  text-align: center;
  line-height: 1.15;
}

.relive-poi-sign-board[data-kind="turismo"] {
  border-color: #fc4c02;
}
.relive-poi-sign-board[data-kind="histórico"] {
  border-color: #e8c36a;
}
.relive-poi-sign-board[data-kind="pico"] {
  border-color: #7ec8f5;
}
.relive-poi-sign-board[data-kind="lugar"] {
  border-color: #9ae6b4;
}
.relive-poi-sign-board[data-kind="poi"] {
  border-color: #fc4c02;
}

.relive-poi-sign-kind {
  display: block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 2px;
}

.relive-poi-sign-name {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  word-break: break-word;
}

.relive-poi-sign-pole {
  width: 3px;
  height: 14px;
  background: linear-gradient(180deg, #c8cdd4, #6b7280);
  border-radius: 1px;
}

.relive-poi-sign-pin {
  width: 8px;
  height: 8px;
  margin-top: -2px;
  border-radius: 50%;
  background: #fc4c02;
  border: 1.5px solid #fff;
}

/* Marcadores del catálogo POIs (vista edición) */
.poi-db-marker {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fc4c02;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  cursor: pointer;
}

/* Sin transform: MapLibre posiciona el marcador con transform en este mismo nodo */
.poi-db-marker--pulse {
  background: #ff8a3d;
  box-shadow: 0 0 0 0 rgba(252, 76, 2, 0.7);
  animation: poi-db-pulse 1s ease-out infinite;
  z-index: 2;
}

@keyframes poi-db-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(252, 76, 2, 0.75);
  }
  70% {
    box-shadow: 0 0 0 16px rgba(252, 76, 2, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(252, 76, 2, 0);
  }
}

.poi-list-item--active {
  border-color: rgba(252, 76, 2, 0.65) !important;
  background: rgba(252, 76, 2, 0.16) !important;
  box-shadow: inset 3px 0 0 #fc4c02;
}

.poi-list-item--pair-a {
  border-color: rgba(96, 211, 148, 0.55) !important;
  box-shadow: inset 3px 0 0 #60d394;
}

.poi-list-item--pair-b {
  border-color: rgba(90, 168, 255, 0.55) !important;
  box-shadow: inset 3px 0 0 #5aa8ff;
}

.poi-pair-badge {
  display: inline-block;
  min-width: 1.1em;
  padding: 0 5px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.75rem;
  color: #0c0e10;
  background: #60d394;
}

.poi-list-item--pair-b .poi-pair-badge {
  background: #5aa8ff;
}

.poi-pair-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(252, 76, 2, 0.35);
  background: rgba(252, 76, 2, 0.1);
}

.poi-pair-bar.hidden,
.poi-pair-bar[hidden] {
  display: none !important;
}

.poi-pair-label {
  font-size: 0.9rem;
  font-weight: 600;
  min-width: 0;
  flex: 1 1 140px;
}

.poi-pair-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.poi-routes-card {
  width: min(560px, 100%);
  max-height: min(85vh, 640px);
}

.poi-routes-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.poi-routes-list {
  display: grid;
  gap: 8px;
  max-height: min(60vh, 480px);
  overflow: auto;
}

.poi-edit-dialog {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.55);
}

.poi-edit-dialog[hidden] {
  display: none !important;
}

.poi-edit-card {
  width: min(640px, 100%);
  max-height: min(90vh, 720px);
  display: grid;
  gap: 14px;
  padding: 22px 24px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: #16181c;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  overflow: auto;
}

.poi-edit-card h3 {
  margin: 0;
  font-size: 1.25rem;
}

.poi-edit-field {
  display: grid;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--muted, #9aa3ad);
}

.poi-edit-field input,
.poi-edit-field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.05);
  color: inherit;
  font: inherit;
  font-size: 1rem;
  line-height: 1.45;
  resize: vertical;
}

.poi-edit-field textarea {
  min-height: 220px;
}

.poi-edit-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 4px;
}

.hud-stack-3d {
  position: absolute;
  top: 72px;
  left: 16px;
  z-index: 5;
  display: grid;
  gap: 8px;
  width: min(300px, calc(100vw - 28px));
  pointer-events: none;
}

.hud-3d {
  display: grid;
  gap: 10px;
  width: 100%;
  padding: 12px 12px 10px;
  border-radius: var(--radius);
  background: rgba(12, 14, 16, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
  pointer-events: none;
}

.hud-climb-3d[hidden] {
  display: none !important;
}
.hud-climb-head {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.72);
}
.hud-climb-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
  font-size: 0.78rem;
}
.hud-climb-metrics span {
  display: block;
  color: var(--muted, #9aa3ad);
  font-size: 0.68rem;
}
.hud-climb-metrics strong {
  font-size: 0.9rem;
  font-weight: 700;
}
.hud-climb-cats {
  display: grid;
  gap: 4px;
  font-size: 0.72rem;
}
.hud-climb-cat-row {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  gap: 6px;
  align-items: center;
}
.hud-climb-cat-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.hud-climb-sections {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.85);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 8px;
  display: grid;
  gap: 4px;
}
.hud-climb-sec-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}

.planner-climb-block {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.planner-climb-block[hidden] {
  display: none !important;
}
.planner-climb-title {
  margin: 0 0 8px;
  font-size: 0.85rem;
  font-weight: 700;
}
.planner-slope-wrap {
  margin: 8px 0;
}

.hud-gauges {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
}

.hud-gauge {
  display: grid;
  justify-items: center;
  gap: 2px;
}

.hud-dial-wrap {
  position: relative;
  width: 100%;
  max-width: 118px;
}

.hud-dial {
  display: block;
  width: 100%;
  height: auto;
  overflow: hidden; /* la aguja no puede pintarse fuera del arco */
}

.hud-dial-track {
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 7;
  stroke-linecap: round;
}

.hud-dial-halo {
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  opacity: 0.28;
  filter: blur(2.2px);
  transition: stroke-dashoffset 0.14s linear;
}

.hud-dial-value {
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 0.12s linear;
  filter: drop-shadow(0 0 3px currentColor);
}

.hud-dial-speed { stroke: #fc4c02; }
.hud-dial-alt { stroke: #3dd4ff; }
.hud-dial-dist { stroke: #ffb020; }

.hud-needle-g {
  /* La rotación se aplica con attribute transform en JS (origen 50,58) */
}

.hud-needle-g line {
  stroke: #fff;
  stroke-width: 2.2;
  stroke-linecap: round;
  /* sin blur: el filtro hacía parecer que la punta salía del arco */
}

/* Máximo (rojo) / mínimo (azul) alcanzados */
.hud-needle-peak,
.hud-needle-floor {
  pointer-events: none;
}

.hud-needle-peak line {
  stroke: #ff2a2a;
  stroke-width: 3.4;
  stroke-linecap: round;
  filter: drop-shadow(0 0 3px rgba(255, 42, 42, 1));
}

.hud-needle-floor line {
  stroke: #3b82f6;
  stroke-width: 3.4;
  stroke-linecap: round;
  filter: drop-shadow(0 0 3px rgba(59, 130, 246, 1));
}

.hud-dial-readout {
  position: absolute;
  left: 50%;
  bottom: 2px;
  transform: translateX(-50%);
  text-align: center;
  line-height: 1.05;
  pointer-events: none;
}

.hud-dial-readout strong {
  display: block;
  font-family: var(--mono);
  font-size: 1.05rem;
  color: #fff;
  font-weight: 700;
}

.hud-dial-readout small {
  font-size: 0.62rem;
  color: var(--muted);
  text-transform: lowercase;
}

.hud-gauge-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.hud-compass {
  display: grid;
  justify-items: center;
  gap: 2px;
  position: relative;
}

/* Cúpula / cristal: el anillo gira dentro; el cristal y el índice no */
.hud-compass-dome {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  isolation: isolate;
}

.hud-compass-bezel {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 42%, #3a4048 0%, #1a1e24 55%, #0a0c10 100%);
  box-shadow:
    0 0 0 1.5px rgba(255, 255, 255, 0.18),
    0 0 0 3px rgba(0, 0, 0, 0.55),
    inset 0 1px 1px rgba(255, 255, 255, 0.22),
    inset 0 -3px 6px rgba(0, 0, 0, 0.55),
    0 6px 14px rgba(0, 0, 0, 0.45);
  z-index: 0;
}

.hud-compass-ring {
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    radial-gradient(circle at 50% 55%, #2a3038 0%, #14181e 70%, #0c0e12 100%);
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.55);
  /* Sin transition: el JS acumula el camino corto; CSS interpolaba vueltas al cruzar N */
  will-change: transform;
  z-index: 1;
}

.hud-compass-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffb080, #fc4c02 55%, #8a2400);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 0 6px rgba(252, 76, 2, 0.55);
  z-index: 2;
}

.hud-compass-n,
.hud-compass-e,
.hud-compass-s,
.hud-compass-w {
  position: absolute;
  font-size: 0.62rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.82);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
  z-index: 2;
}

.hud-compass-n { top: 5px; left: 50%; transform: translateX(-50%); color: #fc4c02; }
.hud-compass-s { bottom: 5px; left: 50%; transform: translateX(-50%); }
.hud-compass-e { right: 7px; top: 50%; transform: translateY(-50%); }
.hud-compass-w { left: 7px; top: 50%; transform: translateY(-50%); }

/* Cúpula de cristal + brillos especulares (no rota) */
.hud-compass-glass {
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 3;
  background:
    radial-gradient(ellipse 70% 42% at 32% 22%, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.12) 38%, transparent 62%),
    radial-gradient(ellipse 45% 28% at 68% 78%, rgba(255, 255, 255, 0.1) 0%, transparent 70%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.18) 0%, transparent 42%, transparent 58%, rgba(0, 0, 0, 0.18) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.22),
    inset 0 -8px 14px rgba(0, 0, 0, 0.28),
    inset 0 6px 10px rgba(255, 255, 255, 0.08);
}

.hud-compass-glass::before {
  content: "";
  position: absolute;
  left: 18%;
  top: 10%;
  width: 42%;
  height: 22%;
  border-radius: 50%;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.7) 0%,
    rgba(255, 255, 255, 0.15) 55%,
    transparent 100%
  );
  filter: blur(0.4px);
  transform: rotate(-18deg);
}

.hud-compass-glass::after {
  content: "";
  position: absolute;
  right: 22%;
  bottom: 16%;
  width: 28%;
  height: 14%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  filter: blur(0.6px);
}

.hud-compass-heading {
  position: absolute;
  top: 7px;
  left: 50%;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 12px solid #fc4c02;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.55));
  z-index: 4;
}

.hud-compass-deg {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: #fff;
  margin-top: -2px;
}

.hud-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hud-stat span {
  display: block;
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.hud-stat strong {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: #f2f4f7;
  font-weight: 650;
}

.hud-charts-3d {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 12px 12px 10px;
  border-radius: var(--radius);
  background: rgba(12, 14, 16, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
  pointer-events: auto;
}

.hud-chart-block {
  display: grid;
  gap: 2px;
}

.hud-chart-label {
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.55);
}

.hud-charts-3d canvas {
  display: block;
  width: 100%;
  height: 52px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.18);
  cursor: pointer;
}

.hud-charts-3d canvas:hover {
  background: rgba(0, 0, 0, 0.28);
}

.hud-charts-3d .hud-chart-label::after {
  content: " · clic para ir";
  opacity: 0.45;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: none;
}

.upload-batch-list {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  max-height: 160px;
  overflow: auto;
  display: grid;
  gap: 4px;
  font-size: 0.82rem;
}

.upload-batch-list[hidden] {
  display: none !important;
}

.upload-batch-list li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.upload-batch-list li.ok { border-color: rgba(96, 211, 148, 0.35); }
.upload-batch-list li.err { border-color: rgba(255, 107, 107, 0.4); }
.upload-batch-list .ub-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upload-batch-list .ub-meta { color: var(--muted); flex-shrink: 0; }

/* Compat: métricas antiguas si algún estilo residual las referencia */
.hud-metric span {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.hud-metric strong {
  font-family: var(--mono);
  font-size: 1.35rem;
  color: #fff;
}

.hud-metric small { font-size: 0.75rem; color: var(--muted); }

.photo-popup-3d {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  transform-origin: center center;
  z-index: 12;
  width: min(440px, calc(100vw - 32px));
  background: rgba(12, 12, 12, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.photo-popup-3d.visible {
  opacity: 1;
  pointer-events: auto;
}
.photo-popup-3d[hidden] { display: none; }

.photo-popup-3d-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #e11d2e;
  color: #fff;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.photo-popup-3d-close:hover,
.photo-popup-3d-close:focus-visible {
  background: #ff2a3d;
  outline: none;
}

.photo-popup-3d-stage {
  background: #0a0a0a;
  max-height: 52vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-popup-3d-stage img {
  display: block;
  width: 100%;
  max-height: 52vh;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.photo-popup-3d-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  flex-wrap: wrap;
}

.photo-popup-3d-bar button {
  min-width: 36px;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(40, 40, 40, 0.95);
  color: #fff;
  cursor: pointer;
}

.photo-popup-3d-bar button:hover,
.photo-popup-3d-bar button:focus-visible {
  border-color: #fc4c02;
  outline: none;
}

.photo-popup-3d-bar span {
  flex: 1;
  min-width: 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Player 3 capas: base negra → UI → cúpula cristalina 20% */
.player-3d {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 5;
  width: min(820px, calc(100vw - 24px));
  border-radius: 999px;
  isolation: isolate;
  overflow: hidden;
  background: transparent;
  border: none;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
}

.player-3d-base {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: #0a0c10;
  border: 1px solid rgba(255, 255, 255, 0.14);
  pointer-events: none;
}

.player-3d-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  padding: 11px 14px;
}

.player-3d-dome {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0.4;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.25) 36%, transparent 62%),
    radial-gradient(ellipse 100% 80% at 50% 120%, rgba(180, 200, 255, 0.35) 0%, transparent 55%),
    linear-gradient(165deg, rgba(220, 230, 255, 0.5) 0%, rgba(120, 140, 180, 0.15) 100%);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.9),
    inset 0 -6px 14px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.player-3d-transport {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Botones (capa 2): cúpula propia opaca y legible bajo el cristal */
.player-ctrl-btn {
  box-sizing: border-box;
  position: relative;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  line-height: 0;
  flex-shrink: 0;
  appearance: none;
  -webkit-appearance: none;
  overflow: hidden;
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.15) 22%, transparent 48%),
    radial-gradient(circle at 50% 110%, rgba(0, 0, 0, 0.4) 0%, transparent 55%),
    linear-gradient(160deg, #5a6070 0%, #2a2e36 55%, #16181e 100%);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.5),
    inset 0 -3px 6px rgba(0, 0, 0, 0.4),
    0 2px 6px rgba(0, 0, 0, 0.35);
}

.player-ctrl-btn::before {
  content: "";
  position: absolute;
  left: 18%;
  top: 10%;
  width: 42%;
  height: 28%;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0));
  pointer-events: none;
  z-index: 0;
}

.player-ctrl-btn svg {
  position: relative;
  z-index: 1;
  width: 17px;
  height: 17px;
  fill: currentColor;
  display: block;
  flex-shrink: 0;
}

.player-ctrl-btn:hover {
  border-color: rgba(255, 255, 255, 0.7);
  filter: brightness(1.08);
}

.player-ctrl-btn--play {
  width: 44px;
  height: 44px;
  border-color: rgba(255, 210, 180, 0.75);
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.8) 0%, rgba(255, 200, 160, 0.3) 20%, transparent 46%),
    radial-gradient(circle at 50% 115%, rgba(80, 15, 0, 0.45) 0%, transparent 52%),
    linear-gradient(160deg, #ff7a3a 0%, #fc4c02 48%, #b83200 100%);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.6),
    inset 0 -4px 8px rgba(80, 10, 0, 0.4),
    0 3px 10px rgba(252, 76, 2, 0.4);
}

.player-ctrl-btn--play:hover {
  border-color: rgba(255, 230, 200, 0.9);
  filter: brightness(1.06);
}

.player-ctrl-btn--play svg {
  width: 18px;
  height: 18px;
}

.player-ctrl-btn--play .ico-play {
  margin-left: 2px;
}

/* Seguir ruta: activo = naranja (cámara pegada al punto) */
.player-ctrl-btn.is-follow-on {
  border-color: rgba(255, 210, 180, 0.75);
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.75) 0%, rgba(255, 200, 160, 0.25) 20%, transparent 46%),
    radial-gradient(circle at 50% 115%, rgba(80, 15, 0, 0.4) 0%, transparent 52%),
    linear-gradient(160deg, #ff7a3a 0%, #fc4c02 48%, #b83200 100%);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.55),
    inset 0 -3px 6px rgba(80, 10, 0, 0.35),
    0 2px 8px rgba(252, 76, 2, 0.35);
}

.player-ctrl-btn--play svg[hidden] {
  display: none !important;
}

.player-progress-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
  min-height: 32px;
  display: flex;
  align-items: flex-end;
  padding-top: 16px;
  overflow: hidden; /* pastilla dentro del wrap / barra negra */
}

.player-progress-km {
  position: absolute;
  top: 0;
  left: 0;
  transform: translateX(-50%);
  z-index: 2;
  padding: 2px 7px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.22), transparent 55%),
    rgba(10, 11, 14, 0.9);
  border: 1px solid rgba(252, 76, 2, 0.7);
  color: #ffe8d8;
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.2),
    0 1px 4px rgba(0, 0, 0, 0.35);
}

.player-progress-km::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -4px;
  border: 4px solid transparent;
  border-top-color: rgba(252, 76, 2, 0.7);
}

.player-3d input[type="range"] {
  width: 100%;
  flex: 1;
  height: 18px;
  margin: 0;
  accent-color: #fc4c02;
  cursor: pointer;
}

.player-3d input[type="range"]::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(0, 0, 0, 0.35));
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.45);
}

.player-3d input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -6px;
  border-radius: 50%;
  border: 1px solid rgba(255, 230, 200, 0.75);
  background:
    radial-gradient(circle at 32% 28%, #ffe0c2 0%, #fc4c02 45%, #9a2800 100%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.55),
    0 1px 4px rgba(0, 0, 0, 0.4);
}

.player-3d input[type="range"]::-moz-range-track {
  height: 5px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(0, 0, 0, 0.35));
}

.player-3d input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(255, 230, 200, 0.75);
  background:
    radial-gradient(circle at 32% 28%, #ffe0c2 0%, #fc4c02 45%, #9a2800 100%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.55);
}

.player-3d select {
  flex-shrink: 0;
  max-width: 150px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 7px 10px;
  color: #fff;
  font: inherit;
  font-size: 0.78rem;
  appearance: none;
  -webkit-appearance: none;
  background: linear-gradient(160deg, #3a404c, #1c1e24);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.25),
    inset 0 -2px 4px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

.player-3d select:focus {
  outline: none;
  border-color: rgba(252, 76, 2, 0.7);
}

.player-3d select option {
  background: #1a1c22;
  color: #fff;
}

.player-time {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: #f0f2f6;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
  flex-shrink: 0;
}

/* -------------------------------------------------------------------------- */
/* Upload modal                                                               */
/* -------------------------------------------------------------------------- */

.modal {
  border: none;
  padding: 0;
  background: transparent;
  color: inherit;
  max-width: calc(100vw - 24px);
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.65);
}

.modal-card {
  width: min(460px, 100%);
  background: var(--bg-elev);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.modal-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--stroke);
}

.modal-card h2 { margin: 0; font-size: 1.1rem; }

.icon-x {
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-card .field { padding: 0 16px; }

.dropzone {
  margin: 16px;
  width: auto;
  min-height: 110px;
  display: grid;
  place-items: center;
  text-align: center;
  cursor: pointer;
  border-style: dashed;
  transition: border-color 0.15s, background 0.15s;
}

.dropzone.dragover {
  border-color: var(--orange);
  background: var(--orange-glow);
}

.upload-preview {
  padding: 0 16px 8px;
  font-size: 0.85rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px;
}

/* -------------------------------------------------------------------------- */
/* Toast / loading                                                            */
/* -------------------------------------------------------------------------- */

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  max-width: min(90vw, 420px);
  text-align: center;
}

.toast.error { border-color: rgba(255, 90, 90, 0.5); }
.toast[hidden] { display: none; }

.loading {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.45);
  font-weight: 650;
}

.loading[hidden] { display: none; }

/* MapLibre overrides */
.maplibregl-ctrl-attrib { font-size: 10px !important; }

/* -------------------------------------------------------------------------- */
/* Planificador de rutas                                                      */
/* -------------------------------------------------------------------------- */

/* Un solo scroll = .planner-side (con lock-scroll la altura la da el flex) */
.planner-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  height: calc(100dvh - var(--app-main-header-h));
  max-height: calc(100dvh - var(--app-main-header-h));
  min-height: 360px;
  overflow: hidden;
}

.planner-map {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.app-build,
.planner-cb {
  display: block;
  margin-top: 2px;
  color: #60d394;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.planner-side {
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  min-height: 0;
  padding: 14px 16px;
  background: var(--bg-elev);
  border-left: 1px solid var(--stroke);
  display: grid;
  gap: 10px;
  align-content: start;
}

html.relivex-lock-scroll #view-planner .planner-side {
  overflow-y: auto;
  min-height: 0;
}

.planner-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
}

.planner-tabs .btn.active {
  border-color: var(--orange, #FC4C02);
  color: #fff;
}

.planner-gen-actions,
.planner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.planner-gmaps-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 12px;
  align-items: stretch;
}

.planner-gmaps-input {
  flex: 1 1 160px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  font: inherit;
}

.planner-gmaps-input:focus {
  outline: 1px solid #fc4c02;
  border-color: #fc4c02;
}

.planner-map.drawing-area {
  cursor: crosshair;
}

.planner-map.drawing-area .maplibregl-canvas {
  cursor: crosshair;
}

.planner-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.planner-stat {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--stroke);
}

.planner-stat span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
}

.planner-stat strong { font-size: 1.05rem; }

.planner-elev-wrap { height: 110px; }

.planner-recommend-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.planner-suggest {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.04);
}
/* Título largo no empuja los botones a 2 filas */
.planner-suggest > div:first-child {
  min-width: 0;
  flex: 1 1 auto;
}
.planner-suggest > div:first-child strong {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  word-break: break-word;
}

.planner-suggest--clickable {
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.planner-suggest--clickable:hover,
.planner-suggest--clickable:focus-visible {
  outline: none;
  border-color: rgba(252, 76, 2, 0.45);
  background: rgba(252, 76, 2, 0.08);
}

/* Avión canvas (sin caja; hélices en canvas cada frame) */
.maplibregl-marker.plan-hop-plane-marker,
.maplibregl-marker:has(.plan-hop-plane) {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: none !important;
}

.plan-hop-plane {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  filter: none !important;
  overflow: visible !important;
}

.plan-hop-plane-canvas {
  background: transparent !important;
  display: block;
}

/* POIs sobre la planificada: ocultos hasta ~30 m del punto */
.plan-route-poi {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  pointer-events: none;
  max-width: 140px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px) scale(0.92);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.plan-route-poi.is-near {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.plan-route-poi-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fc4c02;
  border: 2px solid #fff;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
}

.plan-route-poi-name {
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  background: rgba(12, 12, 12, 0.72);
  border: 1px solid rgba(252, 76, 2, 0.45);
  border-radius: 6px;
  padding: 2px 6px;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.planner-saved-actions {
  display: flex;
  flex-wrap: nowrap;
  flex-shrink: 0;
  gap: 4px;
  justify-content: flex-end;
  align-items: center;
  align-self: center;
}
.planner-saved-actions .btn {
  white-space: nowrap;
}

.planner-vault-tick {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 2px 6px;
  font-size: 0.75rem;
  color: #cbd5e1;
  cursor: pointer;
  user-select: none;
}

.planner-vault-tick input {
  accent-color: #fc4c02;
  cursor: pointer;
}

.planner-vault-tick input:disabled {
  cursor: default;
  opacity: 0.85;
}

.planner-count {
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.85em;
  letter-spacing: 0;
  text-transform: none;
}

.planner-edit-banner {
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(252, 76, 2, 0.15);
  border: 1px solid rgba(252, 76, 2, 0.35);
  color: #ffb080;
  font-size: 0.85rem;
  font-weight: 600;
}

.planner-edit-banner[hidden] {
  display: none !important;
}

.planner-saved-detail {
  margin-top: 14px;
}

.planner-saved-detail.hidden {
  display: none !important;
}

.planner-saved-detail h3 {
  word-break: break-word;
}

.diff-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.diff-verde { background: rgba(46, 204, 113, 0.25); color: #6ee7a0; }
.diff-azul { background: rgba(52, 152, 219, 0.25); color: #7ec8f5; }
.diff-roja { background: rgba(231, 76, 60, 0.25); color: #f5a39b; }

#plannerStatus.error { color: #e74c5e; }

.planner-pick-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.planner-pick-modes .btn.active {
  border-color: var(--orange, #FC4C02);
  color: #fff;
}

.planner-manual-hint {
  margin: 0 0 8px;
  font-size: 0.85rem;
}

/* Tarjetas Planificar: estética Relivex (textura + glow naranja) */
.planner-card,
.planner-manual-section {
  position: relative;
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
  padding: 16px 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(252, 76, 2, 0.45);
  overflow: hidden; /* textura; al abrir select → visible (ver :has abajo) */
  background-color: #121212;
  background-image:
    linear-gradient(
      155deg,
      rgba(252, 76, 2, 0.16) 0%,
      rgba(18, 18, 18, 0.5) 36%,
      rgba(10, 10, 10, 0.78) 100%
    ),
    url("../img/card-texture-c.jpg");
  background-size: auto, cover;
  background-repeat: no-repeat, no-repeat;
  background-position: center, center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 0 0 1px rgba(252, 76, 2, 0.12),
    0 0 0 1px rgba(252, 76, 2, 0.18),
    0 0 22px rgba(252, 76, 2, 0.16),
    0 14px 32px rgba(0, 0, 0, 0.5);
}

/* Menú custom no queda recortado (antes solo se veía 1 opción) */
.planner-card:has(.planner-custom-select.is-open),
.planner-manual-section:has(.planner-custom-select.is-open) {
  overflow: visible;
  z-index: 6;
}

.planner-card::before,
.planner-manual-section::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #fc4c02, rgba(252, 76, 2, 0.2));
  pointer-events: none;
}

.planner-card-title,
.planner-manual-sec-title {
  margin: 0;
  padding-left: 2px;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ff6a2a;
  text-shadow: 0 0 18px rgba(252, 76, 2, 0.4);
}

.planner-card .planner-manual-hint,
.planner-manual-section .planner-manual-hint {
  color: rgba(230, 230, 230, 0.86);
  line-height: 1.35;
}

.planner-card-note {
  margin: 2px 0 0;
  padding-left: 22px;
  position: relative;
  font-size: 0.8rem;
  color: rgba(190, 190, 190, 0.88);
  line-height: 1.35;
}

.planner-card-note::before {
  content: "i";
  position: absolute;
  left: 0;
  top: 0;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.75);
  font-size: 10px;
  font-weight: 700;
  font-style: italic;
  line-height: 13px;
  text-align: center;
}

.planner-card .field,
.planner-manual-section .field {
  margin-bottom: 2px;
}

.planner-card .field > span,
.planner-manual-section .field > span {
  color: rgba(210, 210, 210, 0.9);
}

.planner-field-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.planner-field-ico {
  flex: 0 0 42px;
  width: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(252, 76, 2, 0.35);
  background: linear-gradient(180deg, rgba(40, 40, 40, 0.9), rgba(12, 12, 12, 0.95));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -2px 4px rgba(0, 0, 0, 0.45),
    0 0 8px rgba(252, 76, 2, 0.12);
  color: #fc4c02;
  font-size: 1rem;
  font-weight: 700;
}

.planner-card .field input,
.planner-card .field select,
.planner-manual-section .field input,
.planner-manual-section .field select,
.planner-field-row input,
.planner-field-row select {
  flex: 1;
  min-width: 0;
  width: 100%;
  border: 1px solid rgba(252, 76, 2, 0.32);
  background: linear-gradient(180deg, #2a2a2a, #121212);
  background-color: #1a1a1a;
  color: #f0f0f0;
  color-scheme: dark;
  border-radius: 10px;
  padding: 11px 12px;
  box-shadow:
    inset 0 2px 5px rgba(0, 0, 0, 0.45),
    0 0 10px rgba(252, 76, 2, 0.08);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.planner-card .field input:focus,
.planner-card .field select:focus,
.planner-manual-section .field input:focus,
.planner-manual-section .field select:focus,
.planner-field-row input:focus,
.planner-field-row select:focus {
  outline: none;
  border-color: rgba(252, 76, 2, 0.7);
  box-shadow:
    inset 0 2px 5px rgba(0, 0, 0, 0.45),
    0 0 0 2px rgba(252, 76, 2, 0.22);
}

.planner-card .planner-search-block,
.planner-card .planner-pick-modes,
.planner-card .planner-wp-list,
.planner-card .planner-gen-actions,
.planner-card .planner-manual-hint:last-child,
.planner-manual-section .planner-search-block,
.planner-manual-section .planner-pick-modes,
.planner-manual-section .planner-wp-list,
.planner-manual-section .planner-gen-actions,
.planner-manual-section .planner-manual-hint:last-child {
  margin-bottom: 0;
}

.planner-card .planner-pick-modes .btn,
.planner-manual-section .planner-pick-modes .btn {
  background: rgba(20, 20, 20, 0.6);
  border-color: rgba(252, 76, 2, 0.25);
}

.planner-card .planner-wp-list,
.planner-manual-section .planner-wp-list {
  padding: 8px 8px 8px 22px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(252, 76, 2, 0.15);
}

.planner-card .planner-stat,
.planner-manual-section .planner-stat {
  background: rgba(0, 0, 0, 0.4);
  border-color: rgba(252, 76, 2, 0.18);
}

/* Desplegable custom Relivex (sustituye el menú nativo feo) */
.planner-custom-select {
  position: relative;
  flex: 1;
  min-width: 0;
}

.planner-select-native {
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
}

.planner-custom-select-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid rgba(252, 76, 2, 0.35);
  background: linear-gradient(180deg, #2a2a2a, #121212);
  color: #f0f0f0;
  text-align: left;
  cursor: pointer;
  box-shadow:
    inset 0 2px 5px rgba(0, 0, 0, 0.45),
    0 0 10px rgba(252, 76, 2, 0.08);
}

.planner-custom-select.is-open .planner-custom-select-btn,
.planner-custom-select-btn:focus {
  outline: none;
  border-color: rgba(252, 76, 2, 0.7);
  box-shadow:
    inset 0 2px 5px rgba(0, 0, 0, 0.45),
    0 0 0 2px rgba(252, 76, 2, 0.22);
}

.planner-custom-select-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.92rem;
}

.planner-custom-select-chev {
  flex: 0 0 auto;
  color: #fc4c02;
  font-size: 0.75rem;
  line-height: 1;
}

.planner-custom-select-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 90;
  margin: 0;
  padding: 6px;
  list-style: none;
  border-radius: 12px;
  border: 1px solid rgba(252, 76, 2, 0.4);
  background: #161616;
  background-image:
    linear-gradient(180deg, rgba(252, 76, 2, 0.08), transparent 40%),
    linear-gradient(#1a1a1a, #121212);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(252, 76, 2, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  max-height: 240px;
  overflow: auto;
}

.planner-custom-select-menu[hidden] {
  display: none !important;
}

.planner-custom-select-menu li {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  color: #f0f0f0;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.planner-custom-select-menu li:hover {
  background: rgba(252, 76, 2, 0.18);
  color: #fff;
}

.planner-custom-select-menu li.is-selected {
  background: #fc4c02;
  color: #fff;
  font-weight: 700;
}

.planner-custom-select-menu li.is-disabled {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}

.planner-search-block {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.planner-search-row {
  display: flex;
  gap: 6px;
}

.planner-search-row input {
  flex: 1;
  min-width: 0;
}

.planner-suggest-box {
  display: grid;
  gap: 4px;
  margin: -2px 0 8px;
  max-height: 160px;
  overflow: auto;
}

.planner-suggest-box[hidden] {
  display: none !important;
}

.planner-suggest-item {
  text-align: left;
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  font-size: 0.8rem;
  line-height: 1.3;
  cursor: pointer;
}

.planner-suggest-item:hover {
  border-color: rgba(252, 76, 2, 0.55);
  background: rgba(252, 76, 2, 0.1);
}

.planner-wp-list {
  margin: 0 0 10px;
  padding: 0 0 0 18px;
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
}

.planner-wp-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.planner-wp-list .wp-role {
  font-weight: 700;
  min-width: 4.5rem;
}

.planner-wp-list .wp-actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.planner-wp-list .wp-move {
  display: inline-flex;
  flex-direction: column;
  gap: 0;
}

.planner-wp-list .wp-ord,
.planner-wp-list .wp-del {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  padding: 2px 4px;
}

.planner-wp-list .wp-ord:hover:not(:disabled),
.planner-wp-list .wp-del:hover {
  color: #fff;
}

.planner-wp-list .wp-ord:disabled {
  opacity: 0.25;
  cursor: default;
}

.hidden { display: none !important; }

/* -------------------------------------------------------------------------- */
/* Clima / editor track / explorador (feat2)                                  */
/* -------------------------------------------------------------------------- */

.weather-card {
  border-color: rgba(252, 76, 2, 0.45);
  background: linear-gradient(160deg, rgba(252, 76, 2, 0.12), var(--bg-card) 55%);
}

.weather-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.weather-card-head h3 { margin: 0; }

.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
}

.weather-main {
  display: flex;
  align-items: center;
  gap: 14px;
}

.weather-icon {
  font-size: 2.4rem;
  line-height: 1;
}

.weather-temp {
  font-size: 1.6rem;
  font-weight: 800;
}

.weather-label {
  color: var(--muted, #a0a0a0);
  font-size: 0.95rem;
}

.weather-place {
  margin: 8px 0 0;
  font-size: 0.82rem;
  line-height: 1.35;
}

.weather-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 10px;
  font-size: 0.9rem;
}

.track-editor-modal .track-editor-card {
  width: min(720px, 96vw);
  max-height: 92vh;
  overflow: auto;
}

.track-editor-map {
  width: 100%;
  height: 240px;
  border-radius: 12px;
  overflow: hidden;
  background: #0e0e0e;
  margin: 8px 0;
}

.track-editor-elev-wrap {
  height: 110px;
  margin-bottom: 8px;
}

.trim-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.track-editor-stats {
  font-weight: 650;
  margin: 8px 0 4px;
}

.track-editor-actions {
  flex-wrap: wrap;
}

.explorer-layout {
  position: relative;
  height: calc(100vh - 64px);
  min-height: 360px;
}

.explorer-map {
  width: 100%;
  height: 100%;
}

.explorer-panel {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(2, minmax(110px, 1fr));
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(18, 18, 18, 0.88);
  border: 1px solid var(--stroke, #333);
  backdrop-filter: blur(10px);
  max-width: min(420px, calc(100% - 32px));
}

.explorer-stat {
  display: grid;
  gap: 2px;
}

.explorer-stat span {
  font-size: 11px;
  color: var(--muted, #a0a0a0);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.explorer-stat strong {
  font-size: 1.15rem;
}

/* -------------------------------------------------------------------------- */
/* Mapa de calor / segmentos / TRIMP (feat)                                   */
/* -------------------------------------------------------------------------- */

.heatmap-layout {
  height: calc(100vh - 64px);
  min-height: 360px;
}

.heatmap-map {
  width: 100%;
  height: 100%;
  border-radius: 0;
}

/* Ranking de vías — popup mapa + rider */
.roads-map-popup .maplibregl-popup-content {
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  color: #f8fafc;
  border: 1px solid rgba(255, 152, 0, 0.35);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    0 8px 24px rgba(0, 0, 0, 0.28);
  font-family: inherit;
}

.roads-map-popup .maplibregl-popup-tip {
  border-top-color: rgba(15, 23, 42, 0.42);
  border-bottom-color: rgba(15, 23, 42, 0.42);
}

.roads-map-popup .maplibregl-popup-close-button {
  color: #94a3b8;
  font-size: 18px;
  padding: 4px 8px;
  right: 2px;
  top: 2px;
}

.roads-map-popup .maplibregl-popup-close-button:hover {
  color: #ffb020;
  background: transparent;
}

.roads-popup-card {
  margin: 0;
  padding-right: 12px;
  min-width: 140px;
}

.roads-popup-title {
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.roads-popup-meta {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: #ffb020;
  letter-spacing: 0.02em;
}

.roads-day-rider {
  width: 44px;
  height: 44px;
  position: relative;
  pointer-events: none;
  user-select: none;
  z-index: 5;
}

.maplibregl-marker:has(.roads-day-rider) {
  z-index: 6 !important;
}

.roads-day-rider-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 152, 0, 0.35) 0%,
    rgba(255, 152, 0, 0.08) 55%,
    transparent 70%
  );
  box-shadow: 0 0 16px rgba(255, 152, 0, 0.55);
  animation: roads-rider-pulse 1.6s ease-in-out infinite;
}

.roads-day-rider-core {
  position: absolute;
  inset: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(160deg, #1e293b 0%, #0f172a 100%);
  border: 2px solid #ff9800;
  box-shadow:
    0 0 0 1px rgba(255, 176, 32, 0.25) inset,
    0 2px 8px rgba(0, 0, 0, 0.45);
}

.roads-day-rider-core svg {
  display: block;
}

@keyframes roads-rider-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.12);
    opacity: 1;
  }
}

/* Critters — zona a explorar (nebulosa): deambulan, no estáticos */
.roads-critter {
  width: 52px;
  height: 52px;
  position: relative;
  pointer-events: none;
  user-select: none;
}

.roads-critter--nessie {
  width: 58px;
  height: 36px;
}

.roads-critter--ghost {
  width: 54px;
  height: 34px;
}

.roads-critter--dragon {
  width: 48px;
  height: 52px;
}

.roads-critter--blob {
  width: 48px;
  height: 50px;
}

.roads-critter-aura {
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 34px;
  height: 34px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(57, 255, 20, 0.34) 0%,
    rgba(180, 90, 40, 0.14) 48%,
    transparent 72%
  );
  animation: roads-critter-aura 2.2s ease-in-out infinite;
}

.roads-critter--nessie .roads-critter-aura {
  background: radial-gradient(
    circle,
    rgba(57, 255, 20, 0.38) 0%,
    rgba(138, 61, 28, 0.14) 50%,
    transparent 72%
  );
}

.roads-critter--ghost .roads-critter-aura {
  background: radial-gradient(
    circle,
    rgba(109, 255, 58, 0.28) 0%,
    transparent 70%
  );
}

.roads-critter--dragon .roads-critter-aura {
  background: radial-gradient(
    circle,
    rgba(57, 255, 20, 0.36) 0%,
    rgba(184, 178, 166, 0.12) 50%,
    transparent 72%
  );
}

.roads-critter--blob .roads-critter-aura {
  background: radial-gradient(
    circle,
    rgba(34, 197, 94, 0.34) 0%,
    transparent 70%
  );
}

.roads-critter-bob {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: roads-critter-bob 1.8s ease-in-out infinite;
  transform-origin: center bottom;
}

.roads-critter.is-flip .roads-critter-bob {
  transform: scaleX(-1);
  animation-name: roads-critter-bob-flip;
}

.roads-critter--ghost .roads-critter-bob {
  animation-duration: 2.4s;
}

.roads-critter--nessie .roads-critter-bob {
  animation-duration: 2.1s;
}

.roads-critter--blob .roads-critter-bob {
  animation-duration: 1.5s;
}

.roads-critter-svg {
  display: block;
  filter: drop-shadow(0 0 7px rgba(57, 255, 20, 0.55));
}

.roads-critter--dragon .roads-critter-svg {
  filter: drop-shadow(0 0 7px rgba(57, 255, 20, 0.5));
}

.roads-critter--blob .roads-critter-svg {
  filter: drop-shadow(0 0 6px rgba(34, 197, 94, 0.5));
}

.roads-critter--ghost .roads-critter-svg {
  filter: drop-shadow(0 0 8px rgba(109, 255, 58, 0.45));
  opacity: 0.94;
}

.roads-critter--nessie .roads-critter-svg {
  filter: drop-shadow(0 0 8px rgba(57, 255, 20, 0.6));
}

.roads-critter--noodle,
.roads-critter--noodle2,
.roads-critter--noodle3 {
  width: 44px;
  height: 52px;
}

.roads-critter--noodle .roads-critter-aura,
.roads-critter--noodle2 .roads-critter-aura,
.roads-critter--noodle3 .roads-critter-aura {
  background: radial-gradient(
    circle,
    rgba(154, 171, 106, 0.36) 0%,
    rgba(61, 74, 34, 0.12) 50%,
    transparent 72%
  );
}

.roads-critter--noodle .roads-critter-svg,
.roads-critter--noodle2 .roads-critter-svg,
.roads-critter--noodle3 .roads-critter-svg {
  filter: drop-shadow(0 0 6px rgba(107, 122, 62, 0.55));
}

.roads-critter--noodle2 .roads-critter-bob {
  animation-duration: 2.6s;
}

.roads-critter--noodle3 .roads-critter-bob {
  animation-duration: 2.2s;
}

.roads-critter-ant {
  transform-origin: center bottom;
  animation: roads-critter-ant 1.1s ease-in-out infinite alternate;
}

.roads-critter-flame {
  animation: roads-critter-flame 0.55s ease-in-out infinite alternate;
}

.roads-critter-ness-tail {
  animation: roads-critter-ant 1.3s ease-in-out infinite alternate;
}

@keyframes roads-critter-bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes roads-critter-bob-flip {
  0%,
  100% {
    transform: scaleX(-1) translateY(0);
  }
  50% {
    transform: scaleX(-1) translateY(-5px);
  }
}

@keyframes roads-critter-aura {
  0%,
  100% {
    transform: translateX(-50%) scale(1);
    opacity: 0.75;
  }
  50% {
    transform: translateX(-50%) scale(1.18);
    opacity: 1;
  }
}

@keyframes roads-critter-ant {
  from {
    transform: rotate(-6deg);
  }
  to {
    transform: rotate(6deg);
  }
}

@keyframes roads-critter-flame {
  from {
    opacity: 0.65;
    transform: translateX(0);
  }
  to {
    opacity: 1;
    transform: translateX(2px);
  }
}

/* Ranking de vías (frío → caliente) */
.roads-layout {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 360px);
  height: calc(100vh - 64px);
  min-height: 360px;
}

.roads-map {
  width: 100%;
  height: 100%;
  border-radius: 0;
}

.roads-side {
  border-left: 1px solid var(--stroke);
  background: #161616;
  padding: 16px 14px 24px;
  overflow: auto;
  color: var(--text);
}

.roads-side-title {
  margin: 14px 0 4px;
  font-size: 1rem;
  font-weight: 750;
  color: #f0f0f0;
}

.roads-side-hint {
  margin: 0 0 14px;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
}

.roads-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #1e1e1e;
  border: 1px solid #2a2a2a;
}

.roads-legend-label {
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 700;
  color: #9a9a9a;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.roads-legend-bar {
  flex: 1 1 auto;
  min-width: 64px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    #2563eb 0%,
    #22d3ee 35%,
    #fbbf24 55%,
    #f97316 75%,
    #ef4444 100%
  );
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.roads-ranking-list {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 8px;
  width: 100%;
}

.roads-rank-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
}

.roads-rank-dates {
  margin: 0;
  padding: 10px 12px 12px 14px;
  border: 1px solid #2e2e2e;
  border-top: none;
  border-radius: 0 0 12px 12px;
  background: #141414;
}

.roads-rank-card.is-open .roads-rank-item {
  border-radius: 12px 12px 0 0;
}

.roads-dates-title {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9a9a9a;
}

.roads-visit-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 180px;
  overflow: auto;
}

.roads-visit-list li {
  margin: 0;
  padding: 0;
}

button.roads-visit-item,
.roads-visit-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  text-align: left;
  font: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 8px;
  border: 1px solid transparent;
  border-left: 2px solid var(--road-heat, #f97316);
  background: #1c1c1c !important;
  color: #f0f0f0 !important;
}

button.roads-visit-item:hover,
.roads-visit-item:hover,
button.roads-visit-item.is-active,
.roads-visit-item.is-active {
  border-color: rgba(255, 255, 255, 0.35);
  border-left-color: #fff;
  background: #262626 !important;
}

.roads-visit-list time {
  font-size: 0.86rem;
  font-weight: 700;
  color: #f0f0f0;
  font-variant-numeric: tabular-nums;
}

.roads-visit-name {
  font-size: 0.74rem;
  color: #9a9a9a;
  word-break: break-word;
}

.roads-visit-hint {
  font-size: 0.68rem;
  font-weight: 650;
  color: #c8c8c8;
  margin-top: 2px;
}

.roads-visit-empty {
  font-size: 0.8rem;
  color: #9a9a9a;
  border: none !important;
  background: transparent !important;
}

/* Forzar aspecto de fila: evita botón blanco del UA + texto claro invisible */
button.roads-rank-item,
.roads-rank-item {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 12px;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 12px 12px 12px 14px;
  text-align: left;
  font: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 12px;
  border: 1px solid #2e2e2e;
  border-left: 3px solid var(--road-heat, #2563eb);
  background: #1c1c1c !important;
  color: #f0f0f0 !important;
  box-shadow: none;
  transition: background 0.15s, border-color 0.15s;
}

button.roads-rank-item:hover,
.roads-rank-item:hover,
button.roads-rank-item.is-active,
.roads-rank-item.is-active {
  background: #262626 !important;
  border-color: rgba(252, 76, 2, 0.55);
  border-left-color: var(--road-heat, #fc4c02);
}

.roads-rank-num {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1;
  color: #0b1220;
  background: var(--road-heat, #2563eb);
}

.roads-rank-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.roads-rank-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.roads-rank-name {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.3;
  color: #f5f5f5;
  word-break: break-word;
}

.roads-rank-count {
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--road-heat, #f97316);
  padding-top: 1px;
}

.roads-rank-meta {
  font-size: 0.74rem;
  color: #9a9a9a;
}

.roads-rank-bar {
  display: block;
  width: 100%;
  height: 5px;
  margin-top: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.roads-rank-bar-fill {
  display: block;
  width: var(--road-bar, 40%);
  height: 100%;
  border-radius: inherit;
  background: var(--road-heat, #f97316);
}

.hr-donut-wrap {
  display: grid;
  grid-template-columns: minmax(140px, 180px) 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
}

/* —— Análisis: terreno / pendiente / escaladas (aditivo OnelapFit) —— */
.route-endpoints {
  display: grid;
  gap: 10px;
  margin-top: 4px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.22);
}
.route-endpoint {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 10px;
  align-items: start;
}
.route-endpoint-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}
.route-endpoint-dot--start { background: #22c55e; }
.route-endpoint-dot--end { background: #ef4444; }
.route-endpoint-label {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.route-endpoint-addr {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.35;
  word-break: break-word;
}

.slope-ascent-wrap {
  display: grid;
  grid-template-columns: minmax(140px, 180px) 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}
.slope-donut-canvas-wrap {
  position: relative;
  height: 160px;
}
.slope-legend {
  display: grid;
  gap: 6px;
  font-size: 0.78rem;
}
.slope-legend-row {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 6px 8px;
  align-items: center;
}
.slope-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.slope-legend-dist {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.slope-kpis {
  margin-bottom: 0;
}
.climb-sections-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.climb-sections-table th,
.climb-sections-table td {
  padding: 8px 6px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-variant-numeric: tabular-nums;
}
.climb-sections-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.table-wrap {
  max-height: 320px;
  overflow: auto;
}

@media (max-width: 720px) {
  .slope-ascent-wrap {
    grid-template-columns: 1fr;
  }
}

.hr-donut-canvas-wrap {
  position: relative;
  height: 160px;
}

.session-load-card .session-load-body {
  display: grid;
  gap: 4px;
  padding: 4px 0 2px;
}

.session-load-card [data-trimp-value] {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent, #FC4C02);
  line-height: 1.1;
}

.session-load-label {
  font-weight: 700;
  font-size: 1.05rem;
}

.session-load-card[data-load="low"] [data-trimp-value] { color: #5b9cff; }
.session-load-card[data-load="mod"] [data-trimp-value] { color: #5ecf7b; }
.session-load-card[data-load="opt"] [data-trimp-value] { color: #f0b429; }
.session-load-card[data-load="high"] [data-trimp-value] { color: #e74c5e; }

.segment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 12px;
}

.segments-list {
  display: grid;
  gap: 8px;
}

.segment-effort-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--stroke, #333);
}

.segment-effort-row strong {
  display: block;
  margin-bottom: 2px;
}

.segment-effort-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 650;
  white-space: nowrap;
}

.pr-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 22px;
  padding: 0 6px;
  border-radius: 6px;
  background: linear-gradient(135deg, #FC4C02, #ffb020);
  color: #111;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

/* -------------------------------------------------------------------------- */
/* Conversor por lotes + itinerario                                           */
/* -------------------------------------------------------------------------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay[hidden] { display: none !important; }
.modal-overlay .modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}
.batch-convert-card {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: min(85vh, 720px);
  overflow: auto;
  background: var(--card, #161a20);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}
.batch-convert-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.batch-convert-card h2 { margin: 0; font-size: 1.15rem; }
.batch-hint { margin: 0 0 12px; font-size: 0.85rem; }
.batch-drop { min-height: 110px; cursor: pointer; }
.batch-drop.dragover {
  border-color: var(--accent, #fc4c02);
  background: rgba(252, 76, 2, 0.08);
}
.batch-list {
  list-style: none;
  margin: 14px 0;
  padding: 0;
  max-height: 240px;
  overflow: auto;
}
.batch-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 6px;
  font-size: 0.82rem;
}
.batch-item .batch-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text, #f2f4f8);
}
.batch-item .batch-state { color: var(--muted, #9aa3b2); flex-shrink: 0; }
.batch-item.ok .batch-state { color: #60d394; }
.batch-item.err .batch-state { color: #ff6b6b; }
.batch-item.run .batch-state { color: #3dd4ff; }

/* Route ChronoFusion (aditivo; reutiliza batch-convert-card) */
.chrono-fusion-card {
  width: min(620px, 100%);
}
.chrono-status {
  margin: 10px 0 0;
  font-size: 0.85rem;
}
.chrono-summary {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.chrono-meta .chrono-title {
  margin: 0 0 4px;
  font-size: 1rem;
}
.chrono-glitch {
  margin: 6px 0 0;
  font-size: 0.8rem;
}
.chrono-src-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}
.chrono-src {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.82rem;
}
.chrono-src-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.chrono-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.chrono-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  background: rgba(252, 76, 2, 0.12);
  border: 1px solid rgba(252, 76, 2, 0.35);
  color: #ffb08a;
}
.analysis-sensor-note {
  margin: 8px 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.82rem;
  line-height: 1.35;
  background: rgba(252, 76, 2, 0.08);
  border: 1px solid rgba(252, 76, 2, 0.28);
  color: #ffc4a8;
}
.chrono-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
  margin: 10px 0 6px;
}
.chrono-kpi {
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.chrono-kpi span {
  display: block;
  font-size: 0.7rem;
  color: var(--muted, #9aa3b2);
  margin-bottom: 2px;
}
.chrono-kpi strong {
  font-size: 0.95rem;
  color: var(--text, #f2f4f8);
}
.chrono-hint {
  margin: 8px 0 0;
  font-size: 0.8rem;
}
.chrono-ok {
  margin: 12px 0 0;
  font-size: 0.88rem;
  color: #60d394;
}
.chrono-actions {
  flex-wrap: wrap;
  gap: 8px;
}

.itinerary-card {
  padding: 12px 14px;
}
.itinerary-card summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}
.itinerary-card summary::-webkit-details-marker { display: none; }
.itinerary-body { margin-top: 10px; }
.itinerary-summary {
  margin: 0 0 10px;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--text, #f2f4f8);
}
.road-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.road-chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(61, 212, 255, 0.12);
  border: 1px solid rgba(61, 212, 255, 0.28);
  color: #b8eefc;
  font-size: 0.75rem;
  font-weight: 600;
}
.telemetry-metrics {
  margin-top: 4px;
}

/* -------------------------------------------------------------------------- */
/* Responsive                                                                 */
/* -------------------------------------------------------------------------- */

@media (max-width: 960px) {
  .dashboard { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .totals-grid { grid-template-columns: repeat(2, 1fr); }
  .analysis-layout { grid-template-columns: 1fr; height: auto; }
  .analysis-map-wrap { height: 45vh; }
  .activity-card { grid-template-columns: 1fr; }
  .mini-map { width: 100%; height: 140px; }
  .hr-donut-wrap { grid-template-columns: 1fr; }
  .heatmap-layout { height: calc(100vh - 72px); }
  .roads-layout {
    grid-template-columns: 1fr;
    height: auto;
  }
  .roads-map { height: 42vh; min-height: 260px; }
  .roads-side {
    border-left: none;
    border-top: 1px solid var(--stroke);
    max-height: 48vh;
  }
  .trim-controls { grid-template-columns: 1fr; }
  .explorer-layout { height: calc(100vh - 72px); }
  .explorer-panel { grid-template-columns: 1fr 1fr; }
  .planner-layout {
    grid-template-columns: 1fr;
    height: auto;
    max-height: none;
    overflow: visible;
  }
  .planner-map { height: 42vh; min-height: 260px; }
  .planner-side { max-height: 52vh; }
  .hud-stack-3d {
    top: 64px;
    left: 10px;
    width: min(248px, calc(100vw - 20px));
    max-height: calc(100vh - 150px);
    overflow: auto;
  }
  .hud-3d {
    padding: 8px;
    gap: 6px;
  }
  .hud-compass-dome { width: 62px; height: 62px; }
  .hud-compass-ring { inset: 4px; }
  .hud-dial-readout strong { font-size: 0.92rem; }
  .hud-stat strong { font-size: 0.75rem; }
  .hud-charts-3d {
    padding: 8px;
  }
  .hud-charts-3d canvas { height: 40px; }
}

/* —— Grabar POIs en ruta (sesión GPS) —— */
.poi-ride-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(252, 76, 2, 0.12), transparent);
}
.poi-ride-bar.hidden,
.poi-ride-bar[hidden] {
  display: none !important;
}
.poi-ride-bar-main {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: baseline;
  min-width: 0;
}
.poi-ride-fix {
  font-family: ui-monospace, monospace;
  font-size: 0.82rem;
  color: var(--text);
}
.poi-ride-count {
  font-size: 0.8rem;
  font-weight: 600;
  color: #fc4c02;
}
.poi-ride-bar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}
.poi-ride-session-list {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  max-height: 4.5rem;
  overflow: auto;
  font-size: 0.78rem;
}
.poi-ride-session-list li {
  white-space: nowrap;
}
