/* ═══════════════════════════════════════════════════════════════════════
   RECORRER UNIDO, PASO 1 (RECORRER-UNIDO.md; mockups/recorrer-retos-taxi.html, secciones 02, 03 Entrada 2, 04 y 06)
   Todo cuelga de html.unida (js/portada-unida.js) o de body.ru (Recorrer abierto con la portada unida, js/pintar.js):
   apagada, esta hoja no cambia nada. Un solo acento; los colores salen de las variables de la piel.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── La barra: Inicio · Recorrer · W · Premios · Amigos ── */
html:not(.unida) .ru-solo { display: none !important; }
html.unida .ru-no { display: none !important; }
html:not(.unida) .ru-globo { display: none !important; }
html.unida #tab-pintar { position: relative; }
.ru-globo {
  position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box;
  border-radius: 999px; background: var(--acc); color: var(--acc-ink); border: 2px solid var(--bg);
  font-size: 12px; font-weight: 600; line-height: 14px; text-align: center; font-style: normal;
}
.ru-globo[hidden] { display: none; }
body.videos-abierto .ru-globo { border-color: #14130F; }

/* ── Recorrer unido: el mapa a color con los pines de Retos (pintar.css, lugares.css y poner-lugar.css los esconden solo sin .ru) ── */
body.pintando.ru .w-mi-ubic { display: none; }   /* Mi ubicación va en la columna de la derecha, encima de la hoja */
body.pintando.ru.pt-saliendo .w-yo-marca { display: none; }   /* durante una salida ya te marca la salida (pt-marca aqui), que te sigue */
.ru-arriba > *, .ru-lado > *, .ru-capa-fila > *, .ru-hoja { pointer-events: auto; }

/* Arriba: tu cuenta, las dos píldoras y la lupa */
.ru-arriba { position: absolute; left: 12px; right: 12px; top: calc(12px + var(--sa-arriba, 0px)); display: flex; align-items: center; gap: 8px; pointer-events: none; z-index: 2; }
.ru-arriba .w-redondo { width: 44px; height: 44px; }
.ru-arriba .ru-cuenta .w-avatar { width: 38px; height: 38px; border: 0; box-shadow: none; }
.ru-hueco { flex: 1; min-width: 0; }
.ru-pil {
  display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; min-width: 0; border: 0; border-radius: 999px;
  background: var(--surf); color: var(--ink); box-shadow: var(--csh); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.ru-pil span { overflow: hidden; text-overflow: ellipsis; }
.ru-pil .trazo { width: 17px; height: 17px; flex: none; stroke: var(--acc); }
#ru-km { flex: none; }
#ru-bol { flex: 0 1 auto; }
#ru-bol .ru-corto { display: none; }
@media (max-width: 419px) {
  #ru-bol .ru-largo { display: none; }
  #ru-bol .ru-corto { display: inline; }
  .ru-arriba { gap: 6px; }
  .ru-pil { padding: 0 12px; gap: 6px; }
}

/* A la derecha, justo encima de la hoja: la capa "Mi recorrido" y Mi ubicación */
.ru-lado { position: absolute; right: 12px; bottom: calc(var(--ru-hoja-h, 210px) + 12px); display: flex; flex-direction: column; align-items: flex-end; gap: 10px; pointer-events: none; z-index: 2; }
.ru-lado .w-redondo { width: 44px; height: 44px; }
.ru-lado .w-redondo .trazo { width: 20px; height: 20px; }
.ru-lado .w-redondo.on { background: var(--ink); color: var(--surf); }
.ru-capa-fila { display: flex; align-items: center; gap: 8px; pointer-events: none; }
.ru-capa-menu {
  display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 8px 0 14px; border-radius: 999px;
  background: var(--surf); color: var(--ink); box-shadow: var(--csh); font-size: 14px; font-weight: 500; cursor: pointer; position: relative;
}
.ru-capa-menu input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ru-capa-menu i { width: 38px; height: 24px; border-radius: 999px; background: var(--field); position: relative; transition: background .15s; flex: none; }
.ru-capa-menu i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--surf); box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.ru-capa-menu input:checked + i { background: var(--acc); }
.ru-capa-menu input:checked + i::after { transform: translateX(14px); }
.ru-capa-menu input:focus-visible + i { outline: 2px solid var(--acc); outline-offset: 2px; }

/* Abajo: la hoja con asa, Pasear · Taxi y "Hoy cerca de ti" */
.ru-hoja {
  position: absolute; left: 0; right: 0; bottom: 0; box-sizing: border-box; padding: 4px 16px 14px; z-index: 3;
  background: var(--surf); color: var(--ink); border-radius: 24px 24px 0 0; box-shadow: 0 -8px 30px rgba(0,0,0,.12);
  display: flex; flex-direction: column; max-height: calc(100% - 70px - var(--sa-arriba, 0px));
}
.ru-hoja.alta { top: calc(70px + var(--sa-arriba, 0px)); }
.ru-asa { align-self: center; width: 64px; height: 22px; padding: 0; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; flex: none; }
.ru-asa i { display: block; width: 40px; height: 5px; border-radius: 999px; background: var(--line); }
.ru-hoja > .jt-tarjeta, .ru-hoja > .pt-card { margin-bottom: 10px; }
.ru-botones { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; flex: none; }
.ru-botones.solo { grid-template-columns: 1fr; }
.ru-pasear, .ru-taxi {
  min-height: 56px; border-radius: 999px; display: flex; align-items: center; justify-content: center; gap: 10px;
  font: inherit; font-size: 17px; font-weight: 500; cursor: pointer;
}
.ru-pasear { border: 0; background: var(--acc); color: var(--acc-ink); box-shadow: 0 10px 26px color-mix(in srgb, var(--acc) 32%, transparent); }
.ru-taxi { border: 1.5px solid var(--line); background: var(--surf); color: var(--ink); }
.ru-pasear .trazo, .ru-taxi .trazo { width: 22px; height: 22px; }
.ru-taxi span { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; }
.ru-taxi small { font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: .04em; }
.ru-cerca-t { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 14px 2px 8px; flex: none; }
.ru-cerca-t b { font-size: 15px; font-weight: 500; }
.ru-cerca-t small { font-size: 13px; color: var(--muted); }
.ru-fila { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 2px; scroll-snap-type: x proximity; }
.ru-fila::-webkit-scrollbar { display: none; }
.ru-reto {
  flex: 0 0 auto; width: 118px; min-height: 84px; box-sizing: border-box; padding: 10px 12px; border: 0; border-radius: 16px; scroll-snap-align: start;
  background: var(--field); color: var(--ink); text-align: left; font: inherit; cursor: pointer; text-decoration: none;
  display: flex; flex-direction: column; gap: 2px;
}
.ru-reto b { font-size: 18px; font-weight: 500; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ru-reto span { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ru-reto small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ru-reto .ru-ico .trazo { width: 20px; height: 20px; stroke: var(--acc); }
.ru-nada { margin: 0; padding: 4px 2px; font-size: 13px; color: var(--muted); line-height: 1.4; }
.ru-lista { flex: 1; min-height: 0; overflow-y: auto; margin: 0 -16px; padding: 0 16px 8px; overscroll-behavior: contain; }
.ru-lista .py-card { width: 100%; }

/* Las hojas que abren las píldoras */
.ru-tu-mapa .pt-card { box-shadow: none; padding: 0; background: transparent; }
/* En la hoja "Tu mapa" la leyenda dice cómo se ve la línea: suave (un día) y firme (volviste otro día). */
.ru-tu-mapa .pt-leyenda i { width: 22px; height: 5px; border: 0; border-radius: 999px; }
.ru-tu-mapa .pt-leyenda i.borde { background: color-mix(in srgb, var(--acc) 42%, transparent); }
.ru-tu-mapa .pt-leyenda i.color { background: var(--acc); }
.ru-cita {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 12px; border: 0; border-radius: var(--r-sm, 16px);
  background: var(--field); color: var(--ink); font: inherit; font-size: 14px; text-align: left; cursor: pointer;
}
.ru-cita .trazo { width: 22px; height: 22px; stroke: var(--acc); flex: none; }
.ru-cita b { font-weight: 500; }
.ru-cita small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Escritorio (1024 px o más, fuera de la app): la hoja es una tarjeta abajo a la izquierda y no tapa el mapa entero. */
@media (min-width: 1024px) {
  html:not(.en-app) body.ru .ru-hoja { left: 20px; right: auto; bottom: 20px; width: 400px; border-radius: 24px; box-shadow: var(--csh); }
  html:not(.en-app) body.ru .ru-hoja.alta { top: 90px; }
  html:not(.en-app) body.ru .ru-lado { bottom: 24px; right: 20px; }
  html:not(.en-app) body.ru .ru-arriba { left: 20px; right: 20px; top: 20px; }
}

/* ═══════════════════════════════════════════════════════════════════════
   RECORRER UNIDO, PASO 2 (mockup, secciones 05, 06, 07 y 09): el reto como destino, los retos de Wilep, el marcador dorado,
   el destino y el aviso durante la salida, "Tu paseo de hoy" y el sorteo simple. Mismo contrato: html.unida, body.ru o clases ru-.
   El dorado es el de las medallas (lugar especial); el acento sigue siendo de los retos de negocios, que van encima.
   ═══════════════════════════════════════════════════════════════════════ */
html.unida { --ru-oro: #D9A630; --ru-oro-suave: #F6E7BE; --ru-oro-tinta: #6B4F12; }

/* Un solo marcador dorado por lugar: los de medalla, monumento y plaza se esconden dentro de Recorrer unido */
body.pintando.ru .md-marca, body.pintando.ru .mn-marca, body.pintando.ru .lgm { display: none !important; }
body.pintando.ru .simpson-lugar.ru-cartel-off { display: none !important; }   /* el cartel del lugar quedaba debajo del disco (js/recorrer-destino.js: ajustarCarteles) */
.ru-esp { padding: 0; border: 0; background: none; cursor: pointer; z-index: 1; }
.ru-esp-disco {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; box-sizing: border-box;
  background: var(--ru-oro); color: #2A2213; border: 2px solid #fff; box-shadow: 0 3px 9px rgba(0,0,0,.28);
}
.ru-esp-disco .trazo { width: 15px; height: 15px; stroke-width: 2; }
.ru-esp:focus-visible .ru-esp-disco { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Las tarjetas de la fila y de la lista: un reto de Wilep lleva el premio sobre un fondo dorado suave */
.ru-reto.ru-wilep { background: var(--ru-oro-suave); }
.ru-reto.ru-wilep b { font-size: 14px; line-height: 1.2; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ru-wilep-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin-bottom: 12px; }
.ru-wilep-lista .ru-reto { width: auto; }

/* "Cómo llegas" (ficha de un reto de negocio y de un reto de Wilep) y las filas de elegir */
.ru-como { display: grid; gap: 8px; margin: 4px 0 16px; }
.ru-como-t { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ru-via {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; box-sizing: border-box; border: 1.5px solid var(--line);
  border-radius: var(--r-sm, 16px); background: var(--surf); color: var(--ink); font: inherit; text-align: left; cursor: pointer;
}
.ru-via > .trazo { width: 18px; height: 18px; flex: none; color: var(--muted); }
.ru-via-ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--field); flex: none; }
.ru-via-ic .trazo { width: 19px; height: 19px; stroke: var(--acc); }
.ru-via-ic.oro { background: var(--ru-oro); }
.ru-via-ic.oro .trazo { stroke: #2A2213; }
.ru-via-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ru-via-tx b { font-weight: 500; font-size: 15px; }
.ru-via-tx small { font-size: 13px; color: var(--muted); line-height: 1.3; }
.ru-plaza { margin: 0 0 14px; }

/* La ficha de un reto de Wilep */
.ru-w-logo { width: 100%; height: 100%; display: grid; place-items: center; background: var(--ink); color: var(--surf); font-weight: 600; font-size: 20px; }
.ru-esp-sub { margin: 4px 0 10px; color: var(--muted); font-size: 14px; }
.ru-premio { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; margin: 0 0 14px; border-radius: var(--r-sm, 16px); background: var(--ru-oro-suave); color: #2A2213; }
.ru-premio > .trazo { width: 22px; height: 22px; flex: none; margin-top: 2px; stroke: var(--ru-oro-tinta); }
.ru-premio div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ru-premio small { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ru-oro-tinta); }
.ru-premio b { font-weight: 500; font-size: 16px; }
.ru-premio span { font-size: 13.5px; line-height: 1.35; }

/* Pasear: "Tu paseo de hoy", Destino y los dos botones */
.ru-paseo { margin-bottom: 12px; }
.ru-rutas { display: grid; gap: 8px; margin-top: 8px; }
.ru-ruta {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 14px; box-sizing: border-box; border: 1.5px solid var(--line);
  border-radius: var(--r-sm, 16px); background: var(--surf); color: var(--ink); font: inherit; text-align: left; cursor: pointer;
}
.ru-ruta span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ru-ruta b { font-weight: 500; font-size: 15px; }
.ru-ruta small { font-size: 13px; color: var(--muted); line-height: 1.3; }
.ru-ruta em { font-style: normal; font-size: 12.5px; font-weight: 500; padding: 4px 10px; border-radius: 999px; background: var(--field); white-space: nowrap; }
.ru-ruta.on { border-color: var(--acc); background: color-mix(in srgb, var(--acc) 7%, var(--surf)); }
.ru-ruta.on em { background: var(--acc); color: var(--acc-ink); }
.ru-ruta.libre > .trazo { width: 18px; height: 18px; color: var(--muted); }
.ru-dest { margin-bottom: 12px; }
.ru-dest .ru-via-tx small { font-size: 12px; }
.ru-dos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ru-destinos { display: grid; gap: 8px; }

/* Durante la salida: a dónde vas y el aviso de lo que hay cerca */
#ru-vivo:empty { display: none; }
#ru-vivo { display: grid; gap: 8px; margin-top: 10px; }
.ru-vivo-dest, .ru-aviso { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm, 16px); background: var(--field); }
.ru-vivo-dest > .trazo, .ru-aviso > .trazo { width: 20px; height: 20px; flex: none; stroke: var(--acc); }
.ru-vivo-dest span, .ru-aviso span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; font-size: 14px; font-weight: 500; }
.ru-vivo-dest small, .ru-aviso small { font-size: 12.5px; font-weight: 400; color: var(--muted); }
.ru-aviso { background: var(--ru-oro-suave); color: #2A2213; }
.ru-aviso > .trazo { stroke: var(--ru-oro-tinta); }
.ru-x { width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; flex: none; }
.ru-x .trazo { width: 16px; height: 16px; }
#ru-vivo b { font-size: 14px; font-weight: 500; letter-spacing: 0; line-height: 1.25; display: block; }   /* .pt-stats b es el número grande de la salida */
#ru-vivo small { margin-top: 0; }
.ru-ver { border: 0; border-radius: 999px; padding: 8px 16px; background: var(--ink); color: var(--surf); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; flex: none; }

/* El sorteo, simple (js/sorteo-simple.js) */
.ru-sor { display: flex; flex-direction: column; gap: 10px; }
.ru-sor-cab { display: flex; }
.ru-sor-kicker { display: inline-block; padding: 5px 12px; border-radius: 999px; background: var(--ink); color: var(--surf); font-size: 13px; font-weight: 500; }
.ru-sor-n { display: flex; align-items: baseline; gap: 6px; }
.ru-sor-n b { font-size: 44px; font-weight: 300; letter-spacing: -.03em; line-height: 1; }
.ru-sor-n span { font-size: 18px; }
.ru-sor-regla { margin: 0; font-size: 14px; color: var(--muted); }
.ru-sor-nota { margin: 0; font-size: 14px; }
.ru-sor-fila { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-sm, 16px); color: var(--ink); text-decoration: none; }
.ru-sor-fila > span:not(.ru-sor-ic) { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ru-sor-fila b { font-weight: 500; font-size: 15px; }
.ru-sor-fila small { font-size: 13px; color: var(--muted); }
.ru-sor-ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--field); flex: none; }
.ru-sor-ic .trazo { width: 19px; height: 19px; stroke: var(--acc); }
.ru-sor-premio > span:not(.ru-sor-ic) { flex: 1; }
.ru-sor-mapa { flex: none; border: 0; border-radius: 999px; padding: 8px 14px; background: var(--ink); color: var(--surf); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.ru-sor-semana { align-self: flex-start; border: 0; background: none; padding: 4px 0; color: var(--acc); font: inherit; font-size: 14px; font-weight: 500; text-decoration: underline; cursor: pointer; }
.ru-sor .pt-boton { margin-top: 4px; }
.ru-sor-enlaces { display: flex; justify-content: center; gap: 18px; font-size: 13px; }
.ru-sor-enlaces a { color: var(--muted); }
