/* =====================================================
   LÍNEAS Y HORARIOS (views/frontend/lineasyhorarios.php)
   La placa de línea usa el color real del GTFS (verde CRTM
   interurbano, rojo urbano); el resto se apoya en la marca.
===================================================== */

.lh {
    padding: var(--lv-s5) 0 var(--lv-s7);
}

/* --- Pestañas --- */

/* Las pestañas pasan a otra fila en vez de desplazarse en horizontal:
   con zoom alto todas siguen a la vista (WCAG 1.4.10) */
.lh-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0 var(--lv-s1);
    margin-bottom: var(--lv-s4);
    border-bottom: 1px solid var(--lv-rule);
}

.lh-tabs [role="tab"] {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    flex: 0 0 auto;
    min-height: 52px;
    padding: 0 1.25rem;
    border: 0;
    background: none;
    color: var(--lv-ink-2);
    font-family: var(--lv-font-display);
    font-size: var(--lv-fs-md);
    font-weight: 500;
    cursor: pointer;
    box-shadow: inset 0 -3px 0 transparent;
    transition: color .15s ease, box-shadow .15s ease;
}

.lh-tabs [role="tab"] .bi {
    font-size: 1.05em;
}

.lh-tabs [role="tab"]:hover {
    color: var(--lv-ink);
    box-shadow: inset 0 -3px 0 var(--lv-rule);
}

.lh-tabs [role="tab"][aria-selected="true"] {
    color: var(--lv-ink);
    font-weight: 600;
    box-shadow: inset 0 -3px 0 var(--lv-green);
}

.lh-tabs [role="tab"]:focus-visible {
    outline: 3px solid var(--lv-blue);
    outline-offset: -3px;
}

.lh-panel:focus-visible {
    outline: 3px solid var(--lv-blue);
    outline-offset: 6px;
}

.lh-intro {
    max-width: 62ch;
    margin: 0 0 var(--lv-s3);
    color: var(--lv-ink-2);
}

/* --- Placa de línea --- */

.lh-code {
    --lh-line: var(--lv-graphite);
    --lh-line-ink: var(--lv-white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 3.5rem;
    height: 2rem;
    padding: 0 .5rem;
    border-radius: var(--lv-radius-sm);
    background: var(--lh-line);
    color: var(--lh-line-ink);
    font-family: var(--lv-font-display);
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: .01em;
}

.lh-code--sm {
    min-width: 2.5rem;
    height: 1.5rem;
    padding: 0 .375rem;
    font-size: .875rem;
}

/* --- Ficheros --- */

.lh-group {
    margin: var(--lv-s5) 0 var(--lv-s2);
    font-size: var(--lv-fs-lg);
}

.lh-group:first-of-type {
    margin-top: 0;
}

.lh-files {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--lv-ink);
}

.lh-file {
    display: grid;
    grid-template-columns: 4.25rem minmax(0, 1fr) auto;
    align-items: center;
    column-gap: var(--lv-s2);
    row-gap: .5rem;
    padding: .625rem 0;
    border-bottom: 1px solid var(--lv-rule);
}

.lh-file__name {
    font-weight: 500;
    line-height: 1.3;
}

.lh-file__docs {
    display: flex;
    gap: .5rem;
}

.lh-pdf {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .375rem;
    min-height: 40px;
    padding: 0 .875rem;
    border: 1px solid var(--lv-rule);
    border-radius: var(--lv-radius-sm);
    color: var(--lv-ink);
    font-size: var(--lv-fs-sm);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.lh-pdf span {
    color: var(--lv-ink-2);
    font-weight: 400;
}

.lh-pdf .bi {
    color: var(--lv-green);
}

.lh-pdf:hover {
    border-color: var(--lv-green);
    background: var(--lv-platform);
    color: var(--lv-green-ink);
}

.lh-pdf:focus-visible {
    outline: none;
    box-shadow: var(--lv-focus);
}

.lh-pdf.is-missing {
    border-style: dashed;
    color: var(--lv-ink-2);
    font-weight: 400;
}

/* --- Barra de selección --- */

.lh-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: var(--lv-s2) var(--lv-s3);
    margin-bottom: var(--lv-s3);
}

.lh-field {
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.lh-field label,
.lh-field legend {
    margin-bottom: .375rem;
    padding: 0;
    color: var(--lv-ink-2);
    font-size: var(--lv-fs-sm);
    font-weight: 600;
}

.lh-field select {
    width: min(100%, 36rem);
    min-height: 48px;
    padding: 0 2.5rem 0 .875rem;
    border: 1px solid #9AA39F;
    border-radius: var(--lv-radius-sm);
    background: var(--lv-white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231C2420' stroke-width='2'/%3E%3C/svg%3E") no-repeat right .875rem center;
    color: var(--lv-ink);
    font: 500 var(--lv-fs-base) / 1.2 var(--lv-font);
    appearance: none;
    cursor: pointer;
}

.lh-field select:focus-visible {
    outline: none;
    box-shadow: var(--lv-focus);
}

.lh-dir[hidden] {
    display: none;
}

.lh-dir__options {
    display: flex;
    flex-wrap: wrap;
}

.lh-dir__options input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.lh-dir__options label {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 48px;
    max-width: 20rem;
    margin: 0 -1px 0 0;
    padding: .375rem .875rem;
    border: 1px solid #9AA39F;
    background: var(--lv-white);
    color: var(--lv-ink);
    line-height: 1.25;
    cursor: pointer;
}

.lh-dir__options label:first-of-type {
    border-radius: var(--lv-radius-sm) 0 0 var(--lv-radius-sm);
}

.lh-dir__options label:last-of-type {
    border-radius: 0 var(--lv-radius-sm) var(--lv-radius-sm) 0;
}

.lh-dir__options label strong {
    font-size: var(--lv-fs-sm);
}

.lh-dir__options label span {
    color: var(--lv-ink-2);
    font-size: var(--lv-fs-xs);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lh-dir__options input:checked + label {
    position: relative;
    border-color: var(--lv-green);
    background: var(--lv-platform);
    box-shadow: inset 0 -3px 0 var(--lv-green);
}

.lh-dir__options input:focus-visible + label {
    position: relative;
    z-index: 1;
    box-shadow: var(--lv-focus);
}

/* --- Mapa + lista --- */

.lh-board {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 25rem);
    height: clamp(460px, 70vh, 700px);
    border: 1px solid var(--lv-rule);
    border-radius: var(--lv-radius);
    overflow: hidden;
    background: var(--lv-white);
}

.lh-map {
    position: relative;
    min-height: 0;
    background: var(--lv-platform);
    z-index: 0;
}

.lh-map__error {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    margin: 0;
    padding: var(--lv-s3);
    color: var(--lv-ink-2);
    text-align: center;
}

.lh-side {
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-left: 1px solid var(--lv-rule);
}

.lh-side__head {
    padding: var(--lv-s2) var(--lv-s2) .75rem;
    border-bottom: 1px solid var(--lv-rule);
}

.lh-board[data-state="loading"] .lh-side {
    opacity: .65;
}

.lh-line-title {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 0 0 .25rem;
    font-size: var(--lv-fs-md);
    line-height: 1.2;
}

.lh-line-meta,
.lh-empty {
    margin: 0;
    color: var(--lv-ink-2);
    font-size: var(--lv-fs-sm);
}

.lh-note {
    max-width: 75ch;
    margin: .75rem 0 0;
    color: var(--lv-ink-2);
    font-size: var(--lv-fs-xs);
}

.lh-note[hidden] {
    display: none;
}

/* Lista de paradas dibujada como el esquema de recorrido */

.lh-stops,
.lh-zone-stops {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.lh-stops {
    --lh-line: var(--lv-graphite);
    padding: .5rem 0 1rem;
}

.lh-stop {
    position: relative;
}

.lh-stop::before {
    content: "";
    position: absolute;
    left: 1.25rem;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--lh-line);
}

.lh-stop:first-child::before {
    top: 1.15rem;
}

.lh-stop:last-child::before {
    bottom: calc(100% - 1.15rem);
}

.lh-stop button,
.lh-zone-stop button {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    border: 0;
    background: none;
    color: var(--lv-ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.lh-stop button {
    padding: .5rem 1rem .5rem 2.75rem;
}

.lh-stop button::before {
    content: "";
    position: absolute;
    left: calc(1.25rem + 2px);
    top: 1.15rem;
    width: 14px;
    height: 14px;
    border: 3px solid var(--lh-line);
    border-radius: 50%;
    background: var(--lv-white);
    box-shadow: 0 0 0 1px rgba(28, 36, 32, .55);
    transform: translate(-50%, -50%);
    transition: transform .15s ease, background-color .15s ease;
}

.lh-stop.is-terminal button::before {
    width: 18px;
    height: 18px;
    background: var(--lv-ink);
}

.lh-stop button:hover,
.lh-zone-stop button:hover {
    background: var(--lv-platform);
}

.lh-stop.is-selected button,
.lh-zone-stop.is-selected button {
    background: var(--lv-platform);
    box-shadow: inset 3px 0 0 var(--lv-green);
}

.lh-stop.is-selected button::before {
    background: var(--lh-line);
    transform: translate(-50%, -50%) scale(1.3);
}

.lh-stop.is-selected .lh-stop__name,
.lh-zone-stop.is-selected .lh-stop__name {
    font-weight: 600;
}

.lh-stop button:focus-visible,
.lh-zone-stop button:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 3px var(--lv-blue);
}

.lh-stop__name {
    font-size: var(--lv-fs-sm);
    font-weight: 500;
    line-height: 1.3;
}

.lh-stop__meta {
    color: var(--lv-ink-2);
    font-size: var(--lv-fs-xs);
}

.lh-zone-stop {
    border-bottom: 1px solid var(--lv-rule);
}

.lh-zone-stop button {
    gap: .125rem;
    padding: .625rem var(--lv-s2);
}

.lh-zone-stops > .lh-empty {
    padding: var(--lv-s2);
}

.lh-zone-stop__lines {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
    margin-top: .375rem;
}

.lh-zone-stop__none {
    color: var(--lv-ink-2);
    font-size: var(--lv-fs-xs);
}

/* --- Marcadores y ventanas del mapa --- */

.lh-pin span {
    display: block;
    width: 100%;
    height: 100%;
    border: 3px solid var(--lh-line, var(--lv-graphite));
    border-radius: 50%;
    background: var(--lv-white);
    box-shadow: 0 0 0 1.5px rgba(28, 36, 32, .75);
    transition: transform .15s ease;
}

.lh-pin--terminal span {
    border-width: 4px;
    background: var(--lv-ink);
}

.lh-pin--zone span {
    border-color: var(--lv-blue);
}

.lh-pin.is-selected span {
    background: var(--lh-line, var(--lv-blue));
    transform: scale(1.4);
    box-shadow: 0 0 0 2px var(--lv-ink), 0 0 0 5px rgba(255, 255, 255, .9);
}

.lh-pin--zone.is-selected span {
    background: var(--lv-blue);
}

.lh-pin:focus-visible {
    outline: 3px solid var(--lv-blue);
    outline-offset: 3px;
    border-radius: 50%;
}

.lh-pop strong {
    display: block;
    margin-bottom: .125rem;
    font-family: var(--lv-font-display);
    font-size: 1rem;
    color: var(--lv-ink);
}

.lh-pop > span {
    display: block;
    color: var(--lv-ink-2);
    font-size: .8125rem;
}

.lh .leaflet-container {
    font-family: var(--lv-font);
}

.lh .leaflet-bar a:focus-visible {
    outline: 3px solid var(--lv-blue);
    outline-offset: 0;
}

/* --- Responsive --- */

@media (max-width: 991px) {

    .lh-board {
        grid-template-columns: 1fr;
        grid-template-rows: clamp(300px, 52vh, 460px) auto;
        height: auto;
    }

    .lh-side {
        max-height: 60vh;
        border-left: 0;
        border-top: 1px solid var(--lv-rule);
    }
}

@media (max-width: 640px) {

    .lh {
        padding-top: var(--lv-s4);
    }

    .lh-tabs {
        gap: 0;
    }

    .lh-tabs [role="tab"] {
        flex: 1 0 auto;
        justify-content: center;
        padding: 0 .75rem;
        font-size: var(--lv-fs-base);
    }

    .lh-file {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .lh-file__docs {
        grid-column: 1 / -1;
    }

    .lh-pdf {
        flex: 1 1 0;
    }

    .lh-toolbar,
    .lh-field,
    .lh-field select {
        width: 100%;
    }

    .lh-dir__options label {
        flex: 1 1 0;
        min-width: 0;
        max-width: none;
    }
}

@media (prefers-reduced-motion: reduce) {

    .lh-tabs [role="tab"],
    .lh-stop button::before,
    .lh-pin span,
    .lh-tt__chev {
        transition: none;
    }
}


/* =====================================================
   ENLACE «HORARIOS» EN LAS PARADAS (Por línea / Por zonas)
===================================================== */

.lh-stop,
.lh-zone-stop {
    display: flex;
    align-items: stretch;
}

.lh-stop > button,
.lh-zone-stop > button {
    flex: 1 1 auto;
    min-width: 0;
}

.lh-times-link {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: .3rem;
    min-height: 44px;
    padding: 0 var(--lv-s2) 0 .5rem;
    color: var(--lv-blue);
    font-size: var(--lv-fs-xs);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: .18em;
    white-space: nowrap;
}

.lh-times-link:hover {
    color: var(--lv-blue-ink);
    text-decoration-thickness: 2px;
}

.lh-times-link:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 3px var(--lv-blue);
}

.lh-pop .lh-times-link {
    min-height: 0;
    margin-top: .5rem;
    padding: 0;
    font-size: var(--lv-fs-sm);
}


/* =====================================================
   POR PARADA: buscador
===================================================== */

.lh-search .lh-field {
    flex: 1 1 auto;
}

.lh-field input[type="search"] {
    width: min(100%, 36rem);
    min-height: 48px;
    padding: 0 .875rem;
    border: 1px solid #9AA39F;
    border-radius: var(--lv-radius-sm);
    background: var(--lv-white);
    color: var(--lv-ink);
    font: 500 var(--lv-fs-base) / 1.2 var(--lv-font);
}

.lh-field input[type="search"]:focus-visible {
    outline: none;
    box-shadow: var(--lv-focus);
}

.lh-help {
    margin: .375rem 0 0;
    color: var(--lv-ink-2);
    font-size: var(--lv-fs-sm);
}

.lh-status {
    margin: 0 0 var(--lv-s1);
    color: var(--lv-ink-2);
    font-size: var(--lv-fs-sm);
}

.lh-status:empty {
    display: none;
}

.lh-results {
    max-width: 36rem;
    max-height: 22rem;
    margin: 0 0 var(--lv-s4);
    padding: 0;
    overflow-y: auto;
    list-style: none;
    border: 1px solid var(--lv-rule);
    border-radius: var(--lv-radius-sm);
}

.lh-results li + li {
    border-top: 1px solid var(--lv-rule);
}

.lh-result {
    display: flex;
    flex-direction: column;
    gap: .125rem;
    width: 100%;
    padding: .625rem var(--lv-s2);
    border: 0;
    background: var(--lv-white);
    color: var(--lv-ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.lh-result:hover {
    background: var(--lv-platform);
}

.lh-result:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 3px var(--lv-blue);
}


/* =====================================================
   POR PARADA: cabecera, día y vigencia
===================================================== */

.lh-stop-board > .lh-empty {
    max-width: 44rem;
}

.lh-sp-head {
    padding-bottom: var(--lv-s2);
    margin-bottom: var(--lv-s3);
    border-bottom: 1px solid var(--lv-ink);
}

.lh-sp-title {
    margin: 0 0 .375rem;
    font-size: var(--lv-fs-xl);
    line-height: 1.1;
}

.lh-sp-title:focus {
    outline: none;
}

.lh-sp-title:focus-visible {
    box-shadow: var(--lv-focus);
}

.lh-sp-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem var(--lv-s3);
    margin: 0;
    color: var(--lv-ink-2);
    font-size: var(--lv-fs-sm);
}

.lh-sp-access {
    color: var(--lv-blue);
    font-weight: 600;
}

/* Días: misma pieza segmentada que el selector de sentido */
.lh-days {
    margin: 0 0 var(--lv-s2);
    padding: 0;
    border: 0;
}

.lh-days legend {
    margin-bottom: .375rem;
    padding: 0;
    color: var(--lv-ink-2);
    font-size: var(--lv-fs-sm);
    font-weight: 600;
}

.lh-days__options {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    max-width: 44rem;
    border: 1px solid #9AA39F;
    border-radius: var(--lv-radius-sm);
    overflow: hidden;
}

.lh-days__options input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.lh-days__options label {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: .375rem .25rem;
    border-left: 1px solid var(--lv-rule);
    background: var(--lv-white);
    color: var(--lv-ink);
    font-weight: 500;
    line-height: 1.15;
    cursor: pointer;
}

.lh-days__options label:first-of-type {
    border-left: 0;
}

.lh-days__options label:hover {
    background: var(--lv-platform);
}

.lh-days__short {
    display: none;
}

.lh-days__today {
    color: var(--lv-ink-2);
    font-size: var(--lv-fs-xs);
    font-weight: 400;
}

.lh-days__options input:checked + label {
    background: var(--lv-green);
    color: var(--lv-white);
    font-weight: 600;
    box-shadow: inset 0 -4px 0 var(--lv-lime);
}

.lh-days__options input:checked + label .lh-days__today {
    color: var(--lv-white);
}

.lh-days__options input:focus-visible + label {
    z-index: 1;
    outline: 3px solid var(--lv-blue);
    outline-offset: -3px;
}

.lh-sp-validity {
    max-width: 44rem;
    margin: 0 0 var(--lv-s4);
    color: var(--lv-ink-2);
    font-size: var(--lv-fs-sm);
}

.lh-sp-validity a {
    color: var(--lv-blue);
    text-decoration: underline;
    text-underline-offset: .18em;
}

.lh-sp-none {
    max-width: 44rem;
    margin: var(--lv-s3) 0 0;
    color: var(--lv-ink-2);
    font-size: var(--lv-fs-sm);
}


/* =====================================================
   POR PARADA: próximas salidas
===================================================== */

.lh-next {
    max-width: 44rem;
    margin-bottom: var(--lv-s4);
    padding: var(--lv-s2) var(--lv-s3);
    border-left: 4px solid var(--lv-green);
    background: var(--lv-platform);
}

.lh-next__title {
    margin: 0 0 .5rem;
    font-size: var(--lv-fs-base);
}

.lh-next__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.lh-next__list li {
    display: grid;
    grid-template-columns: 3.75rem auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .75rem;
    padding: .375rem 0;
}

.lh-next__list li + li {
    border-top: 1px solid var(--lv-rule);
}

.lh-next__time {
    font-family: var(--lv-font-display);
    font-size: var(--lv-fs-md);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.lh-next__dest {
    overflow: hidden;
    font-size: var(--lv-fs-sm);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lh-next__in {
    color: var(--lv-green-ink);
    font-size: var(--lv-fs-sm);
    font-weight: 600;
    white-space: nowrap;
}


/* =====================================================
   POR PARADA: horarios en acordeón (details/summary)
   Cerrado: línea, destino, nº de salidas y franja.
   Abierto: todas las horas de salida.
===================================================== */

.lh-acc-title {
    margin: 0 0 .25rem;
    font-size: var(--lv-fs-md);
}

.lh-acc-help {
    margin: 0 0 var(--lv-s2);
    color: var(--lv-ink-2);
    font-size: var(--lv-fs-sm);
}

.lh-acc {
    max-width: 52rem;
    border-top: 1px solid var(--lv-rule);
}

.lh-tt {
    border-bottom: 1px solid var(--lv-rule);
    border-left: 5px solid var(--lh-line);
    background: var(--lv-white);
}

.lh-tt__head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .875rem;
    min-height: 64px;
    padding: .75rem var(--lv-s2);
    list-style: none;
    cursor: pointer;
}

/* Sin el triángulo por defecto: se usa la flecha de la derecha */
.lh-tt__head::-webkit-details-marker {
    display: none;
}

.lh-tt__head:hover {
    background: var(--lv-platform);
}

.lh-tt__head:focus-visible {
    outline: 3px solid var(--lv-blue);
    outline-offset: -3px;
}

.lh-tt[open] > .lh-tt__head {
    background: var(--lv-platform);
}

.lh-tt__text {
    display: flex;
    flex-direction: column;
    gap: .125rem;
    min-width: 0;
}

.lh-tt__dest {
    font-weight: 600;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.lh-tt__to {
    color: var(--lv-ink-2);
    font-weight: 400;
}

.lh-tt__count {
    color: var(--lv-ink-2);
    font-size: var(--lv-fs-sm);
}

.lh-tt__nextline {
    color: var(--lv-green-ink);
    font-size: var(--lv-fs-sm);
    font-weight: 600;
}

/* Flecha: apunta abajo cerrado, arriba abierto */
.lh-tt__chev {
    width: .75rem;
    height: .75rem;
    margin-right: .25rem;
    border-right: 2px solid var(--lv-ink);
    border-bottom: 2px solid var(--lv-ink);
    transform: rotate(45deg) translate(-2px, -2px);
    transition: transform .15s ease;
}

.lh-tt[open] .lh-tt__chev {
    transform: rotate(-135deg) translate(-2px, -2px);
}

.lh-tt .lh-tt__hours {
    padding-top: .5rem;
}

/* Horas completas, una fila por hora del reloj */
.lh-tt__hours {
    margin: 0;
    padding: 0 0 .5rem;
    list-style: none;
}

.lh-tt__row {
    display: flex;
    flex-wrap: wrap;
    gap: .375rem;
    padding: .375rem var(--lv-s2);
}

.lh-tt__row + .lh-tt__row {
    border-top: 1px dashed var(--lv-rule);
}

.lh-tt__time {
    display: inline-block;
    min-width: 3.6rem;
    padding: .2rem .25rem;
    border-radius: 3px;
    color: var(--lv-ink);
    font-family: var(--lv-font-display);
    font-size: var(--lv-fs-md);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    line-height: 1.25;
    text-align: center;
}

/* Próxima salida: marcada por forma y texto, no sólo por color */
.lh-tt__time.is-next {
    background: var(--lv-ink);
    color: var(--lv-white);
    font-weight: 600;
}

/* Madrugada (servicios nocturnos tras las 24:00) */
.lh-tt__row.is-night {
    background: var(--lv-platform);
}

.lh-tt__night {
    flex: 0 0 100%;
    color: var(--lv-ink-2);
    font-size: var(--lv-fs-xs);
    font-weight: 600;
}


/* =====================================================
   POR PARADA: responsive
===================================================== */

@media (max-width: 767px) {

    .lh-field input[type="search"] {
        width: 100%;
    }

    /* Oculto sólo a la vista: el lector de pantalla sigue leyendo «Lunes» */
    .lh-days__long {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .lh-days__short {
        display: block;
    }

    .lh-next__list li {
        grid-template-columns: 3.5rem auto minmax(0, 1fr);
    }

    .lh-next__in {
        grid-column: 3;
    }

    .lh-sp-title {
        font-size: var(--lv-fs-lg);
    }
}
