/* ══════════════════════════════════════════════════════════════════
   GP Pistón · interfaz nueva «Hoja de tiempos»
   Modo oscuro por defecto; el claro usa la paleta «papel».
   Solo se carga con la interfaz nueva (--ui nueva / GPP_UI=nueva).
   ══════════════════════════════════════════════════════════════════ */

:root {
  --bg: #1A1A2E;
  --bg-img: radial-gradient(ellipse 1200px 600px at 80% -10%, rgba(112, 214, 199, .08), transparent 60%),
            radial-gradient(ellipse 1000px 500px at 0% 110%, rgba(147, 87, 169, .10), transparent 60%);
  --surface: #12121F;          /* barra inferior, campos */
  --cabina: #10101C;           /* franja en pista, próxima salida */
  --cabina-hondo: #08080F;
  --card: rgba(255, 255, 255, .04);
  --card-2: rgba(255, 255, 255, .05);
  --hondo: rgba(0, 0, 0, .22);
  --text: #F4F5F7;
  --text-2: #B8BECA;
  --text-3: #8E97A6;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .10);
  --line-3: rgba(255, 255, 255, .12);
  --line-4: rgba(255, 255, 255, .14);
  --line-campo: rgba(255, 255, 255, .22);
  --regla: rgba(244, 245, 247, .85);
  --rojo: #E42C36;
  --rojo-btn: #D0202F;
  --rojo-texto: #FF5A66;
  --rojo-fondo: rgba(228, 44, 54, .08);
  --rojo-fila: rgba(228, 44, 54, .14);
  --rojo-halo: rgba(228, 44, 54, .35);
  --vivo: #FF2A3D;
  --rapida: #7C3AED;
  --mejora: #3FD17A;
  --placa-bg: #F4F5F7;
  --placa-fg: #1A1A2E;
  --oro: #E3B341;
  --c270: #1F5FBF;             /* fondo de los karts 270 en las parrillas */
  --c390: #C62828;             /* fondo de los karts 390 en las parrillas */
  --tu: #FFC531;               /* borde de «tu» hueco en las parrillas */
  --plata: #C4CAD4;
  --bronce: #C98A4B;
  --f-d: 'Chakra Petch', 'Trebuchet MS', sans-serif;
  --f-b: 'Barlow', 'Segoe UI', system-ui, sans-serif;
  --f-m: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --gutter: 16px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #F3F0E9;
  --bg-img: none;
  --surface: #FBFAF6;
  --cabina: #16171C;
  --cabina-hondo: #0D0E12;
  --card: #FBFAF6;
  --card-2: #FBFAF6;
  --hondo: #EAE6DC;
  --text: #1E2027;
  --text-2: #545866;
  --text-3: #62666F;
  --line: #D6D0C3;
  --line-2: #D6D0C3;
  --line-3: #D6D0C3;
  --line-4: #C9C2B3;
  --line-campo: #1E2027;
  --regla: #1E2027;
  --rojo: #DF1E3F;
  --rojo-btn: #C4102F;
  --rojo-texto: #C4102F;
  --rojo-fondo: rgba(223, 30, 63, .07);
  --rojo-fila: rgba(223, 30, 63, .10);
  --rojo-halo: #F7DCE1;
  --rapida: #6A2BD9;
  --mejora: #0E7A3E;
  --placa-bg: #1E2027;
  --placa-fg: #F3F0E9;
  --oro: #B8860B;
  --plata: #7D8591;
  --bronce: #A0622D;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-img), var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--f-b);
  font-size: 15px;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
}
a { color: var(--text); }
a:hover { color: var(--rojo-texto); }
img { max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.gp-mono { font-family: var(--f-m); }
.gp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--rojo-texto); outline-offset: 2px; }

/* ── Cabecera ─────────────────────────────────────────────────────── */
.gp-top {
  height: 68px; flex-shrink: 0;
  padding: 0 10px 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
  background: var(--bg);
}
.gp-logo { height: 44px; display: flex; align-items: center; flex-shrink: 0; }
.gp-logo img { height: 30px; width: auto; display: block; }
.gp-logo .gp-logo-claro { display: none; }
:root[data-theme="light"] .gp-logo .gp-logo-oscuro { display: none; }
:root[data-theme="light"] .gp-logo .gp-logo-claro { display: block; }
.gp-top-dcha { display: flex; align-items: center; gap: 4px; }
.gp-icono-btn {
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 22px;
  background: transparent; color: var(--text);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  text-decoration: none;
}
.gp-icono-btn:hover { background: var(--card); color: var(--text); }
.gp-tema .gp-sol { display: block; }
.gp-tema .gp-luna { display: none; }
:root[data-theme="light"] .gp-tema .gp-sol { display: none; }
:root[data-theme="light"] .gp-tema .gp-luna { display: block; }
.gp-avatar {
  width: 44px; height: 44px; border-radius: 22px;
  background: var(--placa-bg); color: var(--placa-fg);
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; font-family: var(--f-d); font-weight: 700; font-size: 15px; letter-spacing: .04em;
}
.gp-avatar:hover { color: var(--placa-fg); opacity: .9; }
.gp-avatar-pill { display: none; }
.gp-nav-arriba { display: none; }

/* ── Franja «En pista» ────────────────────────────────────────────── */
.gp-vivo {
  height: 48px; flex-shrink: 0;
  padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 10px;
  background: var(--cabina); border-bottom: 1px solid rgba(255, 255, 255, .06);
  color: #F4F5F7; text-decoration: none;
}
.gp-vivo:hover { color: #F4F5F7; }
.gp-punto-vivo {
  width: 10px; height: 10px; flex-shrink: 0; border-radius: 5px; background: var(--vivo);
  box-shadow: 0 0 0 3px rgba(255, 42, 61, .22), 0 0 10px rgba(255, 42, 61, .8);
  animation: gp-latido 1.6s ease-in-out infinite;
}
@keyframes gp-latido { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .gp-punto-vivo { animation: none; } }
.gp-vivo-etq { font-weight: 700; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.gp-vivo-ses { flex-grow: 1; min-width: 0; font-weight: 600; font-size: 14px; color: #B8BECA; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; }
.gp-vivo-ir { display: flex; align-items: center; gap: 4px; font-weight: 600; font-size: 13px; color: #B8BECA; white-space: nowrap; }

/* ── Cuerpo ───────────────────────────────────────────────────────── */
.gp-main { flex-grow: 1; width: 100%; max-width: 720px; margin: 0 auto; padding: 0 var(--gutter) 40px; }
.gp-main-ancho { max-width: 1280px; }
.gp-kicker {
  margin: 20px 0 0; font-weight: 600; font-size: 12px; line-height: 16px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--text-3);
}
.gp-h1 {
  margin: 6px 0 0; font-family: var(--f-d); font-weight: 700; font-size: 34px; line-height: 36px;
  letter-spacing: -.01em; text-transform: uppercase; overflow-wrap: anywhere;
}
.gp-h1-xl { font-size: 44px; line-height: 42px; letter-spacing: -.02em; }
.gp-intro { margin: 8px 0 0; font-size: 14px; line-height: 20px; color: var(--text-2); text-wrap: pretty; }
.gp-intro-xl { margin-top: 12px; font-size: 17px; line-height: 25px; }

.gp-sec { margin-top: 28px; }
.gp-sec-cab {
  border-top: 2px solid var(--regla); padding-top: 8px;
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
}
.gp-sec-cab h2, .gp-h2 {
  margin: 0; font-weight: 700; font-size: 12px; line-height: 16px; letter-spacing: .14em; text-transform: uppercase;
}
.gp-sec-meta { font-weight: 600; font-size: 12px; line-height: 16px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; }
.gp-sec-meta.gp-alerta { color: var(--rojo-texto); font-weight: 700; }
.gp-sec-meta.gp-mono { letter-spacing: 0; font-weight: 500; }
.gp-nota { font-size: 13px; line-height: 18px; color: var(--text-3); }
.gp-vacio {
  margin-top: 14px; padding: 18px 16px; border: 1px dashed var(--line-4);
  color: var(--text-2); font-size: 14px; line-height: 20px; text-align: center;
}
.gp-aviso {
  margin-top: 16px; padding: 12px 14px; display: flex; gap: 10px;
  border: 1px solid var(--line-3); background: var(--card);
  font-size: 14px; line-height: 20px; color: var(--text-2);
}
.gp-aviso svg { flex-shrink: 0; margin-top: 1px; }
.gp-aviso-rojo { border-color: var(--rojo-texto); background: var(--rojo-fondo); color: var(--text); }

/* ── Controles ────────────────────────────────────────────────────── */
.gp-btn {
  height: 52px; flex-shrink: 0; padding: 0 20px; border: 0; border-radius: 0;
  background: var(--rojo-btn); color: #FFFFFF;
  font-family: var(--f-d); font-weight: 700; font-size: 16px; letter-spacing: .08em; text-transform: uppercase;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
}
.gp-btn:hover { color: #FFFFFF; filter: brightness(1.08); }
.gp-btn-linea {
  min-height: 44px; padding: 0 14px; border: 1.5px solid var(--regla); background: transparent; color: var(--text);
  display: inline-flex; align-items: center; justify-content: space-between; gap: 8px;
  font-weight: 700; font-size: 14px; text-decoration: none; cursor: pointer;
}
.gp-btn-linea:hover { color: var(--text); background: var(--card); }
.gp-btn-bloque { display: flex; width: 100%; margin-top: 16px; min-height: 52px; }
/* Pregunta de avisos push al poner el nombre (rellena /pocket/avisos.js) */
.gp-avisos { margin-top: 16px; padding: 14px; border: 1px solid var(--line-3); background: var(--card); }
.gp-avisos[hidden] { display: none; }
.gp-avisos .gpa-t { display: block; font-weight: 700; font-size: 15px; }
.gp-avisos .gpa-p { margin: 4px 0 0; font-size: 14px; line-height: 20px; color: var(--text-2); }
.gp-avisos .gpa-btns { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.gp-avisos .gpa-btns .gp-btn { height: 44px; font-size: 14px; }
.gp-avisos button:disabled { opacity: .6; cursor: default; }
.gp-enlace-sub {
  margin-top: 4px; min-height: 44px; display: inline-flex; align-items: center;
  font-weight: 600; font-size: 14px; color: var(--text-2); text-decoration: underline; text-underline-offset: 3px;
}
.gp-etq { display: block; font-weight: 700; font-size: 12px; line-height: 16px; letter-spacing: .14em; text-transform: uppercase; }
.gp-etq-sm { font-size: 11px; letter-spacing: .12em; color: var(--text-3); }
.gp-campo-fila { margin-top: 8px; display: flex; gap: 8px; position: relative; }
.gp-input {
  flex-grow: 1; min-width: 0; height: 52px; padding: 0 14px;
  border: 2px solid var(--text); border-radius: 0; background: var(--surface); color: var(--text);
  font-family: var(--f-b); font-size: 17px;
}
.gp-input::placeholder { color: var(--text-3); }
.gp-buscador {
  margin-top: 6px; height: 48px; padding: 0 12px; display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line-campo); background: var(--surface);
}
.gp-buscador input {
  flex-grow: 1; min-width: 0; height: 44px; border: 0; background: transparent; color: var(--text);
  font-family: var(--f-b); font-size: 16px; outline: none;
}
.gp-select {
  height: 48px; width: 100%; padding: 0 12px; border: 1px solid var(--line-campo); border-radius: 0;
  background: var(--surface); color: var(--text); font-family: var(--f-b); font-size: 16px;
}
.gp-sugerencias {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 20; margin-top: 4px;
  background: var(--surface); border: 1px solid var(--line-campo); max-height: 320px; overflow-y: auto;
}
.gp-sugerencias button {
  display: block; width: 100%; min-height: 44px; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--line);
  background: transparent; color: var(--text); text-align: left; cursor: pointer;
  font-weight: 600; font-size: 15px; text-transform: uppercase; letter-spacing: .03em;
}
.gp-sugerencias button:hover, .gp-sugerencias button.activo { background: var(--card); }
.gp-sugerencias b { color: var(--rojo-texto); }

/* Pestañas segmentadas */
.gp-pestanas { margin-top: 16px; display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; border: 1.5px solid var(--regla); }
.gp-pestanas > * {
  height: 44px; padding: 0 6px; border: 0; border-left: 1.5px solid var(--regla); border-radius: 0; background: transparent; color: var(--text);
  font-family: var(--f-b); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
  cursor: pointer; display: flex; align-items: center; justify-content: center; text-decoration: none; text-align: center; line-height: 1.1;
}
.gp-pestanas > *:first-child { border-left: 0; }
.gp-pestanas > [aria-pressed="true"], .gp-pestanas > [aria-current="page"], .gp-pestanas > .activa { background: var(--placa-bg); color: var(--placa-fg); }
.gp-pestanas > *:hover { color: inherit; }
/* La pestaña activa conserva su color con el ratón encima (si no, el texto
   se pintaba del color del fondo y desaparecía). */
.gp-pestanas > [aria-pressed="true"]:hover, .gp-pestanas > [aria-current="page"]:hover, .gp-pestanas > .activa:hover { color: var(--placa-fg); }
/* Chips con scroll horizontal (sesiones) */
.gp-chips { margin: 14px calc(-1 * var(--gutter)) 0; padding: 0 var(--gutter); display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.gp-chips::-webkit-scrollbar { display: none; }
.gp-chip {
  flex-shrink: 0; height: 36px; padding: 0 12px; border: 1px solid var(--line-campo); background: transparent; color: var(--text);
  display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.gp-chip[aria-pressed="true"], .gp-chip.activa { background: var(--placa-bg); color: var(--placa-fg); border-color: var(--placa-bg); }
.gp-chip:hover { color: inherit; }

/* ── Placas, sellos y tiempos ─────────────────────────────────────── */
.gp-placa {
  height: 30px; padding: 0 10px; border: 1.5px solid var(--regla);
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
}
.gp-placa-kart { height: 32px; padding: 0 10px; border-radius: 3px; background: var(--placa-bg); color: var(--placa-fg); border: 0; }
.gp-placa-kart small { font-weight: 700; font-size: 10px; letter-spacing: .14em; }
.gp-placa-kart b { font-family: var(--f-m); font-size: 17px; letter-spacing: 0; }
.gp-cat { padding: 0 6px; height: 22px; display: inline-flex; align-items: center; font-family: var(--f-m); font-weight: 700; font-size: 12px; border: 1.5px solid var(--text); white-space: nowrap; }
.gp-cat-390 { background: var(--placa-bg); color: var(--placa-fg); border-color: var(--placa-bg); }
.gp-equipo {
  width: 27px; height: 27px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--f-d); font-weight: 700; font-size: 15px; letter-spacing: 0; color: #FFFFFF;
}
.gp-equipo-xl { width: 48px; height: 48px; font-size: 26px; }
.gp-tu { padding: 0 5px; background: var(--rojo-btn); color: #FFFFFF; font-weight: 700; font-size: 10px; line-height: 16px; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.gp-en-pista { padding: 1px 6px; background: var(--rojo-btn); color: #FFFFFF; font-size: 11px; line-height: 16px; letter-spacing: .1em; font-weight: 700; text-transform: uppercase; white-space: nowrap; }
.gp-sello {
  display: inline-block; padding: 2px 8px; border: 2px solid var(--rojo-texto); border-radius: 3px; color: var(--rojo-texto);
  font-family: var(--f-d); font-weight: 700; font-size: 13px; line-height: 18px; letter-spacing: .16em; text-transform: uppercase; transform: rotate(-4deg);
}
.gp-t { font-family: var(--f-m); font-weight: 700; }
.gp-t-rapida { padding: 1px 6px; background: var(--rapida); color: #FFFFFF; }
.gp-t-mejora { color: var(--mejora); }
.gp-sancion { padding: 0 5px; border: 1.5px solid var(--rojo-texto); color: var(--rojo-texto); font-family: var(--f-m); font-weight: 700; font-size: 12px; line-height: 18px; white-space: nowrap; text-transform: none; letter-spacing: 0; }
.gp-sancion.gp-bonif { border-color: var(--mejora); color: var(--mejora); }
.gp-ta { margin-right: 4px; padding: 0 4px; border: 1px solid var(--text-3); color: var(--text-2); font-weight: 700; font-size: 10px; letter-spacing: .08em; }

/* ── Tabla de tiempos ─────────────────────────────────────────────── */
.gp-tabla-caja { margin-top: 12px; overflow-x: auto; }
.gp-tabla { width: 100%; border-collapse: collapse; table-layout: fixed; }
.gp-tabla thead tr { border-top: 2px solid var(--regla); border-bottom: 1px solid var(--regla); }
.gp-tabla th {
  height: 30px; padding: 0 6px 0 0; text-align: left; font-weight: 700; font-size: 11px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); white-space: nowrap;
}
.gp-tabla th:first-child, .gp-tabla td:first-child { padding-left: 6px; }
.gp-tabla td { height: 52px; padding: 0 6px 0 0; vertical-align: middle; }
.gp-tabla tbody tr { border-bottom: 1px solid var(--line); }
.gp-tabla .gp-num { text-align: right; white-space: nowrap; overflow: hidden; }
.gp-tabla .gp-pos { width: 38px; font-family: var(--f-d); font-weight: 700; font-size: 18px; }
.gp-tabla .gp-nombre { display: block; font-weight: 700; font-size: 14px; line-height: 20px; letter-spacing: .03em; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-tabla .gp-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-tabla .gp-sub { display: block; font-size: 12px; line-height: 16px; color: var(--text-3); }
.gp-tabla .gp-dif { font-family: var(--f-m); font-weight: 500; font-size: 13px; color: var(--text-2); }
.gp-tabla tr.gp-yo { background: var(--rojo-fila); }
.gp-tabla tr.gp-yo .gp-sub { color: var(--text-2); }
.gp-tabla tr.gp-corte td { height: 36px; }
.gp-corte-linea { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); }
.gp-corte-linea::before, .gp-corte-linea::after { content: ""; flex-grow: 1; border-top: 1.5px dashed var(--text-2); }
.gp-podio-1 { color: var(--oro); }
.gp-podio-2 { color: var(--plata); }
.gp-podio-3 { color: var(--bronce); }

/* ── Listas de navegación («Más», sesiones) ───────────────────────── */
.gp-lista { list-style: none; margin: 4px 0 0; padding: 0; }
.gp-lista a {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) 18px; column-gap: 12px; align-items: center;
  min-height: 60px; padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none;
}
.gp-lista a:hover { background: var(--card); }
.gp-lista-ico {
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-3); background: var(--card);
}
.gp-lista-tit { display: block; font-weight: 700; font-size: 15px; line-height: 20px; }
.gp-lista-sub { display: block; font-size: 13px; line-height: 18px; color: var(--text-3); }
.gp-lista-sub.gp-alerta { color: var(--rojo-texto); }
.gp-flecha { color: var(--text-3); }

/* ── Línea de tiempo (tu día / hoy en el circuito) ────────────────── */
.gp-dia { position: relative; margin-top: 6px; }
.gp-dia::before { content: ""; position: absolute; left: 71px; top: 22px; bottom: 30px; width: 2px; background: var(--line-4); }
.gp-dia ol { list-style: none; margin: 0; padding: 0; position: relative; }
.gp-dia-fila {
  display: grid; grid-template-columns: 52px 20px minmax(0, 1fr) 18px; column-gap: 10px; min-height: 60px;
  color: var(--text); text-decoration: none;
}
a.gp-dia-fila:hover { color: var(--text); background: var(--card); }
.gp-dia-hora { padding-top: 11px; font-family: var(--f-m); font-weight: 500; font-size: 14px; line-height: 22px; color: var(--text-3); }
.gp-dia-marca { display: flex; justify-content: center; padding-top: 16px; }
.gp-dia-marca span { display: block; width: 12px; height: 12px; border-radius: 6px; background: var(--text-3); box-shadow: 0 0 0 3px var(--bg); }
.gp-dia-txt { padding: 10px 0; min-width: 0; }
.gp-dia-tit { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 700; font-size: 15px; line-height: 22px; letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); }
.gp-dia-det { display: block; font-size: 13px; line-height: 18px; color: var(--text-3); }
.gp-dia-ir { padding-top: 20px; color: var(--text-3); }
/* estados: hecha (por defecto), ahora, luego, última */
.gp-dia-fila.luego .gp-dia-hora, .gp-dia-fila.ahora .gp-dia-hora, .gp-dia-fila.ultima .gp-dia-hora { color: var(--text); }
.gp-dia-fila.luego .gp-dia-tit, .gp-dia-fila.ahora .gp-dia-tit, .gp-dia-fila.ultima .gp-dia-tit { color: var(--text); }
.gp-dia-fila.luego .gp-dia-det, .gp-dia-fila.ahora .gp-dia-det, .gp-dia-fila.ultima .gp-dia-det { color: var(--text-2); }
.gp-dia-fila.luego .gp-dia-marca span { background: var(--bg); border: 2px solid var(--text); }
.gp-dia-fila.ahora .gp-dia-hora { font-weight: 700; }
.gp-dia-fila.ahora .gp-dia-marca { padding-top: 13px; }
.gp-dia-fila.ahora .gp-dia-marca span { width: 18px; height: 18px; border-radius: 9px; background: var(--rojo); border: 4px solid var(--rojo-halo); }
.gp-dia-fila.ultima .gp-dia-marca { padding-top: 14px; }
.gp-dia-fila.ultima .gp-dia-marca span {
  width: 16px; height: 16px; border-radius: 0; border: 1px solid var(--text);
  background: repeating-conic-gradient(var(--text) 0 25%, var(--bg) 0 50%) 0 0 / 8px 8px;
}
.gp-dia-fila.sin-reloj .gp-dia-marca span { background: var(--bg); border: 2px solid var(--text-2); }

/* ── Tarjeta «Tu próxima salida» y semáforo ───────────────────────── */
.gp-cabina { margin-top: 18px; background: var(--cabina); color: #F4F5F7; border: 1px solid rgba(255, 255, 255, .08); border-radius: 6px; overflow: hidden; }
.gp-cabina-cuerpo { padding: 16px 18px 0; }
.gp-cabina-cab { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.gp-cabina-cab h2 { margin: 0; font-weight: 700; font-size: 12px; line-height: 20px; letter-spacing: .14em; text-transform: uppercase; color: #B8BECA; }
.gp-cabina-hora { font-family: var(--f-m); font-weight: 700; font-size: 18px; line-height: 20px; }
.gp-cabina-ses { margin: 6px 0 0; font-family: var(--f-d); font-weight: 700; font-style: italic; font-size: 48px; line-height: 50px; letter-spacing: -.02em; text-transform: uppercase; overflow-wrap: anywhere; }
.gp-cabina-det { margin: 4px 0 0; font-size: 14px; line-height: 20px; color: #B8BECA; }
.gp-cabina-bajo { margin-top: 16px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.gp-semaforo { display: flex; gap: 8px; padding: 7px 9px; background: var(--cabina-hondo); border: 1px solid #2A2A3C; border-radius: 22px; }
.gp-luz {
  width: 20px; height: 20px; border-radius: 10px; flex-shrink: 0;
  background: radial-gradient(circle at 35% 30%, #4A4D58 0, #26282F 60%, #1B1C22 100%);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .6);
}
.gp-luz.on {
  background: radial-gradient(circle at 35% 30%, #FFB8BF 0, #FF2A3D 42%, #A8001A 100%);
  box-shadow: 0 0 12px 2px rgba(255, 42, 61, .55);
}
.gp-cuenta { text-align: right; }
.gp-cuenta-num { margin: 0; display: flex; align-items: baseline; justify-content: flex-end; gap: 4px; color: #FF5A66; }
.gp-cuenta-num b { font-family: var(--f-d); font-weight: 700; font-size: 44px; line-height: 40px; white-space: nowrap; }
.gp-cuenta-num span { font-weight: 700; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; }
.gp-cuenta-etq { margin: 4px 0 0; font-weight: 600; font-size: 12px; line-height: 16px; letter-spacing: .1em; text-transform: uppercase; color: #B8BECA; }
.gp-cabina-pie { margin-top: 16px; border-top: 1px solid rgba(255, 255, 255, .08); padding: 6px 8px 6px 18px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gp-cabina-pie .gp-placa-kart { background: #F4F5F7; color: #1A1A2E; }
.gp-cabina-pie .gp-placa { border-color: #F4F5F7; color: #F4F5F7; height: 32px; border-radius: 3px; font-size: 10px; letter-spacing: .14em; }
.gp-cabina-pie .gp-placa b { font-family: var(--f-m); font-size: 15px; letter-spacing: 0; }
.gp-cabina-pie a { margin-left: auto; min-height: 44px; padding: 0 10px; display: flex; align-items: center; gap: 6px; color: #F4F5F7; text-decoration: none; font-weight: 700; font-size: 14px; }

/* ── Cifras «Cómo vas» ────────────────────────────────────────────── */
.gp-cifras { margin-top: 20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid var(--regla); border-bottom: 1px solid var(--line-2); }
.gp-cifra { padding: 10px 0 12px 12px; border-left: 1px solid var(--line-2); min-width: 0; }
.gp-cifra:first-child { padding-left: 0; border-left: 0; }
.gp-cifra-etq { margin: 0; font-weight: 700; font-size: 11px; line-height: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp-cifra-val { margin: 4px 0 0; display: flex; align-items: baseline; gap: 2px; font-family: var(--f-d); font-weight: 700; font-size: 26px; line-height: 28px; }
.gp-cifra-val small { font-family: var(--f-b); font-weight: 600; font-size: 13px; color: var(--text-3); }
.gp-cifra-val.gp-mono { font-family: var(--f-m); font-size: 19px; }

/* ── Trámites («Qué te falta») ────────────────────────────────────── */
.gp-tramites { margin-top: 10px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.gp-tramite { padding: 10px 12px; border: 1px solid var(--line-2); background: var(--card); }
.gp-tramite p { margin: 0; }
.gp-tramite-tit { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; line-height: 18px; letter-spacing: .08em; text-transform: uppercase; }
.gp-tramite-val { margin-top: 2px !important; font-size: 14px; line-height: 20px; color: var(--text-2); }
.gp-tramite.falta { border: 1.5px solid var(--rojo-texto); background: var(--rojo-fondo); }
.gp-tramite.falta .gp-tramite-tit { color: var(--rojo-texto); }
.gp-tramite.falta .gp-tramite-val { color: var(--text); }

/* ── Mini parrilla ────────────────────────────────────────────────── */
.gp-parrilla { margin-top: 12px; padding: 12px; background: var(--hondo); display: flex; flex-direction: column; gap: 6px; }
.gp-parrilla-salida { margin: 0; display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 700; font-size: 11px; line-height: 18px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); }
.gp-parrilla-fila { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.gp-parrilla-cab { font-weight: 700; font-size: 11px; line-height: 14px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.gp-hueco {
  height: 36px; padding: 0 10px; display: flex; align-items: center; gap: 8px; min-width: 0;
  background: var(--card-2); border: 1px solid var(--line-2);
  font-weight: 600; font-size: 13px; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; overflow: hidden;
}
.gp-hueco b { font-family: var(--f-m); font-weight: 700; color: var(--text-3); }
.gp-hueco span { overflow: hidden; text-overflow: ellipsis; }
.gp-hueco.vacio { color: var(--text-3); }
/* Parrillas de salida: fondo azul para la 270 y rojo para la 390, con texto
   blanco (contraste de unos 6:1 en los dos). «Tú» se marca con borde dorado,
   porque el rojo ya es el color de la 390. */
.gp-hueco.c270, .gp-grid-kart.c270 { background: var(--c270); border-color: var(--c270); color: #FFFFFF; }
.gp-hueco.c390, .gp-grid-kart.c390 { background: var(--c390); border-color: var(--c390); color: #FFFFFF; }
.gp-hueco.c270 b, .gp-hueco.c390 b { color: rgba(255, 255, 255, .85); }
.gp-hueco.vacio.c270, .gp-hueco.vacio.c390 { opacity: .55; }
.gp-hueco.yo { box-shadow: inset 0 0 0 3px var(--tu); font-weight: 700; letter-spacing: .06em; }
.gp-muestra { display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px; }
.gp-muestra.c270 { background: var(--c270); }
.gp-muestra.c390 { background: var(--c390); }

/* ── Equipo ───────────────────────────────────────────────────────── */
.gp-equipo-cab { margin-top: 12px; display: flex; align-items: center; gap: 12px; }
.gp-equipo-nombre { margin: 0; font-family: var(--f-d); font-weight: 700; font-size: 22px; line-height: 26px; text-transform: uppercase; }
.gp-grupos { margin-top: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
.gp-grupos-tit { margin: 0; padding-bottom: 6px; border-bottom: 1.5px solid var(--regla); font-weight: 700; font-size: 11px; line-height: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.gp-grupos ul { list-style: none; margin: 0; padding: 0; }
.gp-grupos li {
  min-height: 34px; display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--line-2);
  font-weight: 600; font-size: 14px; letter-spacing: .03em; text-transform: uppercase; overflow: hidden;
}
.gp-grupos li.yo { font-weight: 700; }

/* ── Tarjetas genéricas y acordeón ────────────────────────────────── */
.gp-tarjeta { margin-top: 12px; padding: 14px; border: 1px solid var(--line-2); background: var(--card); }
.gp-acordeon details { border-bottom: 1px solid var(--line); }
.gp-acordeon summary {
  min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  list-style: none; cursor: pointer; font-weight: 700; font-size: 15px;
}
.gp-acordeon summary::-webkit-details-marker { display: none; }
.gp-acordeon summary::after {
  content: ""; width: 9px; height: 9px; flex-shrink: 0; margin-right: 4px;
  border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3); transform: rotate(45deg) translateY(-3px);
}
.gp-acordeon details[open] summary::after { transform: rotate(-135deg) translate(-3px, 0); border-color: var(--text-2); }
.gp-acordeon .gp-resp { margin: 0 0 14px; font-size: 14px; line-height: 21px; color: var(--text-2); }
.gp-acordeon .gp-resp p { margin: 0 0 8px; }
.gp-acordeon .gp-resp ul, .gp-acordeon .gp-resp ol { margin: 0 0 8px; padding-left: 20px; }

/* ── Barra de secciones (móvil) ───────────────────────────────────── */
.gp-nav {
  position: sticky; bottom: 0; z-index: 30;
  height: calc(64px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); flex-shrink: 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--line-2); background: var(--surface);
}
.gp-nav a {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  text-decoration: none; color: var(--text-3); font-weight: 600; font-size: 11px; letter-spacing: .04em;
}
.gp-nav a[aria-current="page"] { color: var(--text); font-weight: 700; }
.gp-nav a[aria-current="page"]::before { content: ""; position: absolute; top: -1px; left: 24%; right: 24%; height: 3px; background: var(--rojo); }

.gp-pie { padding: 20px var(--gutter) 28px; text-align: center; font-size: 13px; color: var(--text-3); }
.gp-pie a { color: var(--text-2); }

/* ── Escritorio ───────────────────────────────────────────────────── */
@media (min-width: 1024px) {
  :root { --gutter: 40px; }
  body { font-size: 16px; }
  .gp-top { height: 72px; padding: 0 var(--gutter); gap: 36px; justify-content: flex-start; }
  .gp-logo img { height: 36px; }
  .gp-nav-arriba { display: flex; align-self: stretch; align-items: stretch; gap: 2px; }
  .gp-nav-arriba a {
    position: relative; display: flex; align-items: center; padding: 0 14px;
    color: var(--text-2); text-decoration: none; font-weight: 600; font-size: 15px; letter-spacing: .02em;
  }
  .gp-nav-arriba a[aria-current="page"] { color: var(--text); font-weight: 700; }
  .gp-nav-arriba a[aria-current="page"]::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 3px; background: var(--rojo); }
  .gp-top-dcha { margin-left: auto; gap: 12px; }
  .gp-avatar-pill {
    height: 44px; padding: 0 16px 0 5px; display: flex; align-items: center; gap: 10px;
    border: 1.5px solid var(--regla); border-radius: 22px; color: var(--text); text-decoration: none;
    font-weight: 700; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap;
  }
  .gp-avatar-pill .gp-avatar { width: 32px; height: 32px; font-size: 13px; }
  .gp-top-dcha > .gp-avatar { display: none; }
  .gp-vivo { padding: 0 var(--gutter); }
  .gp-nav { display: none; }
  .gp-main { max-width: 1200px; padding-top: 16px; padding-bottom: 64px; }
  .gp-h1 { font-size: 44px; line-height: 44px; }
  .gp-h1-xl { font-size: 56px; line-height: 56px; }
  .gp-cabina-ses { font-size: 56px; line-height: 56px; }
  .gp-tabla .gp-nombre { max-width: none; }
  .gp-dos-col { display: grid; grid-template-columns: minmax(0, 1fr) 400px; column-gap: 32px; align-items: start; }
}

/* ── Subsecciones (Tiempos: Clasificación | Sesiones; Equipos: Formación | Clasificación) ── */
.gp-subnav { margin: 12px calc(-1 * var(--gutter)) 0; padding: 0 var(--gutter); display: flex; gap: 20px; border-bottom: 1px solid var(--line-2); overflow-x: auto; scrollbar-width: none; }
.gp-subnav::-webkit-scrollbar { display: none; }
.gp-subnav a { position: relative; min-height: 44px; display: flex; align-items: center; white-space: nowrap; color: var(--text-2); text-decoration: none; font-weight: 600; font-size: 14px; letter-spacing: .02em; }
.gp-subnav a[aria-current="page"] { color: var(--text); font-weight: 700; }
.gp-subnav a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--rojo); }
.gp-leyenda { margin-top: 14px; display: flex; flex-direction: column; gap: 4px; font-size: 12px; line-height: 20px; color: var(--text-2); }
.gp-leyenda span { display: flex; align-items: center; gap: 8px; }
.gp-leyenda .gp-t-rapida { font-size: 11px; line-height: 16px; padding: 0 5px; }
.gp-hueco-tabla td { text-align: center; height: 36px !important; font-weight: 600; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
@media (min-width: 1024px) { .gp-subnav { margin-top: 20px; } }

.gp-aviso-admin { padding: 10px var(--gutter); background: #3A2A00; color: #FFE08A; font-size: 13px; line-height: 18px; text-align: center; }
.gp-aviso-admin a { color: #FFFFFF; font-weight: 700; }

/* ── Botón solidario (arriba del todo en Inicio y Race Control) ── */
.gp-donar {
  margin-top: 16px; min-height: 68px; padding: 12px 12px 12px 14px;
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(120deg, #8E2DE2 0%, #D6336C 100%);
  color: #FFFFFF; text-decoration: none; border-radius: 6px;
}
.gp-donar:hover { color: #FFFFFF; filter: brightness(1.06); }
.gp-donar-corazon { font-size: 26px; line-height: 1; animation: gp-latido-corazon 1.6s ease-in-out infinite; }
@keyframes gp-latido-corazon { 50% { transform: scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .gp-donar-corazon { animation: none; } }
.gp-donar-txt { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gp-donar-txt strong { font-weight: 700; font-size: 14px; line-height: 18px; }
.gp-donar-txt small { font-size: 12px; line-height: 16px; opacity: .9; }
.gp-donar-cta {
  flex-shrink: 0; height: 40px; padding: 0 12px; display: inline-flex; align-items: center; gap: 4px;
  background: #FFFFFF; color: #8E2DE2; font-family: var(--f-d); font-weight: 700; font-size: 14px; letter-spacing: .08em; text-transform: uppercase;
}
@media (min-width: 1024px) {
  .gp-donar { padding: 14px 16px 14px 20px; }
  .gp-donar-txt strong { font-size: 16px; }
  .gp-donar-txt small { font-size: 13px; }
}

/* ── Lastre dentro de «Tu próxima salida» ── */
.gp-cabina-lastre {
  margin-top: 14px; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 1.5px solid rgba(244, 245, 247, .85); color: #F4F5F7;
}
.gp-cabina-lastre .k { margin: 0; font-weight: 700; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #B8BECA; }
.gp-cabina-lastre .d { margin: 2px 0 0; font-size: 13px; color: #B8BECA; }
.gp-cabina-lastre .v { flex-shrink: 0; font-family: var(--f-d); font-weight: 700; font-size: 30px; line-height: 30px; }
.gp-cabina-lastre .v small { margin-left: 3px; font-family: var(--f-b); font-size: 14px; color: #B8BECA; }

/* ── Tu sesión en pista: puesto y quién va delante y detrás ── */
.gp-vivo-pos { margin-top: 12px; display: flex; align-items: baseline; justify-content: space-between; gap: 4px 12px; flex-wrap: wrap; }
.gp-vivo-p { margin: 0; display: flex; align-items: baseline; gap: 8px; }
.gp-vivo-p b { font-family: var(--f-d); font-weight: 700; font-style: italic; font-size: 56px; line-height: 52px; letter-spacing: -.02em; }
.gp-vivo-p span { font-size: 15px; color: #B8BECA; }
.gp-vivo-gen { margin: 0; font-size: 13px; color: #B8BECA; }
.gp-vivo-riv { list-style: none; margin: 14px 0 0; padding: 0; border-top: 1.5px solid rgba(244, 245, 247, .85); }
.gp-vivo-riv li { min-height: 46px; display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 10px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.gp-vivo-riv .k { font-weight: 700; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #B8BECA; }
.gp-vivo-riv .n { font-weight: 600; font-size: 15px; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp-vivo-riv .n.nadie { font-weight: 500; text-transform: none; color: #B8BECA; }
.gp-vivo-riv .t { font-family: var(--f-m); font-weight: 700; font-size: 17px; white-space: nowrap; }
.gp-vivo-riv li.tu { margin: 0 -18px; padding: 0 18px; background: rgba(255, 197, 49, .10); }
.gp-vivo-riv li.tu .k { color: var(--tu); }
.gp-vivo-riv li.tu .n { font-weight: 500; text-transform: none; color: #B8BECA; }
.gp-cabina-viva .gp-cabina-det { margin-top: 10px; }

/* ── Retraso real del horario ── */
.gp-retraso { min-height: 40px; padding: 6px var(--gutter); display: flex; align-items: center; flex-wrap: wrap; gap: 2px 10px; background: var(--cabina); border-bottom: 1px solid rgba(255, 255, 255, .06); color: #F4F5F7; }
.gp-retraso[hidden] { display: none; }
.gp-retraso svg { flex-shrink: 0; color: var(--oro); }
.gp-retraso-txt { font-weight: 700; font-size: 14px; }
.gp-retraso-nota { font-size: 13px; color: #B8BECA; }
.gp-prevista { display: block; font-weight: 700; }
.gp-programada { display: block; font-size: 11px; line-height: 14px; font-weight: 500; color: var(--text-3); }
.gp-cabina .gp-programada { color: #B8BECA; }
