:root {
    --orange: #f47c20;
    --page-background: #ffffff;
    --section-background: #1c1c1c;
    --table-border: #B4B4B4;

    /* Texto y estructura */
    --text: #404040;
    --text-faint: #777777;
    --heading-bg: #f0f0f0;
    --hover-bg: #eeeeee;
    --table-bg: #ffffff;
    --input-bg: #f4f4f4;
    --sticker-text: #404040;

    /* Colores de la tabla de carrera: pastel + texto oscuro en ambos
       temas (no cambian en modo oscuro). */
    --result-p1: #FFFFB9;
    --result-p2: #E6E6E6;
    --result-p3: #FFDC97;
    --result-top-10: #DFFFDF;
    --result-points-zone: #CFEAFF;
    --result-other: #CFCFFF;
    --result-retired: #EBCFFF;
}

/* Tema oscuro: se activa con data-theme="dark" en <body> (mismo botón e
   interruptor que en Championship Detail; comparten preferencia). Solo
   cambia la estructura general; los colores de la tabla de carrera se
   quedan igual que en claro. */
body[data-theme="dark"] {
    --page-background: #16181c;
    --table-border: #3a3d42;
    --text: #e4e6eb;
    --text-faint: #82868f;
    --heading-bg: #24262b;
    --hover-bg: #2a2d32;
    --table-bg: #1c1e22;
    --input-bg: #1c1e22;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--page-background);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}

.round-page {
    width: min(1100px, calc(100% - 24px));
    margin: 0 auto;
    padding: 18px 0 40px;
}

.event-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 18px;
    background: var(--category-color, var(--orange));
}

.event-header h1 {
    margin: 0;
    font-size: 23px;
}

.event-header p {
    margin: 4px 0 0;
    font-size: 13px;
}

.event-header img {
    width: 58px;
    height: 36px;
    object-fit: contain;
}

.round-navigation {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-height: 42px;
    padding: 8px 12px;
    background: #252525;
    font-size: 12px;
}

.round-navigation div:last-child {
    text-align: right;
}

.round-navigation a {
    color: #f2f2f2;
    text-decoration: none;
}

.round-navigation a:hover {
    text-decoration: underline;
}

.data-section {
    width: fit-content;
    max-width: 100%;
    margin-top: 16px;
    background: transparent;
    border: 0;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 40px;
    padding: 8px 12px;
    color: var(--text);
}

.section-heading h2 {
    margin: 0;
    font-size: 16px;
}

.section-heading span {
    font-size: 12px;
    color: var(--text);
}

.session-information {
    display: flex;
    gap: 14px;
}

.session-condition {
    font-weight: 700;
}

.section-heading .session-condition-dry {
    color: #E74C3C;
}

.section-heading .session-condition-wet {
    color: #5B9BD5;
}


.flag-to-flag {
    color: #ffd166 !important;
    font-weight: 700;
}

.table-scroll {
    overflow-x: auto;
}

.data-table {
    width: max-content;
    table-layout: fixed;
    border-collapse: collapse;
    background: var(--table-bg);
    color: var(--text);
    font-size: 12px;
}

.data-table th,
.data-table td {
    height: 20px;
    padding: 2px 5px;
    border: 1px solid var(--table-border);
    text-align: center;
    white-space: nowrap;
}

.data-table th {
    background: var(--heading-bg);
    font-weight: 700;
}

.driver-heading {
    min-width: 160px;
}

.driver-cell {
    text-align: left !important;
}

.driver-content {
    display: flex;
    align-items: center;
    gap: 6px;
}

.driver-content img {
    width: 22px;
    height: 14px;
    flex: 0 0 auto;
    object-fit: contain;
}

.team-number {
    min-width: 28px;
    background: var(--team-primary, #f2f2f2);
    color: var(--team-secondary, #111111);
    font-weight: 700;
    font-style: bold;
}

.team-name {
    min-width: 160px;
    background: var(--team-primary, #f2f2f2);
    color: var(--team-secondary, #111111);
    font-weight: 700;
    text-align: left !important;
}

.position-cell,
.points-cell {
    font-weight: 700;
}

.pole-result {
    font-weight: 700;
}

.fastest-lap {
    font-style: italic;
    font-weight: 400;
}

.pole-result.fastest-lap {
    font-style: italic;
    font-weight: 700;
}

.q1-badge {
    display: inline-block;
    padding: 1px 4px;
    border-radius: 2px;
    background: #8C8C8C !important;
    color: #ffffff;
    font-size: 9px;
    font-weight: 700;
}


.sessions-grid {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.sessions-grid .data-section {
    width: fit-content;
}

.standings-grid {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}


@media (max-width: 1000px) {
    .sessions-grid {
        flex-direction: column;
    }
}

@media (max-width: 850px) {
    .standings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .round-page {
        width: calc(100% - 10px);
        padding-top: 5px;
    }

    .event-header {
        padding: 10px;
    }

    .event-header h1 {
        font-size: 18px;
    }

    .round-navigation {
        grid-template-columns: 1fr;
        gap: 8px;
        text-align: center;
    }

    .round-navigation div:last-child {
        text-align: center;
    }

    .data-table {
        font-size: 12px;
    }
}

/* =========================================================
   CLASIFICACIÓN
   ========================================================= */

.qualifying-table col.col-pos {
    width: 28px;
}

.qualifying-table col.col-number {
    width: 28px;
}

.qualifying-table col.col-driver {
    width: 160px;
}

.qualifying-table col.col-moto {
    width: 70px;
}

.qualifying-table col.col-time {
    width: 80px;
}

.qualifying-table col.col-gap {
    width: 65px;
}

.qualifying-table col.col-q1 {
    width: 32px;
}

.qualifying-table tbody tr.q1-eliminated
td:not(.team-number) {
    background: var(--hover-bg);
}

.qualifying-table th,
.qualifying-table td {
    height: 24px;
}

/* Todas las posiciones de clasificación se muestran en negrita. */
.qualifying-table tbody td:first-child {
    font-weight: 700;
}


/* =========================================================
   CARRERA
   ========================================================= */

.race-table col.col-pos {
    width: 28px;
}

.race-table col.col-number {
    width: 28px;
}

.race-table col.col-driver {
    width: 160px;
}

.race-table col.col-moto {
    width: 70px;
}

.race-table col.col-grid {
    width: 60px;
}

.race-table col.col-difference {
    width: 88px;
}

.race-table col.col-laps {
    width: 52px;
}

.race-table col.col-points {
    width: 36px;
}

.race-table th,
.race-table td {
    height: 24px;
}


/* =========================================================
   CAMPEONATO DE PILOTOS
   ========================================================= */

.driver-standings-table col.col-pos {
    width: 28px;
}

.driver-standings-table col.col-movement {
    width: 32px;
}

.driver-standings-table col.col-number {
    width: 28px;
}

.driver-standings-table col.col-driver {
    width: 160px;
}

.driver-standings-table col.col-moto {
    width: 70px;
}

.driver-standings-table col.col-points-gap {
    width: 32px;
}

.driver-standings-table col.col-points {
    width: 32px;
}

.driver-standings-table th,
.driver-standings-table td {
    height: 24px;
}


/* =========================================================
   CAMPEONATO DE EQUIPOS
   ========================================================= */

.team-standings-table col.col-pos {
    width: 28px;
}

.team-standings-table col.col-movement {
    width: 32px;
}

.team-standings-table col.col-team {
    width: 140px;
}

.team-standings-table col.col-moto {
    width: 70px;
}

.team-standings-table col.col-points-gap {
    width: 32px;
}

.team-standings-table col.col-points {
    width: 32px;
}

.team-standings-table th,
.team-standings-table td {
    height: 24px;
}

/* Colorea las celdas informativas de la carrera según el resultado.
   La posición mantiene su fondo original y el dorsal conserva los colores del equipo. */

.race-table tbody tr.result-win
td:not(.result-marker):not(.team-number) {
    background: var(--result-p1);
    color: var(--sticker-text);
}

.race-table tbody tr.result-second
td:not(.result-marker):not(.team-number) {
    background: var(--result-p2);
    color: var(--sticker-text);
}

.race-table tbody tr.result-third
td:not(.result-marker):not(.team-number) {
    background: var(--result-p3);
    color: var(--sticker-text);
}

.race-table tbody tr.result-top-ten
td:not(.result-marker):not(.team-number) {
    background: var(--result-top-10);
    color: var(--sticker-text);
}

.race-table tbody tr.result-points-zone
td:not(.result-marker):not(.team-number) {
    background: var(--result-points-zone);
    color: var(--sticker-text);
}

.race-table tbody tr.result-other
td:not(.result-marker):not(.team-number) {
    background: var(--result-other);
    color: var(--sticker-text);
}

.race-table tbody tr.result-retired
td:not(.result-marker):not(.team-number) {
    background: var(--result-retired);
    color: var(--sticker-text);
}

/* Un DNS no se trata visualmente como un abandono: sus celdas quedan blancas. */
.race-table tbody tr.result-dns
td:not(.result-marker):not(.team-number) {
    background: #ffffff !important;
    color: #404040 !important;
}

.race-table .result-marker {
    background: var(--table-bg);
    font-style: normal;
    font-weight: 700;
}

/* Los textos de estado no se consideran posiciones numéricas. */
.race-table tbody tr.result-retired .result-marker {
    font-weight: 400;
}

/* El tiempo o gap conserva su centro aunque aparezca el indicador VR. */
.race-difference-cell {
    text-align: center;
}

.race-difference-value {
    position: relative;
    display: inline-block;
}

/* El superíndice queda fuera del flujo y no desplaza el número. */
.fastest-lap-marker {
    position: absolute;
    top: -0.45em;
    left: 100%;
    margin-left: 2px;
    font-size: 8px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.points-gap-cell {
    color: var(--text-faint);
    font-weight: 400;
}

.movement-cell {
    font-weight: 700;
    color: var(--sticker-text);
}

.movement-up {
    background: #70AD47;
    color: var(--sticker-text);
}

.movement-down {
    background: #ED7D31;
    color: var(--sticker-text);
}

.movement-neutral {
    background: transparent;
    color: var(--text-faint);
}

.round-page.category-rookies-cup .event-header {
    background: #6F747C;
}


.floating-home-logo {
    width: 38px;
    height: 38px;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 9px;
    background: rgba(18, 18, 18, 0.88);
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(8px);
}

.floating-home-logo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.theme-toggle-button {
    width: 38px;
    height: 38px;
    position: fixed;
    top: 10px;
    /* Ancla por la izquierda (como el logo de inicio), no por la derecha:
       esta página permite scroll horizontal en móvil por las tablas
       anchas, y "right" se calcula sobre ese ancho expandido, dejando el
       botón fuera de la pantalla visible. */
    left: 56px;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 9px;
    background: rgba(18, 18, 18, 0.88);
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(8px);
    color: #ffffff;
    cursor: pointer;
}

.theme-toggle-button svg {
    width: 19px;
    height: 19px;
}

.theme-toggle-icon-dark {
    display: none;
}

body[data-theme="dark"] .theme-toggle-icon-light {
    display: none;
}

body[data-theme="dark"] .theme-toggle-icon-dark {
    display: block;
}

.detail-driver-link {
    color: inherit;
    text-decoration: none;
}

.detail-driver-link:hover {
    text-decoration: underline;
}

.team-profile-link {
    color: inherit;
    text-decoration: none;
}

.team-profile-link:hover {
    text-decoration: underline;
}

.circuit-profile-link {
    color: inherit;
    text-decoration: none;
}

.circuit-profile-link:hover {
    text-decoration: underline;
}

/* Coches: fases de clasificación, neumáticos e IndyCar */
.qualifying-table tr.qualifying-group-separator td {
    border-bottom-width: 3px;
    border-bottom-color: var(--table-border);
}

.detail-speed-toggle {
    padding: 3px 7px;
    border: 1px solid var(--table-border);
    border-radius: 4px;
    background: var(--input-bg);
    color: var(--text);
    font: inherit;
    font-size: 0.78rem;
    cursor: pointer;
}

.detail-tire-chip,
.detail-tire-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 19px;
    height: 19px;
    border: 2px solid var(--tire-color, #666666);
    border-radius: 50%;
    color: var(--tire-color, #666666);
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
}

.detail-tire-chip img {
    width: 17px;
    height: 17px;
    object-fit: contain;
}

.detail-tire-history .detail-tire-code + .detail-tire-code {
    margin-left: 6px;
}

/* Fórmula Regional · Carrera: historial de neumáticos como letras, sin iconos ni círculos. */
.detail-tire-history .detail-tire-code {
    width: auto;
    height: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--tire-color, #666666);
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1;
}

.detail-tire-history .detail-tire-code-h {
    -webkit-text-stroke: 0.3px #666666;
    text-shadow: 0 0 1px #555555;
}

.detail-tire-code-s { --tire-color: #E10600; }
.detail-tire-code-m { --tire-color: #D6B800; }
.detail-tire-code-h { --tire-color: #777777; }
.detail-tire-code-i { --tire-color: #00A651; }
.detail-tire-code-w { --tire-color: #0072CE; }

.detail-tire-code img {
    width: 17px;
    height: 17px;
    object-fit: contain;
}

/* Móvil: qualy/carrera con piloto abreviado siempre visible */
.mobile-label { display: none; }

@media (max-width: 720px) {
    .desktop-label { display: none !important; }
    .mobile-label { display: inline !important; }

    .table-scroll {
        max-width: 100vw;
        overflow-x: auto;
    }

    .data-table th,
    .data-table td {
        padding-right: 4px;
        padding-left: 4px;
        font-size: 10px;
    }

    .qualifying-table th:nth-child(2),
    .qualifying-table td:nth-child(2),
    .race-table th:nth-child(2),
    .race-table td:nth-child(2),
    .driver-standings-table th:nth-child(2),
    .driver-standings-table td:nth-child(2) {
        display: none;
    }

    .qualifying-table th:nth-child(4),
    .qualifying-table td:nth-child(4),
    .race-table th:nth-child(4),
    .race-table td:nth-child(4),
    .driver-standings-table th:nth-child(4),
    .driver-standings-table td:nth-child(4) {
        display: none;
    }

    .qualifying-table th:first-child,
    .qualifying-table td:first-child,
    .race-table th:first-child,
    .race-table td:first-child,
    .driver-standings-table th:first-child,
    .driver-standings-table td:first-child {
        width: 28px;
        min-width: 28px;
        position: sticky;
        left: 0;
        z-index: 6;
        background: var(--table-bg);
    }

    .qualifying-table th:nth-child(3),
    .qualifying-table td:nth-child(3),
    .race-table th:nth-child(3),
    .race-table td:nth-child(3),
    .driver-standings-table th:nth-child(3),
    .driver-standings-table td:nth-child(3) {
        width: 78px;
        min-width: 78px;
        max-width: 78px;
        position: sticky;
        left: 28px;
        z-index: 5;
        background: var(--table-bg);
        box-shadow: 6px 0 10px rgba(0,0,0,.10), inset 3px 0 var(--mobile-team-color, #777777);
    }

    .qualifying-table thead th:first-child,
    .qualifying-table thead th:nth-child(3),
    .race-table thead th:first-child,
    .race-table thead th:nth-child(3),
    .driver-standings-table thead th:first-child,
    .driver-standings-table thead th:nth-child(3) {
        z-index: 9;
    }

    .driver-content {
        gap: 4px;
    }

    .driver-content img {
        width: 18px;
        height: 12px;
    }

    .race-table tbody tr.result-win td.driver-cell { background: var(--result-p1); }
    .race-table tbody tr.result-second td.driver-cell { background: var(--result-p2); }
    .race-table tbody tr.result-third td.driver-cell { background: var(--result-p3); }
    .race-table tbody tr.result-top-ten td.driver-cell { background: var(--result-top-10); }
    .race-table tbody tr.result-points-zone td.driver-cell { background: var(--result-points-zone); }
    .race-table tbody tr.result-other td.driver-cell { background: var(--result-other); }
    .race-table tbody tr.result-retired td.driver-cell { background: var(--result-retired); }
}

/* =========================================================
   MÓVIL · round detail completo dentro del ancho disponible
   ========================================================= */
@media (max-width: 720px) {
    .round-page {
        width: calc(100% - 8px);
    }

    .sessions-grid,
    .standings-grid,
    .sessions-grid .data-section,
    .standings-grid .data-section,
    .data-section {
        width: 100%;
        max-width: 100%;
    }

    .table-scroll {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
    }

    .data-table {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        table-layout: fixed;
        font-size: 9.5px;
    }

    .data-table th,
    .data-table td {
        height: 23px;
        padding-right: 2px;
        padding-left: 2px;
    }

    .mobile-hide-affiliation,
    .qualifying-table th:nth-child(4),
    .qualifying-table td:nth-child(4),
    .race-table th:nth-child(4),
    .race-table td:nth-child(4),
    .driver-standings-table th:nth-child(4),
    .driver-standings-table td:nth-child(4) {
        display: none !important;
    }

    /* Recuperamos el dorsal y mantenemos Pos. + N.º + Piloto fijos. */
    .qualifying-table th:nth-child(2),
    .qualifying-table td:nth-child(2),
    .race-table th:nth-child(2),
    .race-table td:nth-child(2),
    .driver-standings-table th:nth-child(2),
    .driver-standings-table td:nth-child(2) {
        width: 27px;
        min-width: 27px;
        max-width: 27px;
        display: table-cell !important;
        position: sticky;
        left: 24px;
        z-index: 7;
    }

    .qualifying-table th:first-child,
    .qualifying-table td:first-child,
    .race-table th:first-child,
    .race-table td:first-child,
    .driver-standings-table th:first-child,
    .driver-standings-table td:first-child {
        width: 24px;
        min-width: 24px;
        max-width: 24px;
    }

    .qualifying-table th:nth-child(3),
    .qualifying-table td:nth-child(3),
    .race-table th:nth-child(3),
    .race-table td:nth-child(3),
    .driver-standings-table th:nth-child(3),
    .driver-standings-table td:nth-child(3) {
        width: 108px;
        min-width: 108px;
        max-width: 108px;
        left: 51px;
        padding-right: 3px;
        padding-left: 3px;
    }

    .data-table .driver-content {
        gap: 3px;
    }

    .data-table .driver-content img {
        width: 17px;
        height: 11px;
    }

    .data-table .driver-cell a {
        font-size: 9px;
    }

    /* Qualy: Pos. / dorsal / piloto / tiempo / gap / Q1 o neumático. */
    .qualifying-table col.col-pos { width: 24px; }
    .qualifying-table col.col-number { width: 27px; }
    .qualifying-table col.col-driver { width: 108px; }
    .qualifying-table col.col-moto { width: 0; }
    .qualifying-table col.col-time { width: 58px; }
    .qualifying-table col.col-gap { width: 50px; }
    .qualifying-table col.col-q1,
    .qualifying-table col.col-tire { width: 32px; }

    /* Carrera: se elimina afiliación y Tiempo/Gap deja de dominar la tabla. */
    .race-table col.col-pos { width: 24px; }
    .race-table col.col-number { width: 27px; }
    .race-table col.col-driver { width: 108px; }
    .race-table col.col-moto { width: 0; }
    .race-table col.col-grid { width: 34px; }
    .race-table col.col-difference { width: 62px; }
    .race-table col.col-laps { width: 34px; }
    .race-table col.col-pits { width: 29px; }
    .race-table col.col-tires { width: 36px; }
    .race-table col.col-points { width: 32px; }

    /* Regional tiene dos columnas extra: compactamos un poco más. */
    .round-page.category-formula-regional .race-table col.col-driver { width: 88px; }
    .round-page.category-formula-regional .race-table col.col-difference { width: 52px; }
    .round-page.category-formula-regional .race-table col.col-grid { width: 30px; }
    .round-page.category-formula-regional .race-table col.col-laps { width: 29px; }
    .round-page.category-formula-regional .race-table col.col-pits { width: 25px; }
    .round-page.category-formula-regional .race-table col.col-tires { width: 30px; }
    .round-page.category-formula-regional .race-table col.col-points { width: 28px; }
    .round-page.category-formula-regional .race-table th:nth-child(3),
    .round-page.category-formula-regional .race-table td:nth-child(3) {
        width: 88px;
        min-width: 88px;
        max-width: 88px;
    }

    .driver-standings-table col.col-pos { width: 24px; }
    .driver-standings-table col.col-number { width: 27px; }
    .driver-standings-table col.col-driver { width: 120px; }
    .driver-standings-table col.col-moto { width: 0; }
    .driver-standings-table col.col-points { width: 38px; }
    .driver-standings-table col.col-points-gap { width: 40px; }
    .driver-standings-table col.col-movement { width: 32px; }
    .driver-standings-table th:nth-child(3),
    .driver-standings-table td:nth-child(3) {
        width: 120px;
        min-width: 120px;
        max-width: 120px;
    }

    .team-standings-table col.col-pos { width: 25px; }
    .team-standings-table col.col-team { width: 155px; }
    .team-standings-table col.col-moto { width: 0; }
    .team-standings-table col.col-points { width: 40px; }
    .team-standings-table col.col-points-gap { width: 40px; }
    .team-standings-table col.col-movement { width: 32px; }

    .team-standings-table .team-name {
        min-width: 0;
        font-size: 9px;
    }
}

/* =========================================================
   MÓVIL · ROUND DETAIL · bloque definitivo
   Mantener TODO dentro del ancho del teléfono. Las reglas de
   este bloque prevalecen sobre las revisiones móviles anteriores.
   ========================================================= */
@media (max-width: 720px) {
    .round-page {
        width: calc(100% - 8px) !important;
        max-width: none !important;
        margin-right: 4px !important;
        margin-left: 4px !important;
    }

    .round-page .sessions-grid,
    .round-page .standings-grid,
    .round-page .data-section,
    .round-page .table-scroll {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .round-page .table-scroll {
        overflow-x: hidden !important;
        overflow-y: visible !important;
    }

    .round-page .data-table {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        table-layout: fixed !important;
        font-size: 9.2px !important;
    }

    .round-page .data-table th,
    .round-page .data-table td {
        box-sizing: border-box !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        height: 25px !important;
        padding: 2px 2px !important;
        overflow: hidden !important;
        white-space: nowrap !important;
        text-overflow: clip !important;
        position: static !important;
        left: auto !important;
        box-shadow: none !important;
    }

    .round-page .data-table .driver-content {
        min-width: 0 !important;
        gap: 3px !important;
        overflow: hidden !important;
    }

    .round-page .data-table .driver-content img {
        width: 17px !important;
        height: 11px !important;
        flex: 0 0 17px !important;
    }

    .round-page .data-table .driver-content span,
    .round-page .data-table .driver-cell a,
    .round-page .team-stand-name-cell {
        min-width: 0 !important;
        overflow: hidden !important;
        white-space: nowrap !important;
        text-overflow: ellipsis !important;
        font-size: 9px !important;
    }

    .round-page .mobile-hide-affiliation {
        display: none !important;
        width: 0 !important;
    }

    /* ---- Clasificación ----
       Moto: Pos / N.º / Piloto / Tiempo / Gap / Q1
       Coches: Pos / N.º / Piloto / Tiempo|Vel / Gap / Neum. */
    .round-page .qualifying-table .qual-pos-cell,
    .round-page .qualifying-table .qual-number-cell,
    .round-page .qualifying-table .qual-driver-cell,
    .round-page .qualifying-table .qual-time-cell,
    .round-page .qualifying-table .qual-gap-cell,
    .round-page .qualifying-table .qual-extra-cell {
        display: table-cell !important;
    }

    .round-page .qualifying-table col.col-pos { width: 7% !important; }
    .round-page .qualifying-table col.col-number { width: 9% !important; }
    .round-page .qualifying-table col.col-driver { width: 34% !important; }
    .round-page .qualifying-table col.col-moto { width: 0 !important; }
    .round-page .qualifying-table col.col-time { width: 19% !important; }
    .round-page .qualifying-table col.col-gap { width: 13% !important; }
    .round-page .qualifying-table col.col-q1,
    .round-page .qualifying-table col.col-tire { width: 12% !important; }

    .round-page .qualifying-table .qual-time-cell,
    .round-page .qualifying-table .qual-gap-cell {
        font-variant-numeric: tabular-nums;
        text-align: center !important;
    }

    /* ---- Carrera motos ----
       Pos / N.º / Piloto / Parr. / Tiempo-Gap / V. / Pts. */
    .round-page.is-moto-category .race-table .race-pos-cell,
    .round-page.is-moto-category .race-table .race-number-cell,
    .round-page.is-moto-category .race-table .race-driver-cell,
    .round-page.is-moto-category .race-table .race-grid-cell,
    .round-page.is-moto-category .race-table .race-diff-cell,
    .round-page.is-moto-category .race-table .race-laps-cell,
    .round-page.is-moto-category .race-table .race-points-cell {
        display: table-cell !important;
    }

    .round-page.is-moto-category .race-table col.col-pos { width: 7% !important; }
    .round-page.is-moto-category .race-table col.col-number { width: 9% !important; }
    .round-page.is-moto-category .race-table col.col-driver { width: 32% !important; }
    .round-page.is-moto-category .race-table col.col-moto { width: 0 !important; }
    .round-page.is-moto-category .race-table col.col-grid { width: 9% !important; }
    .round-page.is-moto-category .race-table col.col-difference { width: 21% !important; }
    .round-page.is-moto-category .race-table col.col-laps { width: 8% !important; }
    .round-page.is-moto-category .race-table col.col-points { width: 10% !important; }

    .round-page .race-table .race-diff-cell {
        font-variant-numeric: tabular-nums;
        text-align: center !important;
    }

    /* ---- Carrera coches ---- */
    .round-page.is-car-category .race-table .race-pos-cell,
    .round-page.is-car-category .race-table .race-number-cell,
    .round-page.is-car-category .race-table .race-driver-cell,
    .round-page.is-car-category .race-table .race-grid-cell,
    .round-page.is-car-category .race-table .race-diff-cell,
    .round-page.is-car-category .race-table .race-laps-cell,
    .round-page.is-car-category .race-table .race-pits-cell,
    .round-page.is-car-category .race-table .race-points-cell {
        display: table-cell !important;
    }

    .round-page.is-car-category:not(.category-formula-regional) .race-table col.col-pos { width: 6% !important; }
    .round-page.is-car-category:not(.category-formula-regional) .race-table col.col-number { width: 8% !important; }
    .round-page.is-car-category:not(.category-formula-regional) .race-table col.col-driver { width: 31% !important; }
    .round-page.is-car-category:not(.category-formula-regional) .race-table col.col-moto { width: 0 !important; }
    .round-page.is-car-category:not(.category-formula-regional) .race-table col.col-grid { width: 8% !important; }
    .round-page.is-car-category:not(.category-formula-regional) .race-table col.col-difference { width: 19% !important; }
    .round-page.is-car-category:not(.category-formula-regional) .race-table col.col-laps { width: 7% !important; }
    .round-page.is-car-category:not(.category-formula-regional) .race-table col.col-pits { width: 7% !important; }
    .round-page.is-car-category:not(.category-formula-regional) .race-table col.col-points { width: 10% !important; }

    /* Regional: incluye historial de neumáticos. */
    .round-page.category-formula-regional .race-table .race-tires-cell {
        display: table-cell !important;
    }
    .round-page.category-formula-regional .race-table col.col-pos { width: 6% !important; }
    .round-page.category-formula-regional .race-table col.col-number { width: 8% !important; }
    .round-page.category-formula-regional .race-table col.col-driver { width: 27% !important; }
    .round-page.category-formula-regional .race-table col.col-moto { width: 0 !important; }
    .round-page.category-formula-regional .race-table col.col-grid { width: 7% !important; }
    .round-page.category-formula-regional .race-table col.col-difference { width: 16% !important; }
    .round-page.category-formula-regional .race-table col.col-laps { width: 6% !important; }
    .round-page.category-formula-regional .race-table col.col-pits { width: 6% !important; }
    .round-page.category-formula-regional .race-table col.col-tires { width: 11% !important; }
    .round-page.category-formula-regional .race-table col.col-points { width: 10% !important; }

    /* ---- Campeonato de pilotos ----
       La columna de afiliación se oculta; Pts. queda explícitamente visible. */
    .round-page .driver-standings-table .stand-pos-cell,
    .round-page .driver-standings-table .stand-number-cell,
    .round-page .driver-standings-table .stand-driver-cell,
    .round-page .driver-standings-table .stand-points-cell,
    .round-page .driver-standings-table .stand-gap-cell,
    .round-page .driver-standings-table .stand-move-cell {
        display: table-cell !important;
    }

    .round-page .driver-standings-table col.col-pos { width: 7% !important; }
    .round-page .driver-standings-table col.col-number { width: 9% !important; }
    .round-page .driver-standings-table col.col-driver { width: 43% !important; }
    .round-page .driver-standings-table col.col-moto { width: 0 !important; }
    .round-page .driver-standings-table col.col-points { width: 13% !important; }
    .round-page .driver-standings-table col.col-points-gap { width: 15% !important; }
    .round-page .driver-standings-table col.col-movement { width: 13% !important; }

    /* ---- Campeonato de equipos ---- */
    .round-page .team-standings-table .team-stand-pos-cell,
    .round-page .team-standings-table .team-stand-name-cell,
    .round-page .team-standings-table .team-stand-points-cell,
    .round-page .team-standings-table .team-stand-gap-cell,
    .round-page .team-standings-table .team-stand-move-cell {
        display: table-cell !important;
    }

    .round-page .team-standings-table col.col-pos { width: 8% !important; }
    .round-page .team-standings-table col.col-team { width: 50% !important; }
    .round-page .team-standings-table col.col-moto { width: 0 !important; }
    .round-page .team-standings-table col.col-points { width: 14% !important; }
    .round-page .team-standings-table col.col-points-gap { width: 15% !important; }
    .round-page .team-standings-table col.col-movement { width: 13% !important; }
}


/* ROUND DETAIL MOBILE V27 INLINE MIRROR
   El mismo layout crítico también se conserva en el CSS externo. */
@media (max-width: 720px) {
    .round-page .qualifying-table .qual-time-cell,
    .round-page .qualifying-table .qual-gap-cell,
    .round-page.is-moto-category .race-table .race-grid-cell,
    .round-page.is-moto-category .race-table .race-diff-cell,
    .round-page.is-moto-category .race-table .race-laps-cell,
    .round-page.is-moto-category .race-table .race-points-cell,
    .round-page .driver-standings-table .stand-points-cell,
    .round-page .team-standings-table .team-stand-points-cell { display: table-cell !important; }
}


/* =========================================================
   MÓVIL · FIX V28 · mantener alineación entre <colgroup> y celdas
   ========================================================= */
@media (max-width: 720px) {
    /* Nunca eliminar del grid una columna intermedia cuando el <colgroup>
       sigue presente. Se deja a 0px para que las celdas posteriores sigan
       correspondiendo con su <col> real. */
    .round-page .mobile-hide-affiliation,
    .round-page .qualifying-table th:nth-child(4),
    .round-page .qualifying-table td:nth-child(4),
    .round-page .race-table th:nth-child(4),
    .round-page .race-table td:nth-child(4),
    .round-page .driver-standings-table th:nth-child(4),
    .round-page .driver-standings-table td:nth-child(4) {
        display: table-cell !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        padding: 0 !important;
        border-left: 0 !important;
        border-right: 0 !important;
        font-size: 0 !important;
        line-height: 0 !important;
        color: transparent !important;
        overflow: hidden !important;
        white-space: nowrap !important;
    }

    .round-page .mobile-hide-affiliation * {
        display: none !important;
    }

    /* Reafirmamos anchos de las columnas ya alineadas. */
    .round-page .qualifying-table col.col-moto { width: 0 !important; }
    .round-page .qualifying-table col.col-time { width: 20% !important; }
    .round-page .qualifying-table col.col-gap { width: 12% !important; }

    .round-page.is-moto-category .race-table col.col-moto { width: 0 !important; }
    .round-page.is-moto-category .race-table col.col-grid { width: 9% !important; }
    .round-page.is-moto-category .race-table col.col-difference { width: 21% !important; }
    .round-page.is-moto-category .race-table col.col-laps { width: 8% !important; }
    .round-page.is-moto-category .race-table col.col-points { width: 10% !important; }

    .round-page .driver-standings-table col.col-moto { width: 0 !important; }
    .round-page .driver-standings-table col.col-points { width: 13% !important; }

    .round-page .team-standings-table col.col-moto { width: 0 !important; }
    .round-page .team-standings-table col.col-points { width: 14% !important; }
}
