:root {
  --bg: #07080c;
  --bg-alta: #10131a;
  --bg-card: #151922;
  --bg-card-hover: #1c2230;
  --linea: #2a3140;
  --texto: #f3f4f7;
  --texto-suave: #a8b0bf;
  --azul: #006ac3;
  --amarillo: #fcb400;
  --oro: #f5c766;
  --ok: #3dba7e;
  --danger: #d4182f;
  --sombra: 0 8px 24px rgba(0, 0, 0, .35);
  --radio: 16px;
  --barra-h: 52px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

/* Intro de arranque en frío: mismo fondo que el splash (#07080c). */
.intro {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #07080c;
  background: #07080c;
  opacity: 1;
  isolation: isolate;
  pointer-events: none;
  cursor: default;
}
.intro.sale { opacity: 0; visibility: hidden; pointer-events: none; }
.intro.lista { display: none !important; }

/* Simulación de notch (solo para pruebas/capturas con ?notch=1). */
html.simular-notch {
  --safe-top: 47px;
  --safe-bottom: 34px;
  --safe-left: 0px;
  --safe-right: 0px;
}
html.simular-notch body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 126px;
  height: 28px;
  margin-top: 8px;
  border-radius: 16px;
  background: #000;
  z-index: 40;
  pointer-events: none;
}
html.simular-notch body::after {
  content: "";
  position: fixed;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  width: 128px;
  height: 5px;
  border-radius: 4px;
  background: #000;
  z-index: 40;
  pointer-events: none;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body, #app {
  height: 100%;
  height: 100dvh;
  background: var(--bg);
  color: var(--texto);
  font-family: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", YuGothic, Meiryo, "Noto Sans JP", "Noto Sans CJK JP", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  overscroll-behavior: none;
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
}

.pantalla {
  min-height: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

#inicio {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.oculta { display: none !important; }

/* —— Inicio: logo a la izquierda (~45 % del ancho, alto), acciones a la derecha —— */
.encabezado {
  padding: calc(8px + var(--safe-top)) 12px 8px;
  text-align: left;
  background: var(--bg-alta);
  border-bottom: 1px solid var(--linea);
}

.logo {
  display: block;
  width: 45%;
  max-width: 200px;
  height: auto;
  margin: 0;
  flex: 0 0 45%;
  object-fit: contain;
  object-position: left center;
}

.lema { display: none; }

.aviso-catalogo,
.aviso-red {
  margin: 0 16px 8px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12px;
  text-align: center;
  line-height: 1.4;
}

.aviso-catalogo {
  background: #1a160c;
  color: var(--oro);
}

.aviso-red {
  background: #2a1014;
  color: #ffc0c6;
  border: 1px solid rgba(212, 24, 47, .4);
}

.inicio-cuerpo {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.eventos-titulo {
  margin: 16px 16px 10px;
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .14em;
  line-height: 1.15;
  color: var(--texto);
  overflow-wrap: break-word;
}
html[data-lang="de"] .eventos-titulo,
html[data-lang="fr"] .eventos-titulo { letter-spacing: .06em; }
html[data-lang="ja"] .eventos-titulo { letter-spacing: .1em; font-feature-settings: "palt"; }

.eventos-tabs {
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  margin: 0 8px 8px;
  padding: 0 4px;
  border-bottom: 1px solid var(--linea);
  flex: 0 0 auto;
}

.eventos-tab {
  flex: 1;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  color: var(--texto-suave);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  padding: 8px 2px 12px;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
  position: relative;
}
.eventos-tab span {
  display: block;
  text-align: center;
  line-height: 1.2;
  max-width: 100%;
  overflow-wrap: break-word;
}

.eventos-tab svg { display: block; overflow: visible; }
.eventos-tab .livecam-rec {
  fill: #e11d2a;
  animation: livecam-rec 1.35s ease-in-out infinite;
}
@keyframes livecam-rec {
  0%, 100% { opacity: 1; }
  50% { opacity: .2; }
}

.eventos-tab[aria-selected="true"] {
  color: var(--texto);
}

.eventos-tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: -1px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(90deg, var(--azul) 0%, var(--oro) 100%);
}

.eventos-tab:focus-visible {
  outline: 2px solid var(--oro);
  outline-offset: 2px;
  border-radius: 10px;
}

.lista {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 8px 16px 16px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
}

.estado {
  padding: 24px 16px calc(16px + var(--safe-bottom));
  text-align: center;
  color: var(--texto-suave);
  font-size: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.tarjeta {
  position: relative;
  display: block;
  isolation: isolate;
  width: 100%;
  flex: 0 0 400px;
  height: 400px;
  min-height: 400px;
  padding: 0;
  border: 0;
  border-radius: 22px;
  overflow: hidden;
  background-color: #141820;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: var(--sombra);
  color: #fff;
  text-align: center;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
}

.tarjeta.sin-portada {
  background-image: linear-gradient(160deg, #1a2333 0%, #0e1219 55%, #162033 100%);
}

.tarjeta-velo {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to top,
    rgba(0, 0, 0, .84) 0%,
    rgba(0, 0, 0, .55) 38%,
    rgba(0, 0, 0, .22) 62%,
    rgba(0, 0, 0, .18) 100%);
}

.tarjeta-cuerpo {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px 36px;
}

.tarjeta-logo-caja {
  width: 112px;
  height: 112px;
  border-radius: 20px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
  flex: 0 0 auto;
  margin-bottom: 18px;
}

.tarjeta-logo-caja.oscuro {
  background: #101318;
}

.tarjeta-logo-caja img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.tarjeta-logo-typo {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: .04em;
  text-align: center;
  color: #141820;
  text-wrap: balance;
}

.tarjeta-nombre {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: .01em;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .45);
  margin: 0 0 8px;
}

.tarjeta-lugar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  color: rgba(255, 255, 255, .92);
  font-size: 13px;
  font-weight: 600;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .5);
}

.tarjeta-bandera {
  display: block;
  flex: 0 0 auto;
  border-radius: 1px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .2);
}

.tarjeta-fecha::before {
  content: "·";
  margin-right: 8px;
  opacity: .8;
}

.tarjeta-credito {
  position: absolute;
  z-index: 3;
  left: 12px;
  bottom: 8px;
  max-width: calc(100% - 24px);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .02em;
  color: rgba(255, 255, 255, .72);
  text-shadow: 0 1px 4px rgba(0, 0, 0, .8);
  pointer-events: none;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


.tarjeta-badge-alt {
  position: absolute;
  z-index: 3;
  top: 12px;
  left: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(12, 14, 18, .62);
  border: 1px solid rgba(245, 199, 102, .78);
  color: #f5c766;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1.2;
  pointer-events: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.tarjeta-logo-caja.compacta {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  padding: 7px;
  margin-bottom: 14px;
}

.tarjeta-cta-resultados {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(245, 199, 102, .92);
  color: #1a1408;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .28);
}

.tarjeta:hover, .tarjeta:focus-visible {
  outline: 2px solid var(--oro);
  outline-offset: 2px;
}

.tarjeta:active { transform: scale(.992); }


.chip {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #3a4254;
  font-size: 11px;
  font-weight: 600;
  color: #d5dbe8;
  background: #0e1219;
}

.pie {
  padding: 8px 16px calc(16px + max(8px, var(--safe-bottom)));
  text-align: center;
  color: #6b7384;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: var(--bg);
  flex: 0 0 auto;
}

/* —— Evento (visor de la página en vivo) —— */
#evento {
  position: fixed;
  inset: 0;
  height: 100%;
  height: 100dvh;
  background: #07080c;
  padding-bottom: var(--safe-bottom);
}

.barra {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: calc(var(--barra-h) + max(0px, var(--safe-top)));
  padding-top: var(--safe-top);
  padding-bottom: 0;
  padding-left: 4px;
  padding-right: 12px;
  background: #0b0d12;
  border-bottom: 1px solid #1f2430;
  z-index: 2;
}

.btn-volver {
  flex: 0 0 auto;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--oro);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  min-height: 44px;
  padding: 10px 12px;
  cursor: pointer;
}

.btn-volver:focus-visible { outline: 2px solid var(--oro); }

.barra-titulo {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.visor {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #000;
}

#marco {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  border: 0;
  background: #000;
}

.capa {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  text-align: center;
  background: rgba(7, 8, 12, .94);
  color: var(--texto-suave);
  z-index: 1;
}

.capa[hidden] { display: none !important; }

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #2a3140;
  border-top-color: var(--oro);
  border-radius: 50%;
  animation: girar .8s linear infinite;
}

@keyframes girar { to { transform: rotate(360deg); } }

.btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 12px 20px;
  min-height: 44px;
  background: var(--azul);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.btn:focus-visible { outline: 2px solid var(--oro); outline-offset: 2px; }

.btn-secundario {
  background: transparent;
  color: var(--oro);
  border: 1px solid var(--oro);
}

/* —— Modo app (PWA agregada a la pantalla de inicio / Capacitor) —— */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
button, .tarjeta { touch-action: manipulation; -webkit-touch-callout: none; }
html.standalone, html.standalone body { overscroll-behavior: none; -webkit-user-select: none; user-select: none; }
html.standalone .tarjeta-nombre, html.standalone .tarjeta-meta { -webkit-user-select: none; user-select: none; }
/* Con la barra de estado translúcida de iPhone, el contenido llega hasta arriba:
   el encabezado y la barra del visor ya suman el área segura. El fondo cubre el notch. */
html.standalone body { background: var(--bg); }
@media (orientation: landscape) {
  .encabezado { padding-left: var(--safe-left); padding-right: var(--safe-right); }
}

.pie-link { color: #a8b0bf; text-decoration: underline; }

/* —— Tema claro / automático —— */
html.tema-claro {
  color-scheme: light;
  --bg: #f3f0ea;
  --bg-alta: #fffdf8;
  --bg-card: #ffffff;
  --bg-card-hover: #f7f3eb;
  --linea: #e2d9c8;
  --texto: #16181d;
  --texto-suave: #5d6472;
  --sombra: 0 8px 24px rgba(70, 52, 20, .08);
}
html.tema-claro .aviso-catalogo { background: #fff4d6; color: #7a5a10; }
html.tema-claro .aviso-red { background: #fdecec; color: #8a1c28; border-color: rgba(212, 24, 47, .25); }
html.tema-claro .etiqueta { background: #ece8df; color: #5d6472; }
html.tema-claro .etiqueta.proxima { background: rgba(252, 180, 0, .22); color: #8a5a00; }
html.tema-claro .etiqueta.hoy { background: rgba(61, 186, 126, .18); color: #1c7a4c; }
html.tema-claro .chip { border-color: #d9d0c0; color: #3a4150; background: #f7f3eb; }
html.tema-claro .pie { color: #8a8376; }
html.tema-claro .pie-link { color: #5d6472; }
html.tema-claro #evento { background: var(--bg); }
html.tema-claro .barra { background: var(--bg-alta); border-bottom-color: var(--linea); }
html.tema-claro .capa { background: rgba(243, 240, 234, .94); }
html.tema-claro .encabezado {
  background: var(--bg-alta);
}
html.tema-claro .btn-volver,
html.tema-claro .barra .btn-icono { color: #8a5a00; }

@media (prefers-color-scheme: light) {
  html.tema-auto {
    color-scheme: light;
    --bg: #f3f0ea;
    --bg-alta: #fffdf8;
    --bg-card: #ffffff;
    --bg-card-hover: #f7f3eb;
    --linea: #e2d9c8;
    --texto: #16181d;
    --texto-suave: #5d6472;
    --sombra: 0 8px 24px rgba(70, 52, 20, .08);
  }
  html.tema-auto .aviso-catalogo { background: #fff4d6; color: #7a5a10; }
  html.tema-auto .aviso-red { background: #fdecec; color: #8a1c28; border-color: rgba(212, 24, 47, .25); }
  html.tema-auto .etiqueta { background: #ece8df; color: #5d6472; }
  html.tema-auto .etiqueta.proxima { background: rgba(252, 180, 0, .22); color: #8a5a00; }
  html.tema-auto .etiqueta.hoy { background: rgba(61, 186, 126, .18); color: #1c7a4c; }
  html.tema-auto .chip { border-color: #d9d0c0; color: #3a4150; background: #f7f3eb; }
  html.tema-auto .pie { color: #8a8376; }
  html.tema-auto .pie-link { color: #5d6472; }
  html.tema-auto #evento { background: var(--bg); }
  html.tema-auto .barra { background: var(--bg-alta); border-bottom-color: var(--linea); }
  html.tema-auto .capa { background: rgba(243, 240, 234, .94); }
  html.tema-auto .encabezado {
    background: var(--bg-alta);
  }
  html.tema-auto .btn-volver,
  html.tema-auto .barra .btn-icono { color: #8a5a00; }
}

html.tema-animar, html.tema-animar body, html.tema-animar .pantalla,
html.tema-animar .tarjeta, html.tema-animar .barra, html.tema-animar .grupo,
html.tema-animar .ajuste, html.tema-animar .encabezado {
  transition: background-color .28s ease, color .28s ease, border-color .28s ease, box-shadow .28s ease;
}
@media (prefers-reduced-motion: reduce) {
  html.tema-animar, html.tema-animar * { transition: none !important; }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* —— Barra del inicio (logo izq., favoritos / ajustes / ingresar der.) —— */
.encabezado-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 64px;
  margin-bottom: 0;
}
.encabezado-acciones { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; }
.btn-icono {
  flex: 0 0 auto;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  color: var(--texto);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font: inherit;
}
.btn-icono:hover, .btn-icono:focus-visible {
  background: var(--bg-card);
  color: var(--oro);
  outline: 2px solid var(--oro);
  outline-offset: 2px;
}
.btn-icono:active { transform: scale(.96); }
.barra .btn-icono { color: var(--oro); }

/* —— Hojas (ajustes / favoritos) —— */
.hoja {
  flex: 1;
  overflow: auto;
  padding: 16px 16px calc(24px + var(--safe-bottom));
  -webkit-overflow-scrolling: touch;
}
.hoja-marca {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 20px;
}
.hoja-marca img {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  box-shadow: var(--sombra);
}
.hoja-marca-nombre {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .01em;
}
.hoja-marca-sub {
  margin-top: 2px;
  font-size: 13px;
  color: var(--texto-suave);
  line-height: 1.35;
}
.grupo-titulo {
  margin: 8px 4px 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--texto-suave);
  white-space: normal;
  line-height: 1.3;
  overflow-wrap: break-word;
}
.grupo {
  background: var(--bg-card);
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  overflow: hidden;
  margin-bottom: 20px;
}
.ajuste {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 14px;
  border-top: 1px solid var(--linea);
}
.ajuste:first-child { border-top: 0; }
.ajuste-texto {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
}
.ajuste-icono {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #3a2a0c;
  background: rgba(245, 199, 102, .22);
}
.ajuste-copy { min-width: 0; }
.ajuste-label {
  font-size: 16px;
  font-weight: 650;
  line-height: 1.3;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
}
.ajuste-ayuda {
  margin-top: 2px;
  font-size: 12px;
  color: var(--texto-suave);
  line-height: 1.35;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}
.ajuste-desact { opacity: .72; }
.hoja-nota {
  font-size: 12px;
  color: var(--texto-suave);
  line-height: 1.45;
  padding: 0 4px;
}

/* Controles segmentados: la opción activa se lee de un vistazo, sin cortes */
.seg {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--linea);
  max-width: 100%;
}
.seg-btn {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  color: var(--texto-suave);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .01em;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
}
.seg-btn[aria-checked="true"], .seg-btn.on {
  background: var(--oro);
  color: #1a1408;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset;
}
.seg-btn:focus-visible { outline: 2px solid var(--oro); outline-offset: 2px; }
.seg-bloqueado, .seg-bloqueado .seg-btn { cursor: default; }
.seg-bloqueado .seg-btn:disabled { opacity: 1; }

@media (max-width: 430px) {
  .ajuste { flex-wrap: wrap; }
  .seg { margin-left: 48px; }
}

/* Selector de idioma con bandera SVG local */
.selector-idioma {
  display: flex;
  flex-direction: column;
}
.idioma-opcion {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 0;
  border-top: 1px solid var(--linea);
  background: transparent;
  color: var(--texto);
  font: inherit;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
}
.idioma-opcion:first-child { border-top: 0; }
.idioma-opcion:active { background: var(--bg-card-hover); }
.idioma-opcion:focus-visible { outline: 2px solid var(--oro); outline-offset: -2px; }
.idioma-flag {
  width: 24px;
  height: 16px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .28);
  object-fit: cover;
  flex: 0 0 auto;
  display: block;
  background: #ddd;
}
.idioma-nombre {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: break-word;
}
.idioma-check {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--linea);
}
.idioma-opcion.on .idioma-check,
.idioma-opcion[aria-checked="true"] .idioma-check {
  background: var(--oro);
  box-shadow: none;
}

/* —— Favoritos —— */
.hoja-fav { padding-top: 12px; }
.fav-top { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 14px; }
.fav-chip {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  min-height: 44px;
  background: var(--oro);
  color: #1a1408;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
}
.fav-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 70vw;
}
.fav-chip:focus-visible { outline: 2px solid var(--texto); outline-offset: 2px; }
.fav-reloj {
  width: 100%;
  max-width: 340px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--linea);
  border-radius: 18px;
  box-shadow: var(--sombra);
  overflow: hidden;
  text-align: center;
  padding: 10px 4px 8px;
}
.fav-reloj-celda { position: relative; min-width: 0; padding: 0 4px; }
.fav-reloj-celda + .fav-reloj-celda::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 22px;
  width: 1px;
  background: var(--linea);
}
.fav-reloj-num {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 28px;
  letter-spacing: .02em;
  line-height: 1;
  color: var(--texto);
}
.fav-reloj-lbl {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--texto-suave);
  white-space: nowrap;
}
.fav-reloj-estado {
  grid-column: 1 / -1;
  padding: 8px 12px 4px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--oro);
  white-space: nowrap;
}
.fav-reloj.solo-estado {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  padding: 12px 16px;
}
.fav-reloj.solo-estado .fav-reloj-estado { padding: 0; color: var(--texto); text-transform: none; letter-spacing: 0; font-size: 14px; white-space: normal; text-align: center; line-height: 1.35; }

.fav-buscador { width: 100%; margin-bottom: 12px; }
.fav-buscador input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--linea);
  border-radius: 12px;
  padding: 10px 14px;
  background: var(--bg-card);
  color: var(--texto);
  font: inherit;
  font-size: 16px;
}
.fav-buscador input:focus { outline: 2px solid var(--oro); border-color: var(--oro); }
.fav-resultados {
  margin-top: 8px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--linea);
  overflow: hidden;
}
.fav-resultados:empty { display: none; }

.fav-tabs {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin: 6px 0 16px;
}
.fav-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--texto-suave);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 64px;
  min-height: 44px;
  padding: 6px;
  cursor: pointer;
  border-radius: 12px;
}
.fav-tab.on, .fav-tab[aria-selected="true"] { color: var(--texto); }
.fav-tab.on svg, .fav-tab[aria-selected="true"] svg {
  background: var(--oro);
  color: #1a1408;
  border-radius: 12px;
  padding: 6px;
  box-sizing: content-box;
}
.fav-tab:focus-visible { outline: 2px solid var(--oro); }

.fav-heading {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 0 0 12px;
  line-height: 1.2;
}
.fav-filtros { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.filtro-chip {
  appearance: none;
  border: 1px solid var(--linea);
  background: var(--bg-card);
  color: var(--texto);
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.filtro-chip.on {
  background: transparent;
  border-color: var(--oro);
  color: var(--texto);
  box-shadow: inset 0 0 0 1px var(--oro);
}
.filtro-chip:focus-visible { outline: 2px solid var(--oro); outline-offset: 2px; }
[hidden] { display: none !important; }
.fav-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}
.fav-cat {
  appearance: none;
  border: 1px solid var(--linea);
  background: var(--bg-alta);
  color: var(--texto);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  min-height: 32px;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.fav-cat.on { background: rgba(245, 199, 102, .25); border-color: var(--oro); }

.fav-lista { display: flex; flex-direction: column; gap: 8px; }
.fav-vacio {
  padding: 28px 12px;
  text-align: center;
  color: var(--texto-suave);
  font-size: 14px;
  line-height: 1.45;
}
.fav-card, .fav-res {
  display: grid;
  grid-template-columns: 48px 1fr auto auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 16px;
  background: var(--bg-card);
  box-shadow: var(--sombra);
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.fav-res { box-shadow: none; border-radius: 0; border-bottom: 1px solid var(--linea); }
.fav-res:last-child { border-bottom: 0; }
.fav-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .04em;
  color: #1a1408;
  background: var(--oro);
  flex: 0 0 auto;
}
.fav-id { min-width: 0; }
.fav-nombre {
  font-size: 16px;
  font-weight: 750;
  line-height: 1.25;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}
.fav-meta { font-size: 12px; color: var(--texto-suave); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fav-flag { font-size: 12px; margin-right: 4px; }
.fav-lado {
  text-align: right;
  min-width: 4.5rem;
}
.fav-pos {
  font-weight: 800;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.fav-parcial {
  font-size: 11px;
  color: var(--texto-suave);
  margin-top: 2px;
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}
.fav-estrella {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--oro);
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 10px;
  padding: 0;
}
.fav-estrella.off { color: var(--texto-suave); }
.fav-estrella:focus-visible { outline: 2px solid var(--oro); }
.fav-estrella svg { width: 22px; height: 22px; }

.fav-mapa { padding: 8px 0 16px; }
.fav-mapa-vacio {
  background: var(--bg-card);
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  padding: 28px 20px;
  text-align: center;
  color: var(--texto-suave);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  line-height: 1.45;
  font-size: 14px;
}
.fav-mapa-vacio svg { color: var(--oro); }

/* Selector de evento/distancia (lista emergente) */
.fav-picker {
  position: absolute;
  left: 16px;
  right: 16px;
  top: calc(var(--barra-h) + var(--safe-top) + 8px);
  max-height: 60vh;
  overflow: auto;
  background: var(--bg-card);
  border: 1px solid var(--linea);
  border-radius: 16px;
  box-shadow: var(--sombra);
  z-index: 5;
  padding: 8px;
}
.fav-picker button {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  width: 100%;
  text-align: left;
  padding: 12px 12px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.fav-picker button:hover, .fav-picker button:focus-visible, .fav-picker button[aria-selected="true"] {
  background: var(--bg-card-hover);
  outline: none;
}
.fav-picker-nombre { font-weight: 700; }
.fav-picker-dist { font-size: 12px; color: var(--texto-suave); }
#favoritos { position: relative; }

/* —— Ingreso (solo pantalla, sin cuentas) —— */
.pantalla-ingreso {
  background:
    radial-gradient(800px 400px at 50% -20%, rgba(245, 199, 102, .18), transparent 60%),
    var(--bg);
}
.barra-ingreso { justify-content: flex-end; background: transparent; border-bottom: 0; }
.barra-espacio { flex: 1; }
.btn-cerrar {
  appearance: none;
  border: 0;
  width: 44px;
  height: 44px;
  margin: 4px 8px 0 0;
  border-radius: 14px;
  background: var(--oro);
  color: #1a1408;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.btn-cerrar:focus-visible { outline: 2px solid var(--texto); outline-offset: 2px; }
.ingreso-caja {
  margin: 12px 20px 0;
  background: var(--bg-card);
  border-radius: 24px;
  box-shadow: var(--sombra);
  padding: 28px 22px 24px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
}
.ingreso-icono {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  margin: 0 auto 12px;
  box-shadow: var(--sombra);
}
.ingreso-titulo {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -.03em;
  margin-bottom: 12px;
}
.ingreso-proxima {
  background: rgba(245, 199, 102, .18);
  color: var(--texto);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 18px;
  text-align: left;
  overflow-wrap: break-word;
  word-break: normal;
}
.ingreso-campo {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--linea);
  min-height: 52px;
  padding: 4px 0;
  opacity: .55;
}
.ingreso-ico { color: var(--texto-suave); flex: 0 0 auto; }
.ingreso-campo input {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--texto);
  font: inherit;
  font-size: 16px;
  min-height: 44px;
  width: 100%;
}
.ingreso-campo input:disabled { cursor: not-allowed; }
.btn-ingresar {
  margin-top: 20px;
  width: 100%;
  background: linear-gradient(90deg, #2b6ea8 0%, var(--oro) 100%);
  color: #fff;
  opacity: .55;
  cursor: not-allowed;
}
.btn-texto {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--texto);
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  min-height: 44px;
  margin-top: 4px;
  cursor: not-allowed;
  opacity: .55;
}
.btn-crear { margin-top: 0; }

/* —— Intro (arranque en frío, máx. 900 ms) —— */
.intro-halo {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 199, 102, .34), rgba(245, 199, 102, .08) 42%, transparent 70%);
  animation: intro-halo 900ms ease-in-out 1 both;
}
.intro-icono {
  position: relative;
  width: 112px;
  height: 112px;
  border-radius: 26px;
  animation: intro-pulso 900ms ease-in-out 1 both;
  filter: drop-shadow(0 0 16px rgba(245, 199, 102, .45));
}
.intro { transition: opacity .42s ease, visibility .42s ease; }
.intro.es-nativo,
.intro.auto-cierra { cursor: default; }
@keyframes intro-pulso {
  0% { transform: scale(.96); filter: drop-shadow(0 0 6px rgba(245, 199, 102, .18)); }
  48% { transform: scale(1.05); filter: drop-shadow(0 0 28px rgba(245, 199, 102, .72)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 14px rgba(245, 199, 102, .4)); }
}
@keyframes intro-halo {
  0% { transform: scale(.82); opacity: .55; }
  48% { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); opacity: .7; }
}
html.con-intro, html.con-intro body { overflow: hidden; }

/* —— Esqueletos y entrada escalonada de tarjetas —— */
.tarjeta-esqueleto {
  pointer-events: none;
  min-height: 400px;
  height: 400px;
  cursor: default;
  background-image: none;
  background-color: var(--bg-card);
}
.tarjeta-esqueleto:hover, .tarjeta-esqueleto:focus-visible {
  background: var(--bg-card);
  outline: none;
}
.esk {
  display: block;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--linea) 0%, #3a4254 50%, var(--linea) 100%);
  background-size: 140% 100%;
  animation: esk-brillo 1.1s ease-in-out infinite;
}
html.tema-claro .esk,
html.tema-auto .esk { background-image: linear-gradient(90deg, #e6dfd2 0%, #f4efe6 50%, #e6dfd2 100%); }
@media (prefers-color-scheme: dark) {
  html.tema-auto .esk { background-image: linear-gradient(90deg, var(--linea) 0%, #3a4254 50%, var(--linea) 100%); }
}
.esk-titulo { height: 16px; width: 62%; margin-bottom: 10px; }
.esk-tag {
  position: absolute;
  right: 16px;
  top: 16px;
  width: 72px;
  height: 18px;
  border-radius: 999px;
}
.tarjeta-esqueleto { position: relative; }
.esk-meta { height: 12px; width: 48%; margin-top: 4px; }
.esk-chips { display: flex; gap: 6px; margin-top: 12px; }
.esk-chips i {
  display: block;
  width: 42px;
  height: 18px;
  border-radius: 999px;
  background: inherit;
  background-image: inherit;
  background-size: 140% 100%;
  animation: esk-brillo 1.1s ease-in-out infinite;
  font-style: normal;
}
@keyframes esk-brillo {
  0% { background-position: 0 0; }
  100% { background-position: 140% 0; }
}
.tarjeta-entra {
  animation: tarjeta-entra .42s cubic-bezier(.22, .75, .3, 1) both;
  animation-delay: calc(var(--i, 0) * 55ms);
}
@keyframes tarjeta-entra {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* —— Transición entre listado, ajustes y favoritos —— */
#ajustes, #favoritos, #ingreso, #ficha {
  position: fixed;
  inset: 0;
  z-index: 8;
  background: var(--bg);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
#ajustes.entra, #favoritos.entra, #ingreso.entra, #ficha.entra,
#ajustes.sale-pantalla, #favoritos.sale-pantalla, #ingreso.sale-pantalla, #ficha.sale-pantalla {
  display: flex !important;
  pointer-events: none;
}
#ajustes.entra, #favoritos.entra, #ingreso.entra, #ficha.entra {
  opacity: 0;
  transform: translate3d(16%, 0, 0);
}
#ajustes.entra-activa, #favoritos.entra-activa, #ingreso.entra-activa, #ficha.entra-activa {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  transition: transform .32s cubic-bezier(.22, .75, .3, 1), opacity .28s ease;
}
#ajustes.sale-pantalla, #favoritos.sale-pantalla, #ingreso.sale-pantalla, #ficha.sale-pantalla {
  opacity: 0;
  transform: translate3d(16%, 0, 0);
  transition: transform .32s cubic-bezier(.22, .75, .3, 1), opacity .28s ease;
}

#audio-intro {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .intro, .intro-halo, .intro-icono { animation: none !important; transition: none !important; }
  .intro { opacity: 0 !important; visibility: hidden !important; }
  .tarjeta-entra, .esk, .esk-chips i { animation: none !important; }
  #ajustes, #favoritos, #ingreso, #ficha,
  #ajustes.entra, #favoritos.entra, #ingreso.entra, #ficha.entra,
  #ajustes.entra-activa, #favoritos.entra-activa, #ingreso.entra-activa, #ficha.entra-activa,
  #ajustes.sale-pantalla, #favoritos.sale-pantalla, #ingreso.sale-pantalla, #ficha.sale-pantalla {
    transition: none !important;
    transform: none !important;
  }
}

/* —— AT cerrar: recorte horizontal del visor (14-11-2026) —— */
html, body, #app {
  overflow-x: hidden;
  max-width: 100%;
}
#evento {
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}
.visor {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  overscroll-behavior-x: none;
}
#marco {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  border: 0;
  overflow: hidden;
}

/* Tarjeta ATRESULT al final de la lista (Pasados / Directo / Próximo). */
.atresult-tarjeta {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  width: 100%;
  flex: 0 0 auto;
  min-height: 0;
  margin: 0;
  padding: 22px 18px 20px;
  border: 1px solid var(--linea);
  border-radius: 22px;
  background: var(--bg-card);
  color: inherit;
  text-decoration: none;
  box-shadow: var(--sombra);
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  cursor: pointer;
}
.atresult-tarjeta img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}
.atresult-tarjeta h2 { margin:2px 0 0; font-size:16px; font-weight:800; line-height:1.25; color:var(--texto); overflow-wrap:break-word; text-wrap:balance; }
.atresult-tarjeta p { margin:0; font-size:13px; font-weight:600; line-height:1.35; color:var(--texto-suave); overflow-wrap:break-word; }
.atresult-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
  padding: 10px 16px;
  min-height: 40px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--oro);
  color: var(--oro);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  white-space: normal;
  text-align: center;
}
.atresult-tarjeta:focus-visible {
  outline: 2px solid var(--oro);
  outline-offset: 2px;
}
.atresult-tarjeta:active { transform: scale(.992); }
.lista { padding-bottom: 20px; }
.estado-en-lista {
  margin: 8px 0 4px;
  text-align: center;
  color: var(--texto-suave);
  font-size: 14px;
}


/* —— Listado: buscador, filtro, aviso de favoritos —— */
.lista-herramientas {
  width: 100%;
  max-width: 400px;
  margin: 0 auto 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lista-buscador {
  position: relative;
  width: 100%;
}
.lista-buscador input {
  width: 100%;
  box-sizing: border-box;
  height: 48px;
  padding: 0 52px 0 14px;
  border-radius: 12px;
  border: 1px solid var(--linea);
  background: var(--bg-alta);
  color: var(--texto);
  font: inherit;
  font-size: 15px;
}
.lista-buscador input:focus { outline: 2px solid var(--oro); border-color: var(--oro); }

.lista-buscador input[type="search"]::-webkit-search-cancel-button,
.lista-buscador input[type="search"]::-webkit-search-decoration,
.corredor-form input[type="search"]::-webkit-search-cancel-button,
.corredor-form input[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.lista-q-limpiar,
.lista-limpiar-campo {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(168, 176, 191, .28);
  color: var(--texto);
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.lista-q-limpiar:active,
.lista-limpiar-campo:active { background: rgba(168, 176, 191, .45); }
.lista-lugar-caja {
  position: relative;
  flex: 1 1 100%;
  width: 100%;
  min-width: 0;
}
.lista-filtro-fila {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.lista-filtro-fila select {
  width: 100%;
  min-width: 0;
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--linea);
  background: var(--bg-alta);
  color: var(--texto);
  font: inherit;
  font-size: 14px;
  padding: 0 52px 0 10px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23a8b0bf' stroke-width='2' stroke-linecap='round'><path d='M4 6l4 4 4-4'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.lista-lugar-caja .lista-limpiar-campo {
  right: 4px;
}
.lista-lugar-caja.has-lugar select {
  background-image: none;
  padding-right: 52px;
}
.btn-buscar-corredor {
  flex: 0 0 auto;
  height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(245, 199, 102, .45);
  background: rgba(245, 199, 102, .12);
  color: var(--oro);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.aviso-favs {
  width: 100%;
  max-width: 400px;
  margin: 0 auto 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(245, 199, 102, .12);
  border: 1px solid rgba(245, 199, 102, .4);
  color: var(--oro);
  font-size: 13px;
  font-weight: 650;
}
.aviso-favs p { margin: 0 0 4px; }
.aviso-favs p:last-child { margin-bottom: 0; }

.tarjeta-badge-alt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 0 18px #f5c76666;
  animation: at-badge-glow 1.2s ease-in-out infinite;
}
.tarjeta-badge-alt i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f5c766;
  box-shadow: 0 0 8px #f5c766aa;
  animation: at-live-dot 1.2s ease-in-out infinite;
  flex: 0 0 auto;
}
@keyframes at-live-dot {
  50% { opacity: .25; }
}
@keyframes at-badge-glow {
  0%, 100% { box-shadow: 0 0 8px #f5c76644; }
  50% { box-shadow: 0 0 18px #f5c76688; }
}
.tarjeta.con-altimetria {
  box-shadow: var(--sombra), 0 0 0 1.5px rgba(245,199,102,.55), 0 0 22px rgba(245,199,102,.28);
  animation: at-card-glow 1.6s ease-in-out infinite;
}
@keyframes at-card-glow {
  0%, 100% { box-shadow: var(--sombra), 0 0 0 1.5px rgba(245,199,102,.4), 0 0 14px rgba(245,199,102,.18); }
  50% { box-shadow: var(--sombra), 0 0 0 2px rgba(245,199,102,.75), 0 0 26px rgba(245,199,102,.38); }
}

.tarjeta-acciones {
  position: absolute;
  z-index: 4;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
}
.tarjeta-accion {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(12,14,18,.62);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 0;
}
.tarjeta-accion.tarjeta-fav.on,
.tarjeta-fav.on {
  color: #f5c766;
  border-color: rgba(245,199,102,.8);
  background: rgba(30, 22, 8, .72);
}
.tarjeta-fav.on svg { fill: #f5c766; }
.tarjeta-cuenta {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #f5c766;
  text-shadow: 0 1px 6px rgba(0,0,0,.5);
}
.tarjeta-extras {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
}
.tarjeta-extras .tarjeta-cta-resultados { margin-top: 0; }
.tarjeta-ics {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(12,14,18,.5);
  color: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
  cursor: pointer;
}
.tarjeta-ics svg { flex: 0 0 auto; }

.fav-eventos-bloque { margin: 0 0 18px; }
.fav-eventos { display: flex; flex-direction: column; gap: 8px; }
.fav-eventos-vacio { margin: 0; color: var(--texto-suave); font-size: 14px; }
.fav-evento-fila {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px 10px 12px;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--linea);
}
.fav-evento-info {
  flex: 1 1 auto;
  min-width: 0;
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.fav-evento-info strong { font-size: 14px; }
.fav-evento-info span { font-size: 12px; color: var(--texto-suave); }

.hoja-corredor { padding-bottom: 32px; }
.corredor-ayuda {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--texto-suave);
}
.corredor-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.corredor-form input,
.corredor-form select {
  width: 100%;
  box-sizing: border-box;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--linea);
  background: var(--bg-alta);
  color: var(--texto);
  font: inherit;
  padding: 0 12px;
}
.corredor-card {
  margin: 0 0 12px;
  padding: 14px;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--linea);
}
.corredor-card h3 { margin: 0 0 6px; font-size: 16px; }
.corredor-meta, .corredor-evento, .corredor-extra, .corredor-ultimo {
  margin: 0 0 4px;
  font-size: 13px;
  color: var(--texto-suave);
}
.corredor-limite {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--texto-suave);
}
.btn-corredor { margin-top: 10px; }
.btn-texto-fondo {
  background: var(--bg-alta);
  color: var(--texto);
  border: 1px solid var(--linea);
}

.compartir-hoja {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px 16px calc(16px + var(--safe-bottom));
}
.compartir-caja {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--linea);
  border-radius: 18px;
  padding: 18px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.compartir-caja h2 { margin: 0 8px 6px; font-size: 16px; }
.toast-app {
  position: fixed;
  left: 50%;
  bottom: calc(24px + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 40;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(12,14,18,.92);
  color: #fff;
  font-size: 13px;
  font-weight: 650;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .tarjeta-badge-alt, .tarjeta-badge-alt i, .tarjeta.con-altimetria, .eventos-tab .livecam-rec { animation: none !important; }
  .eventos-tab .livecam-rec { opacity: 1; }
  .tarjeta.con-altimetria { box-shadow: var(--sombra), 0 0 0 1.5px rgba(245,199,102,.55); }
}


.hoja-ficha { padding-bottom: 32px; }
.ficha-meta {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--texto-suave);
}
.ficha-cta { width: 100%; margin: 0 0 16px; }

.corredor-form .ficha-buscador input {
  height: 48px;
  padding: 0 52px 0 14px;
}
