/* ============================================================
   Vías Verdes Murcia V5 — Layers Strip (Fase 1)
   Strip horizontal con subtabs + chips on/off. Reutiliza tokens.
   ============================================================ */

#layersStrip.vv-strip {
  position: fixed;
  top: max(88px, calc(env(safe-area-inset-top) + 8px));
  left: 50%;
  transform: translateX(-50%);
  width: min(900px, 70vw);
  z-index: 35;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  grid-template-areas:
    "pill tabs reset"
    "chips chips chips";
  align-items: center;
  gap: 8px 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 18px;
  box-shadow: 0 8px 30px rgba(26, 74, 24, 0.16);
  font-family: var(--font-base, 'Inter', system-ui, sans-serif);
}

/* ---------- Píldora ✦ N capas ---------- */

.vv-strip-pill {
  grid-area: pill;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 2px 6px rgba(26, 74, 24, 0.1);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--dur-fast, 150ms) var(--ease-snappy, ease),
              background var(--dur-fast, 150ms) ease;
}
.vv-strip-pill:hover { background: #fff; transform: translateY(-1px); }
.vv-strip-pill[aria-pressed="true"] {
  background: var(--color-brand);
  color: #fff;
  border-color: var(--color-brand);
}
.vv-strip-pill-star { font-size: 14px; line-height: 1; }
.vv-strip-pill-count { font-variant-numeric: tabular-nums; }
.vv-strip-pill-label { color: var(--text-muted); font-weight: 500; }
.vv-strip-pill[aria-pressed="true"] .vv-strip-pill-label { color: rgba(255, 255, 255, 0.85); }

/* ---------- Subtabs de grupo ---------- */

.vv-strip-tabs {
  grid-area: tabs;
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.vv-strip-tabs::-webkit-scrollbar { display: none; }

.vv-strip-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--dur-fast, 150ms) ease,
              color var(--dur-fast, 150ms) ease;
}
.vv-strip-tab:hover { background: rgba(0, 0, 0, 0.04); }
.vv-strip-tab.is-active {
  background: var(--color-brand);
  color: #fff;
  border-color: var(--color-brand);
}
.vv-strip-tab-emoji { font-size: 14px; line-height: 1; }
.vv-strip-tab-count {
  color: var(--text-muted);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  font-size: 11px;
}
.vv-strip-tab.is-active .vv-strip-tab-count { color: rgba(255, 255, 255, 0.85); }

/* ---------- Botón reset ---------- */

.vv-strip-reset {
  grid-area: reset;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.7);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--dur-fast, 150ms) ease;
}
.vv-strip-reset:hover { background: rgba(255, 255, 255, 0.95); }
.vv-strip-reset-label { font-size: 12px; }

/* ---------- Fila de chips ---------- */

.vv-strip-chips {
  grid-area: chips;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  padding-top: 4px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.vv-chip {
  --chip-color: #4A8C3F;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 10px 0 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.7);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--dur-fast, 150ms) ease,
              border-color var(--dur-fast, 150ms) ease,
              transform var(--dur-fast, 150ms) var(--ease-snappy, ease);
}
.vv-chip:hover { background: #fff; transform: translateY(-1px); }
.vv-chip.is-on {
  border-color: color-mix(in srgb, var(--chip-color) 60%, transparent);
  background: color-mix(in srgb, var(--chip-color) 12%, #fff);
}

.vv-chip-icon {
  width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--chip-color);
}
.vv-chip-icon svg { width: 18px; height: 18px; }
.vv-chip-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--chip-color);
}

.vv-chip-label { line-height: 1; }

.vv-chip-switch {
  position: relative;
  width: 32px; height: 18px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.12);
  transition: background .2s var(--ease-snappy, ease);
}
.vv-chip-switch-handle {
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  transition: transform .2s var(--ease-snappy, ease);
}
.vv-chip.is-on .vv-chip-switch { background: var(--chip-color); }
.vv-chip.is-on .vv-chip-switch-handle { transform: translateX(14px); }

/* ---------- Compact mode ---------- */

#layersStrip.vv-strip.is-compact {
  grid-template-columns: auto;
  grid-template-rows: auto;
  grid-template-areas: "pill";
  width: auto;
  padding: 8px 10px;
}
#layersStrip.vv-strip.is-compact .vv-strip-tabs,
#layersStrip.vv-strip.is-compact .vv-strip-chips,
#layersStrip.vv-strip.is-compact .vv-strip-reset {
  display: none;
}

/* ---------- Móvil ---------- */

@media (max-width: 768px) {
  #layersStrip.vv-strip {
    top: auto;
    left: 12px;
    right: 12px;
    bottom: calc(var(--sheet-handle-top, 140px) + 12px);
    width: auto;
    transform: none;
    grid-template-columns: auto 1fr auto;
    padding: 8px 10px;
  }
  .vv-strip-tab-label { display: none; }
  .vv-strip-reset-label { display: none; }
  .vv-strip-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .vv-strip-chips::-webkit-scrollbar { display: none; }
  .vv-chip { scroll-snap-align: start; }

  /* Fase 2B-2: fila de acciones y popover en móvil (el strip está abajo). */
  .vv-strip-actions { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .vv-strip-actions::-webkit-scrollbar { display: none; }
  .vv-strip-action-label { display: none; }
  .vv-filters-popover { top: auto; bottom: 100%; margin-top: 0; margin-bottom: 8px; right: auto; left: 0; }
}

/* ---------- prefers-reduced-motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .vv-strip-pill, .vv-strip-tab, .vv-strip-reset,
  .vv-chip, .vv-chip-switch, .vv-chip-switch-handle {
    transition: none !important;
  }
  .vv-strip-pill:hover, .vv-chip:hover { transform: none; }
}

/* ============================================================
   Fase 2B-2 — Fila de acciones del strip (filtros + estilo de mapa)
   ============================================================ */

#layersStrip.vv-strip.vv-strip--has-actions {
  grid-template-rows: auto auto auto;
  grid-template-areas:
    "pill tabs reset"
    "chips chips chips"
    "actions actions actions";
}

.vv-strip-actions {
  grid-area: actions;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(26, 74, 24, 0.10);
}

.vv-strip-action {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: var(--color-brand-dark, #1A4A18);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--dur-fast, 150ms) var(--ease-snappy, ease),
              box-shadow var(--dur-fast, 150ms) ease;
}
.vv-strip-action:hover { transform: translateY(-1px); }
.vv-strip-action.active { box-shadow: 0 2px 10px rgba(26, 74, 24, 0.45); }

.vv-strip-action-badge {
  display: inline-block;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #e8603c;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}
.vv-strip-action-badge.hidden { display: none; }

.vv-mapstyle {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
}
[data-theme="dark"] .vv-mapstyle { background: rgba(20, 32, 29, 0.5); }

#layersStrip.vv-strip.is-compact .vv-strip-actions { display: none; }

/* Popover de filtros — anclado bajo la fila de acciones del strip (que es position:fixed) */
.vv-filters-popover {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  width: 280px;
  max-width: calc(100vw - 24px);
  max-height: 60vh;
  overflow-y: auto;
  padding: 14px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(26, 74, 24, 0.22);
  z-index: 40;
}
[data-theme="dark"] .vv-filters-popover {
  background: rgba(20, 32, 29, 0.92);
  border-color: rgba(141, 186, 138, 0.25);
}
.vv-filters-popover.hidden { display: none; }

/* ============================================================
   R2a — Control "Capas y filtros" (píldora + popover/sheet)
   ============================================================ */

.lc-root {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 35;
  font-family: var(--font-base, 'Inter', system-ui, sans-serif);
}

/* ---------- Píldora trigger (glass sobre el mapa) ---------- */

.lc-trigger {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 8px 24px rgba(26, 74, 24, 0.18);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--dur-fast, 150ms) var(--ease-snappy, ease),
              background var(--dur-fast, 150ms) ease;
}
.lc-trigger:hover { background: #fff; transform: translateY(-1px); }
.lc-trigger:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; }
.lc-trigger-icon { font-size: 16px; line-height: 1; }
.lc-trigger-count {
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--color-brand, #4A8C3F);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 21px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ---------- Backdrop (solo móvil) ---------- */

.lc-backdrop {
  position: fixed;
  inset: 0;
  z-index: 44;
  background: rgba(26, 40, 24, 0.32);
}
.lc-backdrop.hidden { display: none; }

/* ---------- Panel: popover (escritorio) ---------- */

.lc-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 46;
  width: 380px;
  max-width: 92vw;
  max-height: 72vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border-color, rgba(0, 0, 0, 0.08));
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(15, 30, 12, 0.3);
}
.lc-panel.hidden { display: none; }

[data-theme="dark"] .lc-panel {
  background: #14201d;
  border-color: rgba(141, 186, 138, 0.25);
  color: #e8efe6;
}

.lc-grabber { display: none; }

/* ---------- Cabecera del panel ---------- */

.lc-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}
[data-theme="dark"] .lc-header { border-bottom-color: rgba(255, 255, 255, 0.1); }
.lc-header-icon { font-size: 18px; line-height: 1; }
.lc-header-titlebox {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.lc-header-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
[data-theme="dark"] .lc-header-title { color: #e8efe6; }
.lc-header-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-brand, #4A8C3F);
}
[data-theme="dark"] .lc-header-count { color: var(--color-brand-light, #8DBA8A); }
.lc-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-primary);
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dur-fast, 150ms) ease;
}
.lc-close:hover { background: rgba(0, 0, 0, 0.1); }
[data-theme="dark"] .lc-close { background: rgba(255, 255, 255, 0.08); color: #e8efe6; }

/* ---------- Cuerpo desplazable ---------- */

.lc-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.lc-section-label {
  font-size: 12.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  margin-bottom: 9px;
}

/* ============================================================
   Hub v8 (Pase 2) — pestañas, pastillas, subcapas, franja, estilo
   Todo consume tokens v8 (tokens.css). Los tintes DuoIcon los da
   [data-duo] en redesign-v8-chrome.css.
   ============================================================ */

/* ---------- Cajas DuoIcon ---------- */
.lc-duo { display: grid; place-items: center; flex: 0 0 auto; border-radius: 11px; overflow: hidden; }
.lc-duo svg { display: block; width: 100%; height: 100%; }
.lc-duo--trigger { width: 22px; height: 22px; border-radius: 7px; padding: 2px; }
.lc-duo--head { width: 38px; height: 38px; border-radius: 11px; padding: 6px; }
.lc-duo--tab { width: 24px; height: 24px; border-radius: 8px; padding: 3px; }
.lc-duo--pill { width: 40px; height: 40px; border-radius: 12px; padding: 7px; }
.lc-duo--sub { width: 17px; height: 17px; border-radius: 5px; padding: 1px; }
.lc-duo--tool { width: 30px; height: 30px; border-radius: 9px; padding: 4px; }

/* ---------- Franja de estado «Viendo:» ---------- */
.lc-strip { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin: 10px 16px 0; padding: 9px 12px; border-radius: 14px; background: var(--surface-sunken, #F6F8F4); border: 1px solid var(--line, #E1E6DC); }
.lc-strip-label { font-size: var(--fs-xs, 12px); font-weight: 800; color: var(--text-secondary); }
.lc-strip-empty { font-size: var(--fs-xs, 12px); color: var(--text-secondary); }
.lc-stoken { display: inline-flex; align-items: center; gap: 6px; padding: 4px 5px 4px 10px; border-radius: 999px; background: var(--surface, #fff); border: 1px solid var(--line, #E1E6DC); font-size: var(--fs-xs, 12px); font-weight: 700; color: var(--text-primary); }
.lc-stoken-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sc); }
.lc-stoken-x { width: 24px; height: 24px; border-radius: 50%; border: none; display: grid; place-items: center; cursor: pointer; background: var(--surface-sunken, #F6F8F4); color: var(--text-secondary); padding: 0; }
.lc-stoken-x svg { width: 10px; height: 10px; }
.lc-stoken-x:focus-visible { outline: none; box-shadow: var(--focus); }
.lc-stoken--brandy { background: var(--color-brand-soft, #EAF1E7); border-color: transparent; color: var(--color-brand-dark, #1A4A18); font-weight: 800; padding: 5px 11px; }

/* ---------- Lanzador de iconos (rejilla 3×3) + detalle (acordeón) ---------- */
.lc-launch { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.lc-launch > .lc-group { display: flex; }
.lc-launch .lc-pill,
.lc-launch-tile {
  position: relative; width: 100%; min-height: 78px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; text-align: center; padding: 9px 4px 8px;
  border: 1.5px solid var(--line, #E1E6DC); border-radius: 16px;
  background: var(--surface, #fff); cursor: pointer; font: inherit; color: var(--text-primary);
  transition: border-color var(--dur-fast, 150ms) ease, background var(--dur-fast, 150ms) ease, box-shadow var(--dur-fast, 150ms) ease;
}
.lc-launch .lc-pill:hover, .lc-launch-tile:hover { border-color: var(--line-strong, #C9D4C4); }
.lc-launch .lc-pill:focus-visible, .lc-launch-tile:focus-visible { outline: none; box-shadow: var(--focus); }
.lc-launch .lc-duo--pill { width: 36px; height: 36px; border-radius: 11px; padding: 7px; }
.lc-launch .lc-pill-txt { flex: 0 0 auto; width: 100%; display: flex; flex-direction: column; align-items: center; }
.lc-launch .lc-pill-title, .lc-launch-tile .lc-pill-title { font-size: 11px; font-weight: 700; line-height: 1.12; }
.lc-launch .lc-state { position: absolute; top: 6px; right: 6px; padding: 2px 6px; font-size: 10px; line-height: 1.4; max-width: calc(100% - 12px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }
.lc-launch .lc-group.is-on .lc-pill { background: color-mix(in srgb, var(--lc-color) 12%, var(--surface, #fff)); border-color: var(--lc-color); }
.lc-launch .lc-group:not(.is-on) .lc-duo--pill { filter: saturate(.5) opacity(.72); background: var(--surface-sunken, #F6F8F4); }
.lc-launch .lc-group.is-open .lc-pill,
.lc-launch-tile.is-open { border-color: var(--color-brand, #4A8C3F); box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-brand) 22%, transparent); }
.lc-launch-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font-size: 18px; background: var(--color-brand-soft, rgba(74,140,63,0.12)); color: var(--color-brand, #4A8C3F); }
.lc-launch-ic svg { width: 20px; height: 20px; }
[data-senior="on"] .lc-launch .lc-pill, [data-senior="on"] .lc-launch-tile { min-height: 104px; }

/* Detalle: una sección visible a la vez (acordeón). Cada subwrap/sección vive aquí. */
.lc-detail { display: flex; flex-direction: column; gap: 12px; }
.lc-detail:not(:has(> :not(.hidden))) { display: none; } /* sin sección abierta: sin hueco bajo la rejilla */
.lc-detail .lc-subwrap { margin: 0; border: 1.5px solid color-mix(in srgb, var(--lc-color) 30%, var(--line, #E1E6DC)); border-radius: 16px; padding: 14px 12px 12px; background: color-mix(in srgb, var(--lc-color) 5%, var(--surface, #fff)); }
.lc-estilo-section { display: flex; flex-direction: column; gap: 14px; }
.lc-estilo-section.hidden { display: none; }

/* ---------- Grupos: pastilla «Activar / ✓ Activa» ---------- */
.lc-groups { display: flex; flex-direction: column; gap: 8px; }
.lc-group { display: flex; flex-direction: column; }
.lc-pill { position: relative; z-index: 1; width: 100%; display: flex; align-items: center; gap: 11px; border: 1.5px solid var(--line, #E1E6DC); border-radius: 18px; padding: 8px 12px 8px 8px; background: var(--surface, #fff); cursor: pointer; font: inherit; color: var(--text-primary); text-align: left; min-height: var(--touch, 44px); transition: border-color var(--dur-fast, 150ms) ease, background var(--dur-fast, 150ms) ease; }
.lc-pill:hover { border-color: var(--line-strong, #C9D4C4); }
.lc-pill:focus-visible { outline: none; box-shadow: var(--focus); }
.lc-group.is-on .lc-pill { background: color-mix(in srgb, var(--lc-color) 10%, var(--surface, #fff)); border-color: var(--lc-color); }
.lc-group:not(.is-on) .lc-duo--pill { filter: saturate(.5) opacity(.72); background: var(--surface-sunken, #F6F8F4); }
.lc-pill-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lc-pill-title { font-size: var(--fs-sm, 14px); font-weight: 700; }
.lc-pill-sub { font-size: var(--fs-xs, 12px); color: var(--text-secondary); margin-top: 1px; }
.lc-state { font-size: var(--fs-xs, 12px); font-weight: 800; padding: 6px 12px; border-radius: 999px; flex: 0 0 auto; background: var(--surface-sunken, #F6F8F4); color: var(--text-secondary); white-space: nowrap; }
/* AA: texto blanco pequeño solo sobre la variante OSCURA del color (--lc-fill) */
.lc-group.is-on .lc-state { background: var(--lc-fill, var(--color-brand-dark, #1A4A18)); color: #fff; }

/* ---------- Subcapas: «N de M visibles · Todas · Ninguna» + chips ---------- */
.lc-subwrap { border: 1.5px solid color-mix(in srgb, var(--lc-color) 28%, var(--line, #E1E6DC)); border-top: none; border-radius: 0 0 16px 16px; margin: -10px 6px 0; padding: 14px 10px 10px; background: color-mix(in srgb, var(--lc-color) 4%, var(--surface, #fff)); }
.lc-subwrap.hidden { display: none; }
.lc-subhead { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.lc-sub-count { font-size: var(--fs-xs, 12px); font-weight: 700; color: var(--text-secondary); flex: 1; }
.lc-sub-all, .lc-sub-none { border: none; background: none; font: inherit; font-size: var(--fs-xs, 12px); font-weight: 800; color: var(--color-brand, #4A8C3F); cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.lc-sub-all:hover, .lc-sub-none:hover { background: var(--state-hover, rgba(74, 140, 63, .08)); }
.lc-sub-all:focus-visible, .lc-sub-none:focus-visible { outline: none; box-shadow: var(--focus); }
.lc-subs { display: flex; flex-wrap: wrap; gap: 6px; }
.lc-sub { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 3px 11px; border-radius: 999px; border: 1.5px solid var(--line, #E1E6DC); background: var(--surface, #fff); font: inherit; font-size: var(--fs-xs, 12px); font-weight: 600; color: var(--text-secondary); cursor: pointer; transition: border-color var(--dur-fast, 150ms) ease, background var(--dur-fast, 150ms) ease, opacity var(--dur-fast, 150ms) ease; }
.lc-sub-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lc-color); flex: 0 0 auto; }
.lc-sub-svg { width: 15px; height: 15px; display: inline-flex; color: var(--lc-color); }
.lc-sub-svg svg { width: 15px; height: 15px; }
.lc-sub-label { line-height: 1.2; }
.lc-sub.is-on { border-color: var(--lc-color); background: color-mix(in srgb, var(--lc-color) 12%, var(--surface, #fff)); color: var(--text-primary); font-weight: 700; }
.lc-sub:not(.is-on) { opacity: .62; }
.lc-sub:not(.is-on) .lc-duo--sub { filter: saturate(.45) opacity(.7); }
.lc-sub-check { display: none; color: var(--lc-fill, #1A4A18); }
.lc-sub-check svg { width: 11px; height: 11px; }
.lc-sub.is-on .lc-sub-check { display: inline-flex; }
.lc-sub:focus-visible { outline: none; box-shadow: var(--focus); }

/* Sub-rejilla de iconos (icono + texto), SIEMPRE en rejilla y responsiva por ancho.
   Las 8 vías caen en ~3 por fila (3+3+2). Se reposiciona sola según el ancho del
   panel (popover ~380px → 3 col; bottom-sheet móvil más ancho → 4 col). */
.lc-subs--icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.lc-subs--icons .lc-sub { flex-direction: column; justify-content: center; gap: 6px; min-height: 78px; padding: 10px 6px 8px; border-radius: 14px; text-align: center; opacity: 1; }
.lc-subs--icons .lc-sub:not(.is-on) { opacity: .62; }
.lc-subs--icons .lc-duo--sub { width: 34px; height: 34px; border-radius: 10px; padding: 5px; }
.lc-subs--icons .lc-sub-dot { width: 14px; height: 14px; }
.lc-subs--icons .lc-sub-svg, .lc-subs--icons .lc-sub-svg svg { width: 22px; height: 22px; }
.lc-subs--icons .lc-sub-label { font-size: 11px; line-height: 1.15; }
.lc-subs--icons .lc-sub-check { position: absolute; top: 6px; right: 6px; }
[data-senior="on"] .lc-subs--icons { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); }
[data-senior="on"] .lc-subs--icons .lc-sub { min-height: 96px; }
[data-senior="on"] .lc-subs--icons .lc-duo--sub { width: 44px; height: 44px; border-radius: 13px; padding: 7px; }

/* ---------- Estilo de mapa: miniaturas con degradado ---------- */
.lc-mapstyle { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.lc-style-tile { border: 1.5px solid var(--line, #E1E6DC); border-radius: 14px; background: var(--surface, #fff); padding: 7px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; font: inherit; color: var(--text-primary); transition: border-color var(--dur-fast, 150ms) ease, background var(--dur-fast, 150ms) ease; }
.lc-style-tile:hover { border-color: var(--line-strong, #C9D4C4); }
.lc-style-tile:focus-visible { outline: none; box-shadow: var(--focus); }
.lc-style-tile.is-active { border-color: var(--color-brand, #4A8C3F); background: var(--color-brand-soft, #EAF1E7); }
.lc-style-thumb { width: 100%; height: 44px; border-radius: 9px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.lc-style-thumb[data-thumb="mapa"] { background: linear-gradient(135deg, #EDF2E4, #CFE0E4); }
.lc-style-thumb[data-thumb="claro"] { background: linear-gradient(135deg, #F7F7F2, #E3E6DC); }
.lc-style-thumb[data-thumb="oscuro"] { background: linear-gradient(135deg, #27323B, #141C22); }
.lc-style-thumb[data-thumb="satelite"] { background: linear-gradient(135deg, #3A5A44, #7D8F6A); }
.lc-style-thumb[data-thumb="topo"] { background: linear-gradient(135deg, #EAE4D2, #C9CFAE); }
.lc-style-label { font-size: var(--fs-xs, 12px); font-weight: 700; }
@media (max-width: 480px) { .lc-mapstyle { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Pase 6: toggle Relieve 3D ---------- */
.lc-terrain-toggle {
  display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 10px;
  min-height: 44px; padding: 0 14px; border-radius: 14px;
  border: 1.5px solid var(--line, #E1E6DC); background: var(--surface, #fff);
  cursor: pointer; font: inherit; font-size: var(--fs-xs, 12px); font-weight: 700;
  color: var(--text-primary, #1C2418);
  transition: border-color var(--dur-fast, 150ms) ease, background var(--dur-fast, 150ms) ease;
}
.lc-terrain-toggle:hover { border-color: var(--line-strong, #C9D4C4); }
.lc-terrain-toggle:focus-visible { outline: none; box-shadow: var(--focus); }
.lc-terrain-toggle[aria-pressed="true"] {
  border-color: var(--color-brand, #4A8C3F); background: var(--color-brand-soft, #EAF1E7);
}
[data-senior="on"] .lc-terrain-toggle { min-height: var(--touch, 56px); }

/* ---------- Leyenda de rutas (pestaña Estilo) ---------- */
.lc-legend { margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--line, #E1E6DC); }
.lc-legend-items { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; margin-top: 6px; }

/* ---------- Dark: tinta sobre superficies oscuras ----------
   El resto del bloque hereda el flip de tokens; estos dos usan colores
   pensados para fondo claro y necesitan override explícito. */
[data-theme="dark"] .lc-stoken--brandy { color: var(--color-brand-light, #8DBA8A); }
[data-theme="dark"] .lc-sub-check { color: var(--lc-color); }

/* ---------- Móvil: bottom-sheet (conservado del panel anterior) ---------- */
@media (max-width: 768px) {
  .lc-root { top: 70px; }
  .lc-panel { position: fixed; top: auto; bottom: 0; left: 0; right: 0; transform: none; width: 100%; max-width: 100%; height: 82%; max-height: 82%; border-radius: 22px 22px 0 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25); padding-bottom: env(safe-area-inset-bottom); }
  .lc-grabber { display: block; width: var(--grabber-w, 40px); height: var(--grabber-h, 4px); border-radius: 99px; background: #d4dacd; margin: 10px auto 2px; }
}

/* ---------- Sección "Filtrar rutas" ---------- */

.lc-filters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.lc-filters-head .lc-section-label { margin-bottom: 0; }

.lc-filters-clear {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: none;
  color: #D6473B; /* --red del lienzo v8 */
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 6px;
}
.lc-filters-clear:hover { text-decoration: underline; }
.lc-filters-clear:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; }
.lc-filters-clear.hidden { display: none; }

.lc-filter-group { margin-top: 12px; }
.lc-filter-group:first-of-type { margin-top: 4px; }
.lc-filter-group-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 7px;
}
.lc-filter-chips { display: flex; flex-wrap: wrap; gap: 7px; }

.lc-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1.5px solid var(--border-color, rgba(0, 0, 0, 0.1));
  background: #fff;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--dur-fast, 150ms) ease, background var(--dur-fast, 150ms) ease;
}
.lc-filter-chip:hover { border-color: var(--color-brand-light, #8DBA8A); }
.lc-filter-chip:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; }
.lc-filter-chip[aria-pressed="true"] {
  border-color: var(--color-brand, #4A8C3F);
  background: var(--color-brand-soft, rgba(74, 140, 63, 0.12));
  color: var(--color-brand-dark, #1A4A18);
}
.lc-filter-chip-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.lc-filter-chip-icon { font-size: 14px; line-height: 1; }
.lc-filter-chip-label { line-height: 1; }
.lc-filters-foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.lc-filters-note { flex: 1; font-size: var(--fs-xs, 12px); color: var(--text-secondary); }
[data-theme="dark"] .lc-filter-chip { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.12); color: #cbd5c4; }
[data-theme="dark"] .lc-filter-chip[aria-pressed="true"] { background: rgba(74, 140, 63, 0.24); border-color: var(--color-brand-light, #8DBA8A); color: #e8efe6; }

/* ---------- Badge con filtros activos ---------- */

.lc-trigger-count.lc-filter-active {
  position: relative;
  background: var(--color-brand-dark, #1A4A18);
}
.lc-trigger-count.lc-filter-active::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e8603c;
  border: 1.5px solid #fff;
}

/* ---------- prefers-reduced-motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .lc-trigger, .lc-pill, .lc-sub, .lc-tab, .lc-state,
  .lc-style-tile, .lc-close, .lc-filter-chip {
    transition: none !important;
  }
  .lc-trigger:hover { transform: none; }
}

/* ---------- R8: sección "Explorar" (herramientas) en el panel de Capas ---------- */
.lc-tools { display: flex; flex-direction: column; gap: 6px; }
.lc-tool {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--border-color, rgba(0,0,0,0.08)); background: #fff;
  cursor: pointer; width: 100%; text-align: left;
  transition: border-color .15s ease, background .15s ease;
}
.lc-tool:hover { border-color: var(--color-brand, #4A8C3F); background: var(--color-brand-soft, rgba(74,140,63,0.08)); }
.lc-tool:focus-visible { outline: 2px solid var(--color-brand, #4A8C3F); outline-offset: 2px; }
.lc-tool-ic { width: 30px; height: 30px; flex-shrink: 0; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 17px; background: var(--color-brand-soft, rgba(74,140,63,0.12)); }
.lc-tool-ic svg { width: 18px; height: 18px; }
.lc-tool-label { flex: 1; min-width: 0; font-size: 14px; font-weight: 700; color: var(--text-primary); }
.lc-tool-chevron { color: var(--text-muted); font-size: 18px; font-weight: 700; }
[data-theme="dark"] .lc-tool { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.1); }
[data-theme="dark"] .lc-tool-label { color: #e8efe6; }
