/* RACE live.php, the new spectators' page (Task U1, Direction A; Task U0's mockups ui-u0/mockups/live-A-*.html). Layout only:
   the tokens, badges, medal and rider rows are race-tokens.css. Phone first (390 / 360 px), one column; from 900 px the
   categories sit in a left column and the same rows line up as a table. Today's assets/css/live.css is not touched: this page
   never loads it. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.lv { margin: 0; min-height: 100vh; background: var(--rt-bg); color: var(--rt-ink); font: 400 16px/1.4 var(--rt-body); }
body.lv-noscroll { overflow: hidden; }
:where(.lv) button { font: inherit; color: inherit; }   /* :where(): zero weight, so every component's own button style wins */
.lv [hidden] { display: none !important; }
:where(.lv) :is(h1, h2, p, ol, ul) { margin: 0; padding: 0; }

/* ===== banners above everything ===== */
.lv-cancel { padding: 10px 12px; background: var(--rt-red-strong); color: #fff; text-align: center; font: 800 18px/1.2 var(--rt-head); letter-spacing: .06em; }

/* ===== top bar: logo, event, language ===== */
.lv-top { position: sticky; top: 0; z-index: 20; background: var(--rt-navy); color: #fff; border-bottom: 3px solid var(--rt-red); }
.lv-top-in { max-width: 1400px; margin: 0 auto; height: 48px; padding: 0 max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
             display: flex; align-items: center; gap: 10px; }
.lv-logo { flex: none; display: block; }
.lv-logo img { height: 22px; width: auto; display: block; }
.lv-ev { flex: 1; min-width: 0; font: 700 17px/1 var(--rt-head); letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-lang { flex: none; display: flex; border: 1px solid rgba(255, 255, 255, .25); border-radius: 6px; }
.lv-lang button { position: relative; width: 40px; height: 30px; padding: 0; border: 0; background: none; color: #D1D5DB; font: 600 12px/1 var(--rt-body); letter-spacing: .04em; cursor: pointer; }
/* Task U6 (B4): a 44-px-tall tap for each language (the bar is 48 px); the group no longer clips, so its end buttons round themselves */
.lv-lang button::after { content: ''; position: absolute; inset: -7px 0; }
.lv-lang button:first-child { border-radius: 5px 0 0 5px; }
.lv-lang button:last-child { border-radius: 0 5px 5px 0; }
.lv-lang button[aria-pressed="true"] { background: #fff; color: var(--rt-navy); }

/* ===== the category bar (phone): button, clock, state line ===== */
.lv-head { position: sticky; top: 51px; z-index: 19; background: #fff; border-bottom: 1px solid var(--rt-line); }
.lv-head-in { max-width: 1400px; margin: 0 auto; padding: 8px 12px 6px; display: flex; align-items: center; gap: 10px; }
.lv-catbtn { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 12px; border: 2px solid var(--rt-ink);
             border-radius: 8px; background: #fff; text-align: left; cursor: pointer; }
.lv-catbtn .cn { min-width: 0; font: 800 22px/1 var(--rt-head); letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-catbtn .chev { margin-left: auto; flex: none; font: 700 12px/1 var(--rt-body); color: var(--rt-mute); white-space: nowrap; }
.lv-catbtn .chev::after { content: ''; display: inline-block; margin-left: 6px; width: 8px; height: 8px; border-right: 2px solid var(--rt-ink);
                          border-bottom: 2px solid var(--rt-ink); transform: translateY(-3px) rotate(45deg); }
.lv-h1, .lv-stchips-d, .lv-facts { display: none; }
.lv-clock { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.lv-clock .lb { font: 600 11px/1 var(--rt-body); letter-spacing: .06em; text-transform: uppercase; color: var(--rt-mute); }
.lv-clock .c { font: 800 24px/1 var(--rt-head); font-variant-numeric: tabular-nums; }
.lv-clock .lb:empty, .lv-clock .c:empty { display: none; }
.lv-meta { max-width: 1400px; margin: 0 auto; padding: 0 12px 8px; display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; color: var(--rt-mute); }
.lv-stchips { display: inline-flex; gap: 6px; flex: none; }
.fresh { min-width: 0; display: block; color: var(--rt-green-ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fresh::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--rt-green); vertical-align: 1px; }
.lv-meta.alarm .sep, .lv-meta.alarm .lv-lapsshort { display: none; }
.fresh.amber { color: var(--rt-amber-ink); }
.fresh.amber::before { background: var(--rt-amber); }
.fresh.red { color: var(--rt-dnf-ink); }
.fresh.red::before { background: #EF4444; }
.fresh.muted { color: var(--rt-mute); }
.fresh.muted::before { background: var(--rt-faint); }
.lv-meta .sep { color: #9CA3AF; }
.lv-lapsshort { flex: none; }
.lv-lapsshort:empty { display: none; }
.lv-meta .sep:has(+ .lv-lapsshort:empty) { display: none; }   /* its own rule: a browser without :has() drops only this one */

/* ===== search box + "Mis corredores" ===== */
.lv-tools { max-width: 1400px; margin: 0 auto; padding: 8px 12px; display: flex; gap: 8px; }
.lv-search { flex: 1; min-width: 0; height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--rt-line-2); border-radius: 8px;
             background: #fff; color: var(--rt-faint); font-size: 15px; text-align: left; cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lv-search::before, .lv-input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E"); }
.lv-search::before { content: ''; flex: none; width: 18px; height: 18px; background-repeat: no-repeat; background-position: center; background-size: 18px; }
.lv-mine { flex: none; height: 44px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border: 1px solid var(--rt-line-2); border-radius: 8px;
           background: #fff; font: 700 15px/1 var(--rt-head); letter-spacing: .04em; text-transform: uppercase; color: var(--rt-ink-2); cursor: pointer; white-space: nowrap; }
.lv-mine i { font-style: normal; color: var(--rt-star); font-size: 17px; }
.lv-mine em { font-style: normal; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--rt-ink); color: #fff; font: 700 12px/20px var(--rt-body); text-align: center; }
.lv-mine-d { display: none; }

/* ===== banners: data age, neutralization, follow hint, pre-race ===== */
.lv-banners { max-width: 1400px; margin: 0 auto; padding: 0 8px; }
.lv-banner { margin-top: 8px; padding: 10px 12px; border-radius: 8px; font-size: 14px; font-weight: 600; line-height: 1.35; }
.lv-banner.amber { background: var(--rt-amber-soft); color: var(--rt-amber-ink); border: 1px solid #FDE68A; }
.lv-banner.red { background: var(--rt-dnf-bg); color: var(--rt-dnf-ink); border: 1px solid #FECACA; }
.lv-neutral { margin-top: 8px; border-radius: 8px; background: var(--rt-amber-soft); border: 1px solid #FDE68A; color: var(--rt-amber-ink); }
.lv-neutral-b { width: 100%; display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 12px; border: 0; background: none; text-align: left;
                font: 700 14px/1.2 var(--rt-body); cursor: pointer; }
.lv-neutral-b::before { content: ''; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--rt-amber); }
.lv-neutral-b::after { content: ''; margin-left: auto; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.lv-neutral-b[aria-expanded="true"]::after { transform: rotate(225deg); }
.lv-neutral ul { list-style: none; padding: 0 12px 10px 30px; font-size: 13.5px; line-height: 1.5; }
.lv-prompt { max-width: 1400px; margin: 8px auto 0; padding: 0 8px; display: flex; align-items: center; gap: 8px; }
.lv-prompt > span { flex: 1; padding: 8px 12px; border-radius: 8px; background: var(--rt-fav-bg); border: 1px solid #FDE68A; color: var(--rt-amber-ink); font-size: 14px; font-weight: 600; }
.lv-prompt > button { flex: none; width: 44px; height: 44px; border: 0; border-radius: 22px; background: var(--rt-soft); color: var(--rt-ink-2); cursor: pointer; }
.lv-pre { max-width: 1400px; margin: 8px 8px 4px; padding: 16px; background: #fff; border: 1px solid var(--rt-line); border-top: 4px solid var(--rt-red);
          border-radius: 8px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lv-pre .l { font: 700 13px/1.2 var(--rt-body); letter-spacing: .06em; text-transform: uppercase; color: var(--rt-mute); }
.lv-pre .cd { font: 800 44px/1 var(--rt-head); font-variant-numeric: tabular-nums; }
.lv-pre .at { text-align: right; }
.lv-pre #preAt { font: 700 18px/1.2 var(--rt-head); font-variant-numeric: tabular-nums; }
.lv-pre .f { font: 600 13px/1.3 var(--rt-body); color: var(--rt-mute); margin-top: 2px; }
.lv-podium { display: none; }
.lv-empty { max-width: 1400px; margin: 24px auto; padding: 24px 16px; text-align: center; color: var(--rt-mute); font-size: 15px; }

/* ===== the board ===== */
.lv-board { max-width: 1400px; margin: 0 auto; padding: 0 8px 16px; }
.lv-thead { display: none; }
.lv-ridersbox > summary { list-style: none; }
.lv-ridersbox > summary::-webkit-details-marker { display: none; }
.lv-ridersbox > summary:not([hidden]) { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; padding: 12px; background: #fff;
    border: 1px solid var(--rt-line); border-radius: 8px; font: 700 14px/1 var(--rt-head); letter-spacing: .06em; text-transform: uppercase; color: var(--rt-ink-2); cursor: pointer; }
.lv-ridersbox > summary:not([hidden])::after { content: '\25BE'; font-size: 18px; line-height: 1; }
.lv-ridersbox[open] > summary:not([hidden])::after { content: '\25B4'; }
button.rt-who { display: block; width: 100%; min-width: 0; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.rt-row.start button.rt-who { cursor: default; }
.rt-nm { display: block; }
.fn-l { display: none; }
.rt-sub .lv-flag { display: inline-flex; flex: none; }
.rt-sub .lv-flag:empty { display: none; }
.rt-sub .lv-club { overflow: hidden; text-overflow: ellipsis; }
.c-ctry, .c-laps, .c-pt, .c-time, .c-gap, .c-best { display: none; }
.rt-row { cursor: pointer; }
.rt-row.duo, .rt-row.start { cursor: default; }
.rt-row.duo { align-items: start; }
.rt-row.duo .rt-pos { padding-top: 3px; }
.rt-row.start { min-height: 52px; }
.lv-bibpos { font: 700 15px/1 var(--rt-head); color: var(--rt-faint); font-variant-numeric: tabular-nums; }
.lv-duo-m { margin-top: 3px; font-size: 13.5px; line-height: 1.35; color: var(--rt-mute); }
.lv-duo-m > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-duo-m .st { vertical-align: 1px; }
.lv-duo-m b { flex: none; font: 700 13px/1 var(--rt-head); color: var(--rt-faint); margin-right: 3px; }
.lv-laps { grid-column: 1 / -1; margin: 6px 40px 2px 0; padding: 8px 10px; border-radius: 6px; background: var(--rt-soft); cursor: default; }
.lv-laps-l { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 16px; font-size: 14px; }
.lv-laps-l li { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.lv-laps-l li > span { min-width: 64px; }
.lv-laps-l b { font-size: 17px; font-weight: 700; }
.lv-laps-l li.best b { color: var(--rt-green-ink); }
.lv-laps-l em { font-style: normal; font: 700 11px/1 var(--rt-body); letter-spacing: .06em; text-transform: uppercase; color: var(--rt-green-ink); }
.lv-laps-none { font-size: 14px; color: var(--rt-mute); }
.rt-row.flash-up { animation: lv-up 2.5s ease-out; }
.rt-row.flash-down { animation: lv-down 2.5s ease-out; }
.rt-row.hit { animation: lv-hit 2.5s ease-out; }
/* Task U6 (B1): only the start colour: each flash ends on the row's own colour (a followed row's yellow), with no jump at its end */
@keyframes lv-up { from { background-color: #DBEAFE; } }
@keyframes lv-down { from { background-color: #FEF3C7; } }
@keyframes lv-hit { 0%, 40% { background-color: #FEF08A; } }
@media (prefers-reduced-motion: reduce) { .rt-row.flash-up, .rt-row.flash-down, .rt-row.hit { animation: none; } }
.lv-relay { max-width: 1400px; margin: 8px auto 16px; padding: 0 8px; }
.lv-relay-w { overflow-x: auto; background: #fff; border: 1px solid var(--rt-line); border-radius: 8px; }
.lv-relay-t { width: 100%; border-collapse: collapse; font-size: 14px; }
.lv-relay-t th { padding: 9px 8px; border-bottom: 1px solid var(--rt-line-2); text-align: left; font: 600 12px/1 var(--rt-body); letter-spacing: .06em; text-transform: uppercase; color: var(--rt-mute); white-space: nowrap; }
.lv-relay-t td { padding: 8px; border-top: 1px solid var(--rt-soft); white-space: nowrap; font-variant-numeric: tabular-nums; }
.lv-relay-t td.pos { font: 800 18px/1 var(--rt-head); }
.lv-relay-t td.leg, .lv-relay-t td.tot { font: 600 16px/1 var(--rt-head); }
.lv-relay-t td.ctry { display: flex; align-items: center; gap: 6px; }
.lv-relay-t tr.out td { color: var(--rt-mute); }
.lv-relay-t .iso { font-size: 12px; font-weight: 600; color: var(--rt-mute); }
.lv-arrow { margin-left: 4px; font-size: 11px; }
.lv-arrow.up { color: #1D4ED8; }
.lv-arrow.down { color: #B45309; }
.lv-sub { margin-left: 2px; color: var(--rt-amber-ink); font-weight: 700; }
.lv-note { padding: 16px; color: var(--rt-mute); }
.lv-foot { max-width: 1400px; margin: 0 auto; padding: 8px 16px 24px; text-align: center; font-size: 12px; color: var(--rt-faint); }

/* ===== the category sheet / search / "Mis corredores" (phone: a sheet over the page) ===== */
.lv-side { display: none; }
.lv-side.open { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(6, 8, 13, .55); }
.lv-side-in { position: absolute; left: 0; right: 0; bottom: 0; top: 46px; background: #fff; border-radius: 14px 14px 0 0; display: flex; flex-direction: column; overflow: hidden; }
.lv-sh-h { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 14px 8px; }
.lv-sh-h h2 { font: 800 24px/1 var(--rt-head); text-transform: uppercase; letter-spacing: .02em; }
.lv-sh-x { flex: none; width: 44px; height: 44px; border: 0; border-radius: 22px; background: var(--rt-soft); color: var(--rt-ink-2); font: 700 18px/1 var(--rt-body); cursor: pointer; }
.lv-sh-q { flex: none; padding: 0 14px; }
.lv-input { width: 100%; height: 44px; padding: 0 12px 0 40px; border: 1px solid var(--rt-line-2); border-radius: 8px; background-color: #fff; background-repeat: no-repeat;
            background-position: 12px center; background-size: 18px; color: var(--rt-ink); font: 400 16px/1 var(--rt-body); -webkit-appearance: none; appearance: none; }
.lv-input:focus { outline: none; border: 2px solid var(--rt-red); padding-left: 39px; }
.lv-input::placeholder { color: var(--rt-faint); }
.lv-input::-webkit-search-cancel-button, .lv-input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.lv-chips { flex: none; display: flex; gap: 6px; padding: 8px 14px 4px; overflow-x: auto; scrollbar-width: none; }
.lv-chips button { flex: none; height: 44px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border: 1px solid var(--rt-line-2); border-radius: 22px;
                   background: #fff; font: 700 14px/1 var(--rt-head); letter-spacing: .04em; text-transform: uppercase; color: var(--rt-ink-2); cursor: pointer; }
.lv-chips button[aria-pressed="true"] { background: var(--rt-ink); border-color: var(--rt-ink); color: #fff; }
.lv-sh-list, .lv-results { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.lv-sh-list { padding: 0 14px 16px; }
.lv-sgrp { padding: 12px 2px 6px; font: 700 12px/1 var(--rt-body); letter-spacing: .08em; text-transform: uppercase; color: var(--rt-mute); }
.lv-tiles, .lv-res-cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.lv-ci { display: block; width: 100%; min-width: 0; min-height: 54px; padding: 7px 9px; border: 1px solid var(--rt-line); border-radius: 8px; background: #fff; text-align: left; cursor: pointer; }
.lv-ci .n { display: block; font: 700 17px/1.1 var(--rt-head); text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-ci .s { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12.5px; color: var(--rt-mute); white-space: nowrap; }
.lv-ci .h { font: 700 15px/1 var(--rt-head); color: var(--rt-mute); font-variant-numeric: tabular-nums; }
.lv-ci.sel { border: 2px solid var(--rt-red); background: #FFF5F6; padding: 6px 8px; }
.lv-results { padding: 0 6px 16px; }
.lv-res-h { padding: 14px 10px 6px; font: 700 12px/1 var(--rt-body); letter-spacing: .08em; text-transform: uppercase; color: var(--rt-mute); }
.lv-res { display: grid; grid-template-columns: minmax(0, 1fr) auto 40px; gap: 6px; align-items: center; padding: 8px 0 8px 10px; border-bottom: 1px solid var(--rt-soft); }
.lv-res-go { display: block; min-width: 0; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.lv-res-go .rt-nm { font-size: 18px; }
.lv-res-c { display: block; margin-top: 2px; font-size: 13px; line-height: 1.3; color: var(--rt-mute); }
.lv-res-r { text-align: right; }
.lv-res-t { font: 700 18px/1 var(--rt-head); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lv-res-cats { padding: 0 10px; }
.lv-res-note { padding: 10px; font-size: 13px; color: var(--rt-mute); }

@media (max-width: 370px) {
    .lv-catbtn .cn { font-size: 20px; }
    .lv-clock .c { font-size: 22px; }
    .lv-mine { padding: 0 10px; font-size: 14px; }
}

/* ===== from 900 px: the categories in a left column; the rows stay the two-line rows (I2: the 9-column table needs ~1180 px,
   so below 1200 px it would squeeze the names out; 932×430, a big phone held sideways, lands here too) ===== */
@media (min-width: 900px) {
    .lv-wrap { max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; padding: 12px 16px; align-items: start; }
    /* overflow-anchor: none: the sticky column must never be the browser's scroll anchor (it does not move with the rows, so the
       reader would lose his row when one above him moves: I1) */
    .lv-side, .lv-side.open { display: block; position: sticky; top: 64px; inset: auto; z-index: auto; height: calc(100vh - 80px); background: #fff;
                              border: 1px solid var(--rt-line); border-radius: 8px; overflow: hidden; overflow-anchor: none; }
    .lv-side-in { position: static; height: 100%; border-radius: 0; }
    .lv-sh-h { display: none; }
    .lv-side[data-mode="mine"] .lv-sh-h { display: flex; padding: 10px 12px 6px; }
    .lv-side[data-mode="mine"] .lv-sh-h h2 { font-size: 20px; }
    .lv-sh-q { padding: 10px 12px; border-bottom: 1px solid var(--rt-line); }
    .lv-input { height: 40px; font-size: 13px; }
    .lv-chips { display: none; }
    .lv-sh-list { padding: 0 0 12px; }
    .lv-sgrp { padding: 10px 12px 4px; }
    .lv-tiles { display: block; }
    .lv-tiles .lv-ci { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 0; padding: 7px 12px; border: 0; border-radius: 0; }
    .lv-tiles .lv-ci .n { font-size: 16px; }
    .lv-tiles .lv-ci .s { margin: 0; flex: none; }
    .lv-tiles .lv-ci .w, .lv-tiles .lv-ci .h { display: none; }
    .lv-tiles .lv-ci[data-f="pend"] .h { display: inline; font-size: 14px; }
    .lv-tiles .lv-ci[data-f="pend"] .st { display: none; }
    .lv-tiles .lv-ci .st { height: 20px; font-size: 12px; }
    .lv-tiles .lv-ci:hover { background: var(--rt-soft); }
    .lv-tiles .lv-ci.sel { padding: 7px 12px; border: 0; background: #FFF5F6; box-shadow: inset 4px 0 0 var(--rt-red); }
    .lv-results { padding: 0 2px 12px; }
    .lv-res { padding: 7px 0 7px 10px; grid-template-columns: minmax(0, 1fr) auto 34px; }
    .lv-res-go .rt-nm { font-size: 16px; }
    .lv-res-c { font-size: 12px; }
    .lv-res-t { font-size: 16px; }
    .lv-res .rt-cp { font-size: 13px; }
    .lv-res .rt-star { width: 34px; height: 36px; font-size: 19px; }
    .lv-head { position: static; background: none; border: 0; }
    .lv-head-in { padding: 4px 0 10px; gap: 14px; flex-wrap: wrap; }
    .lv-catbtn { display: none; }
    .lv-h1 { display: block; font: 800 34px/1 var(--rt-head); text-transform: uppercase; letter-spacing: .02em; }
    .lv-stchips-d { display: inline-flex; gap: 6px; flex: none; }
    .lv-facts { display: block; font-size: 14px; color: var(--rt-mute); }
    .lv-clock { margin-left: auto; }
    .lv-clock .lb { display: none; }
    .lv-clock .c { font-size: 30px; }
    .lv-meta { padding: 0; margin-bottom: 10px; }
    .lv-stchips, .lv-meta .sep, .lv-lapsshort { display: none; }
    .lv-mine-d { display: inline-flex; margin-left: auto; }
    .lv-tools { display: none; }
    .lv-banners, .lv-prompt { padding: 0; }
    .lv-banner, .lv-neutral { margin: 0 0 10px; }
    .lv-prompt { margin: 0 0 10px; }
    .lv-pre { margin: 0 0 12px; }
    .lv-podium:not([hidden]) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0 0 12px; }
    .lv-pod { min-width: 0; background: #fff; border: 1px solid var(--rt-line); border-radius: 8px; padding: 8px 8px 9px; border-top: 4px solid var(--rt-silver); }
    .lv-pod.p1 { border-top-color: var(--rt-gold); }
    .lv-pod.p3 { border-top-color: var(--rt-bronze); }
    .lv-pod .pl { font: 800 13px/1 var(--rt-head); letter-spacing: .08em; color: var(--rt-mute); }
    .lv-pod .pn { margin-top: 4px; font: 700 16px/1.1 var(--rt-head); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .lv-pod .pn span { font-weight: 600; color: var(--rt-mute); }
    .lv-pod .pt { margin-top: 5px; font: 800 19px/1 var(--rt-head); font-variant-numeric: tabular-nums; }
    .lv-pod .pt small { font: 600 14px/1 var(--rt-head); color: var(--rt-mute); }
    .lv-board { padding: 0 0 16px; }
    .lv-board .fn-s { display: none; }
    .lv-board .fn-l { display: inline; }
    .lv-relay { padding: 0; margin: 0 0 16px; }
    .lv-empty { margin: 24px 0; }
}

/* ===== from 1200 px: the rows line up as a table (the name column keeps at least ~170 px) ===== */
@media (min-width: 1200px) {
    .lv-wrap { grid-template-columns: 300px minmax(0, 1fr); }
    .lv-podium:not([hidden]) { grid-template-columns: repeat(3, 240px); }
    /* overflow: clip, not hidden: hidden makes the board a scroll container, and the browser's scroll anchoring does not look
       inside one, so the reader would lose his row whenever one above him moves (I1) */
    .lv-board { padding: 0; background: #fff; border: 1px solid var(--rt-line); border-radius: 8px; overflow: hidden; overflow: clip; }
    .lv-thead, .lv-board .rt-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) 64px 64px 116px 84px 76px 108px 40px; column-gap: 10px; align-items: center; }
    .lv-thead { padding: 10px 0; border-bottom: 1px solid var(--rt-line-2); font: 600 12px/1 var(--rt-body); letter-spacing: .06em; text-transform: uppercase; color: var(--rt-mute); white-space: nowrap; }
    .lv-thead > :first-child { text-align: center; }
    .lv-thead .r, .lv-board .c-time, .lv-board .c-gap, .lv-board .c-best { text-align: right; }
    .lv-board .rt-grp { padding: 8px 10px; background: var(--rt-soft); }
    .lv-board .rt-grp b::before { content: '\00B7\00A0'; color: var(--rt-mute); }
    .lv-board .rt-card { border: 0; border-radius: 0; }
    .lv-board .rt-row { min-height: 56px; padding: 6px 0; }
    .lv-board .rt-tm { display: none; }
    .lv-board .c-ctry, .lv-board .c-laps, .lv-board .c-pt, .lv-board .c-time, .lv-board .c-gap, .lv-board .c-best { display: block; }
    .lv-board .c-ctry { display: flex; align-items: center; gap: 6px; }
    .lv-board .c-ctry .iso { font-size: 13px; font-weight: 600; color: var(--rt-mute); }
    .lv-board .c-laps { font: 600 17px/1 var(--rt-head); font-variant-numeric: tabular-nums; }
    .lv-board .c-laps .tot { color: var(--rt-faint); }
    .lv-board .c-time { font: 700 19px/1 var(--rt-head); font-variant-numeric: tabular-nums; }
    .lv-board .c-gap, .lv-board .c-best { font: 600 16px/1 var(--rt-head); font-variant-numeric: tabular-nums; color: var(--rt-mute); }
    .lv-board .rt-nm { font-size: 18px; }
    .lv-board .rt-sub .lv-flag { display: none; }
    .lv-board .rt-star { width: 36px; height: 36px; }
    .lv-board .rt-row.duo { align-items: center; }
    .lv-laps { margin: 4px 54px 4px 62px; }
    .lv-ridersbox > summary:not([hidden]) { margin: 0; border: 0; border-top: 1px solid var(--rt-line); border-radius: 0; }
}

/* ===== the "Recorrido" card (Task M1, Ruling A187): only for an event with its course file; course-map.js draws the map (an
   inline SVG sized to the card, labels in px) and the lines under it. Phone: closed by default, the map over the lines; from 640
   px the map (360 px) beside them. ===== */
.lv-course { max-width: 1400px; margin: 8px 8px 4px; background: #fff; border: 1px solid var(--rt-line); border-radius: 8px; }
.lv-course-btn { width: 100%; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 12px; border: 0; background: none; text-align: left;
                 font: 700 15px/1 var(--rt-head); letter-spacing: .06em; text-transform: uppercase; color: var(--rt-ink-2); cursor: pointer; }
.lv-course-btn::before { content: ''; flex: none; width: 14px; height: 14px; border: 2.5px solid var(--rt-red); border-radius: 50% 50% 50% 0; transform: rotate(-45deg); }
.lv-course-btn::after { content: ''; margin-left: auto; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.lv-course-btn[aria-expanded="true"]::after { transform: rotate(225deg); }
.lv-course-in { display: flex; flex-direction: column; gap: 10px; padding: 0 8px 10px; }
.lv-course-map { min-width: 0; }
.lv-course-note { height: 100%; min-height: 64px; display: flex; align-items: center; justify-content: center; padding: 8px; text-align: center; font-size: 14px; color: var(--rt-mute); }
.lv-course-txt { min-width: 0; font-size: 14px; line-height: 1.4; color: var(--rt-ink-2); overflow-wrap: anywhere; }
.lv-course-txt b { font-weight: 700; color: var(--rt-ink); text-transform: uppercase; }
.lv-course-lead { font-weight: 600; color: var(--rt-ink); }
.lv-course-lead .lb { color: var(--rt-red-strong); font-weight: 700; }
.lv-course-favs { list-style: none; margin-top: 6px; }
.lv-course-favs li { padding: 2px 0; }
.lv-course-star { color: var(--rt-star); }
.lv-course-pts { list-style: none; margin-top: 8px; border-top: 1px solid var(--rt-line); }
.lv-course-pts li { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 4px 0; border-bottom: 1px solid var(--rt-soft); }
.lv-course-pts .n { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--rt-navy); text-align: center;
                    font: 700 11px/16px var(--rt-body); color: var(--rt-navy); }
.lv-course-pts .a { flex: none; width: 16px; height: 16px; margin: 0 2px; border: 2px solid var(--rt-navy); border-radius: 2px;
                    background: conic-gradient(var(--rt-navy) 0 25%, #fff 0 50%, var(--rt-navy) 0 75%, #fff 0); }
.lv-course-pts .l { min-width: 0; font-weight: 600; color: var(--rt-ink); }
.lv-course-pts .k { margin-left: auto; flex: none; font: 600 15px/1 var(--rt-head); font-variant-numeric: tabular-nums; color: var(--rt-mute); white-space: nowrap; }
.cm { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.cm-track { fill: none; stroke: var(--rt-red); stroke-width: 3.5px; stroke-linejoin: round; stroke-linecap: round; }
.cm-chev { fill: none; stroke: var(--rt-navy); stroke-width: 1.6px; stroke-linecap: round; stroke-linejoin: round; }
.cm-arch .b { fill: var(--rt-navy); }
.cm-arch .w { fill: #fff; }
.cm-pt circle { fill: #fff; stroke: var(--rt-navy); stroke-width: 2px; }
.cm-pt text { font: 700 10px var(--rt-body); fill: var(--rt-navy); text-anchor: middle; }
.cm-link { stroke: var(--rt-navy); stroke-width: 1.2px; }
.cm-dot { fill: var(--rt-navy); }
.cm-lbl { font: 600 12px var(--rt-head); fill: var(--rt-ink); paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; }
.cm-tag line { stroke-width: 1.2px; }
.cm-tag text { font: 700 11px var(--rt-head); letter-spacing: .03em; text-anchor: middle; }
.cm-leader rect { fill: var(--rt-red-strong); }
.cm-leader line { stroke: var(--rt-red-strong); }
.cm-leader text { fill: #fff; }
.cm-fav rect { fill: var(--rt-amber-soft); stroke: var(--rt-star); stroke-width: 1.5px; }
.cm-fav line { stroke: var(--rt-star); }
.cm-fav text { fill: var(--rt-amber-ink); }
@media (min-width: 640px) {
    .lv-course-in { flex-direction: row; align-items: flex-start; gap: 16px; padding: 0 12px 12px; }
    .lv-course-map { flex: none; width: 360px; }
    .lv-course-txt { flex: 1; }
}
@media (min-width: 900px) {
    .lv-course { margin: 0 0 12px; }
}

/* ===== "⛰ Crono escalada" (Task C2, Ruling A194): climb.php, only while the event has a configured climb (live.js asks api/climb.php).
   Phone: its own row under "Buscar corredor" / "Mis corredores" (one line); from 900 px: after "Mis corredores" in the state line, where
   the board does not move at all. ===== */
.lv-tools { flex-wrap: wrap; }
.lv-climb { flex: 1 1 100%; min-width: 0; height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--rt-line-2);
            border-radius: 8px; background: #fff; color: var(--rt-ink-2); font: 700 15px/1 var(--rt-head); letter-spacing: .04em; text-transform: uppercase;
            text-decoration: none; white-space: nowrap; }
.lv-climb i { font-style: normal; font-size: 17px; color: var(--rt-red); }
.lv-climb::after { content: ''; flex: none; margin-left: auto; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
                   transform: rotate(-45deg); }
.lv-climb-d { display: none; }
@media (min-width: 900px) {
    .lv-climb-d { display: inline-flex; }
    .lv-climb.lv-climb-d { flex: none; height: 44px; }
    .lv-climb.lv-climb-d::after { display: none; }
}
