#K_MPST_LMCP_I {
    --ki-rojo: #cc0000; --ki-rojo-suave: #b94040; --ki-activo: #1a1a1a; --ki-gris: #6f6f6f; --ki-gris-claro: #9a9a9a; --ki-raya: #e3e3e3;
    position: relative; display: block; margin: 0; padding: 0; border: 0; background: #fff; color: #000; text-align: left;
    font-family: Roboto, Arial, sans-serif; font-size: 1rem; font-weight: 400; line-height: 1.375;
  }
  #K_MPST_LMCP_I, #K_MPST_LMCP_I *, #K_MPST_LMCP_I *::before, #K_MPST_LMCP_I *::after { box-sizing: border-box; }
  /* Por si la web anfitriona trae estilos para estas etiquetas: aquí heredan los del gráfico */
  #K_MPST_LMCP_I :is(p, ol, ul, li, div, span, label, strong, section, figure, figcaption, table, caption, tr, th, td) { margin: 0; padding: 0; border: 0; list-style: none; font-family: inherit; font-size: inherit; font-weight: inherit; font-style: normal; line-height: inherit; color: inherit; text-transform: none; letter-spacing: normal; text-decoration: none; background: none; }
  #K_MPST_LMCP_I [hidden] { display: none !important; }
  #K_MPST_LMCP_I :focus-visible { outline: 2px solid var(--ki-rojo); outline-offset: 2px; }

  #K_MPST_LMCP_I .ki-titulo { margin: 0 0 4px; font-family: Merriweather, Georgia, serif; font-size: 1.375rem; font-weight: 700; line-height: 1.3; color: #000; text-wrap: balance; }
  #K_MPST_LMCP_I .ki-subtitulo { margin: 0 0 16px; color: var(--ki-gris); text-wrap: balance; }

  /* Pestañas: provincias o comunidades */
  #K_MPST_LMCP_I .ki-barra-mandos { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 12px; margin: 0 0 14px; border-bottom: 1px solid #dcdcdc; }
  #K_MPST_LMCP_I .ki-pestanas { display: flex; flex: 1 1 auto; flex-wrap: wrap; gap: 4px; border-bottom: 0; }
  #K_MPST_LMCP_I .ki-pestanas button {
    margin: 0 0 -1px; padding: 6px 10px; cursor: pointer; font-family: Roboto, Arial, sans-serif; font-size: 1rem; font-weight: 700; line-height: 1.375;
    color: #000; background: none; border: 0; border-bottom: 3px solid transparent; border-radius: 0; box-shadow: none; text-transform: none; letter-spacing: normal;
  }
  #K_MPST_LMCP_I .ki-pestanas button:hover { border-bottom-color: #b5b5b5; }
  #K_MPST_LMCP_I .ki-pestanas button[aria-pressed="true"] { border-bottom-color: var(--ki-activo); }

  /* Desplegable de la fuerza */
  #K_MPST_LMCP_I .ki-mandos { flex: 0 0 auto; margin: 0 0 0 auto; }
  #K_MPST_LMCP_I .ki-campo { display: flex; align-items: center; gap: 10px; font-weight: 700; }
  #K_MPST_LMCP_I .ki-select {
    -webkit-appearance: none; appearance: none; width: 11rem; max-width: 100%; margin: 0; min-height: 2.5rem; padding: 6px 36px 6px 10px; cursor: pointer;
    font-family: Roboto, Arial, sans-serif; font-size: 1rem; font-weight: 400; line-height: 1.375; color: #000; border: 1px solid #000; border-radius: 0; box-shadow: none; text-transform: none; letter-spacing: normal;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpolyline points='1,1.5 6,6.5 11,1.5' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 12px center;
  }
  #K_MPST_LMCP_I .ki-select:hover { border-color: var(--ki-rojo); }

  /* Leyenda: partidos en columnas equilibradas (ninguna tiene más de una fila de diferencia), en orden de votos */
  #K_MPST_LMCP_I .ki-leyenda { display: flex; gap: 0 20px; margin: 0 0 6px; padding: 0 0 12px; border-bottom: 1px solid #dcdcdc; }
  #K_MPST_LMCP_I .ki-ley-col { display: flex; flex: 1 1 0; flex-direction: column; gap: 2px; min-width: 0; }
  #K_MPST_LMCP_I .ki-ley-item {
    display: flex; align-items: center; gap: 8px; width: 100%; margin: 0; padding: 3px 0; cursor: pointer; text-align: left;
    font-family: Roboto, Arial, sans-serif; font-size: 1rem; font-weight: 400; line-height: 1.25; color: #000;
    background: none; border: 0; border-radius: 0; box-shadow: none; text-transform: none; letter-spacing: normal;
  }
  #K_MPST_LMCP_I .ki-ley-color { flex: none; width: 14px; height: 14px; background: var(--c, #ccc); }
  #K_MPST_LMCP_I .ki-ley-item:hover .ki-ley-nombre { text-decoration: underline; }
  #K_MPST_LMCP_I .ki-ley-item[aria-pressed="true"] { font-weight: 700; }
  #K_MPST_LMCP_I .ki-ayuda { margin: 0 0 16px; color: var(--ki-gris); }
  #K_MPST_LMCP_I .ki-escrutado strong { font-weight: 700; color: var(--ki-rojo-suave); }

  /* Tres filas (primera, segunda y tercera fuerza) con dos mapas cada una: 2026 y 2023 */
  #K_MPST_LMCP_I .ki-fila { margin: 0 0 18px; }
  #K_MPST_LMCP_I .ki-fila-titulo { margin: 0 0 6px; padding-bottom: 4px; border-bottom: 2px solid #000; font-size: 1.125rem; font-weight: 700; line-height: 1.3; }
  #K_MPST_LMCP_I .ki-pareja { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; }
  #K_MPST_LMCP_I .ki-mapa { min-width: 0; margin: 0; }
  #K_MPST_LMCP_I .ki-anio { display: block; margin: 0 0 2px; font-weight: 700; color: var(--ki-gris); }
  #K_MPST_LMCP_I .ki-mapa svg { display: block; width: 100%; height: auto; overflow: visible; }
  #K_MPST_LMCP_I .ki-region { stroke: #fff; stroke-width: .75px; vector-effect: non-scaling-stroke; cursor: pointer; transition: fill .4s ease, opacity .25s ease; }
  #K_MPST_LMCP_I .ki-region.ki-sel { stroke: #000; stroke-width: 2px; }
  #K_MPST_LMCP_I .ki-region.ki-apagado { opacity: .18; }
  #K_MPST_LMCP_I .ki-canarias { fill: none; stroke: #c8c8c8; stroke-width: 1px; vector-effect: non-scaling-stroke; }
  #K_MPST_LMCP_I .ki-siglas { pointer-events: none; font-family: Roboto, Arial, sans-serif; font-weight: 400; }
  #K_MPST_LMCP_I .ki-siglas text { font-family: inherit; font-size: inherit; font-weight: inherit; dominant-baseline: central; fill-opacity: .66; stroke: none; transition: fill-opacity .25s ease; }
  #K_MPST_LMCP_I .ki-siglas text.ki-apagado { fill-opacity: .15; }
  #K_MPST_LMCP_I.ki-sin-siglas .ki-siglas { display: none; }

  /* Ventana al pasar por encima de una región */
  #K_MPST_LMCP_I .ki-tip { position: absolute; z-index: 5; left: 0; top: 0; max-width: 15rem; padding: 8px 10px; pointer-events: none; background: #fff; border: 1px solid var(--ki-activo); }
  #K_MPST_LMCP_I .ki-tip-lugar { font-weight: 700; line-height: 1.3; }
  #K_MPST_LMCP_I .ki-tip-rango { line-height: 1.3; color: var(--ki-gris); }
  #K_MPST_LMCP_I .ki-tip-partido { margin-top: 6px; padding-left: 8px; border-left: 3px solid var(--c, #9a9a9a); line-height: 1.3; }
  #K_MPST_LMCP_I .ki-tip-partido strong { font-weight: 700; }

  #K_MPST_LMCP_I .ki-aviso { margin: 10px 0 0; padding-left: 10px; border-left: 3px solid var(--ki-rojo); color: var(--ki-rojo); }
  /* Pie: la hora de actualización como nota y, en otra línea, la fuente */
  #K_MPST_LMCP_I .ki-pie { margin: 6px 0 0; padding-top: 8px; border-top: 1px solid #dcdcdc; text-align: right; color: var(--ki-gris); }
  #K_MPST_LMCP_I .ki-oculto { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

  /* Estrecho (menos de 400 px de ancho del gráfico; la clase la pone el script) */
  #K_MPST_LMCP_I.ki-estrecho .ki-titulo { font-size: 1.25rem; }
  #K_MPST_LMCP_I.ki-estrecho .ki-pareja { column-gap: 8px; }

  @media (prefers-reduced-motion: reduce) {
    #K_MPST_LMCP_I .ki-region, #K_MPST_LMCP_I .ki-siglas text { transition: none !important; }
  }
