/* Rally de Robots en la Sala — base: CONTROL REMOTO DE JUGUETE Y CARRERA. Carcasas de plástico brillante con antena y
   bolita, pantallitas LCD verdes con texto oscuro, gatillos inclinados amarillos con franja de cuadros, botones redondos
   como los del control, la palanca grande en su riel, 5 banderitas de cuadros que se levantan, el banner del arco que cruza
   la pantalla y la cuenta con semáforo. Letras: Russo One inclinada (títulos de carrera) + Exo 2 (legible y deportiva).
   Todo cuelga de html.rr. Por dentro se mide contra el marco (.app es un contenedor de tamaño: cqw/cqh), nunca contra la
   ventana. Contraste de textos ≥ 4.5:1 (tinta sobre amarillo, blanco y LCD; blanco sobre la tinta). */
.rr {
  --tinta: #14162B; --tinta-2: #3A3F66; --noche: #1C1F44; --blanco: #FFFFFF; --crema: #FFFBF0;
  --amarillo: #FFD23F; --amarillo-d: #B58A00; --rojo: #FF4F5E; --rojo-d: #B3202E; --azul: #3D8BFF; --azul-d: #1E4FB3;
  --turquesa: #2EC4B6; --morado: #7A5CFF; --verde: #5ED36A; --naranja: #FF8A3D; --rosa: #FF7BB0;
  --lcd: #D2EBC4; --lcd-2: #BEDDB0; --lcd-tinta: #0E2A12;
  --carcasa: var(--azul);
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --f-titulo: "Russo One", "Exo 2", system-ui, sans-serif;
  --f-texto: "Exo 2", system-ui, -apple-system, "Segoe UI", sans-serif;
  --cuadros: repeating-conic-gradient(var(--tinta) 0 25%, #FFFFFF 0 50%) 0 0 / 12px 12px;
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
}
.rr *, .rr *::before, .rr *::after { box-sizing: border-box; }
.rr body { margin: 0; font-family: var(--f-texto); color: var(--tinta); overflow: hidden; overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
.rr button { font: inherit; color: inherit; }
.rr :focus-visible { outline: 3px solid var(--tinta); outline-offset: 3px; box-shadow: 0 0 0 6px var(--amarillo); }
.rr .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.rr .noscript { margin: 24px; font: 700 18px/1.5 var(--f-texto); background: var(--crema); padding: 16px; border-radius: 12px; }

/* ---------- marco ---------- */
.rr .fondo { position: fixed; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(50% 40% at 50% 42%, #2C3170, rgba(44, 49, 112, 0) 72%), repeating-conic-gradient(rgba(255, 255, 255, .035) 0 25%, rgba(255, 255, 255, 0) 0 50%) 0 0 / 56px 56px, linear-gradient(180deg, #1C1F44 0%, #14162B 100%); }
.rr.is-showcase .fondo { display: none; }
.rr .app { position: fixed; inset: 0; z-index: 1; overflow: hidden; isolation: isolate; container-type: size; container-name: marco; background: #F3DEC4; transition: opacity .5s ease; }
@media (min-width: 560px) and (min-height: 560px) {
  .rr .app { inset: auto; left: 50%; top: 50%; width: min(430px, 100vw - 32px); height: min(932px, 100dvh - 40px); transform: translate(-50%, -50%); border-radius: 34px;
    box-shadow: 0 0 0 6px var(--amarillo), 0 0 0 12px var(--tinta), 0 30px 90px rgba(6, 6, 24, .6); }
}
.rr.is-showcase .app { inset: 0 !important; width: auto !important; height: auto !important; transform: none !important; border-radius: 0 !important; box-shadow: none !important; }
.rr .stage { position: absolute; inset: 0; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; outline: none; }
.rr .stage:focus-visible { box-shadow: inset 0 0 0 4px var(--amarillo), inset 0 0 0 7px var(--tinta); }
.rr .gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .7s ease; }
.rr .gl.is-on { opacity: 1; }
.rr .vineta { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(130% 90% at 50% 50%, rgba(20, 22, 43, 0) 62%, rgba(20, 22, 43, .22) 100%); }
/* líneas de velocidad (sólo opacidad por cuadro: se componen sin repintar) */
.rr .velocidad { position: absolute; inset: 0; pointer-events: none; opacity: 0; will-change: opacity;
  background: radial-gradient(ellipse 46% 40% at 50% 46%, rgba(255, 255, 255, 0) 70%, rgba(255, 255, 255, 0) 100%),
    repeating-conic-gradient(from 3deg at 50% 46%, rgba(255, 255, 255, 0) 0 7deg, rgba(255, 255, 255, .5) 7deg 7.6deg, rgba(255, 255, 255, 0) 7.6deg 13deg);
  -webkit-mask: radial-gradient(ellipse 60% 52% at 50% 46%, transparent 62%, #000 100%); mask: radial-gradient(ellipse 60% 52% at 50% 46%, transparent 62%, #000 100%); }
.rr .sin-gl .stage { background: url("../assets/poster/fondo-sala.webp") center / cover no-repeat, linear-gradient(180deg, #FFE6C4, #F3DEC4); }
.rr .ui { position: absolute; inset: 0; pointer-events: none; z-index: 20; }
.rr .ui > * { pointer-events: auto; }

/* ---------- carcasa de control remoto (tarjetas, hojas, resumen) ---------- */
.rr .carcasa { position: relative; color: var(--tinta); border-radius: 28px;
  background: radial-gradient(120% 60% at 30% 0%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 55%), linear-gradient(180deg, color-mix(in srgb, var(--carcasa) 88%, #FFFFFF), color-mix(in srgb, var(--carcasa) 80%, #000000));
  box-shadow: inset 0 0 0 3px var(--tinta), inset 0 -9px 0 rgba(20, 22, 43, .22), inset 0 3px 0 6px rgba(255, 255, 255, .25), 0 6px 0 var(--tinta), 0 16px 30px rgba(10, 10, 30, .35); }
.rr .antena { position: absolute; right: 34px; top: -46px; width: 6px; height: 54px; border-radius: 3px; background: linear-gradient(90deg, #2A2D3A, #4A4F66); box-shadow: 0 0 0 2px var(--tinta); transform: rotate(9deg); transform-origin: bottom center; pointer-events: none; z-index: -1; }
.rr .antena-bola { position: absolute; left: 50%; top: -10px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #FFFFFF 0 18%, var(--amarillo) 40%, #E0A200 100%); box-shadow: 0 0 0 2.5px var(--tinta); }
.rr .led { display: inline-block; flex: none; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #FFFFFF 0 15%, #8A90AE 45%, #4A4F6E 100%); box-shadow: 0 0 0 2px var(--tinta); }
.rr .led.is-on { background: radial-gradient(circle at 35% 30%, #FFFFFF 0 15%, #FF9AA4 40%, var(--rojo) 100%); box-shadow: 0 0 0 2px var(--tinta), 0 0 10px 2px rgba(255, 79, 94, .8); animation: rr-led 1.1s ease-in-out infinite; }
.rr .led.is-verde { background: radial-gradient(circle at 35% 30%, #FFFFFF 0 15%, #B4FFC0 40%, #23A043 100%); box-shadow: 0 0 0 2px var(--tinta), 0 0 10px 2px rgba(94, 211, 106, .9); }
@keyframes rr-led { 50% { filter: brightness(1.3); } }

/* ---------- gatillos (botón grande) y teclas ---------- */
.rr .gatillo { position: relative; display: inline-flex; padding: 0 0 7px; border: 0; border-radius: 18px; background: var(--g-base, var(--amarillo-d)); box-shadow: 0 0 0 3px var(--tinta), 0 10px 16px rgba(10, 10, 30, .3); color: var(--tinta); text-decoration: none; cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.rr .gatillo-cara { position: relative; display: flex; flex: 1; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 22px 0 30px; border-radius: 16px 16px 13px 13px; overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 48%), var(--g-cara, var(--amarillo)); box-shadow: inset 0 0 0 2.5px var(--tinta), inset 0 -4px 0 rgba(20, 22, 43, .16);
  font: italic 800 17.5px/1.1 var(--f-texto); text-align: center; transition: transform .08s ease; }
.rr .gatillo-cara::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 18px; background: var(--cuadros); background-size: 9px 9px; box-shadow: inset -2.5px 0 0 var(--tinta); }
.rr .gatillo:active .gatillo-cara { transform: translateY(6px); }
.rr .gatillo:active { box-shadow: 0 0 0 3px var(--tinta), 0 4px 8px rgba(10, 10, 30, .3); }
.rr .gatillo.is-amarillo { --g-cara: var(--amarillo); --g-base: var(--amarillo-d); }
.rr .gatillo.is-rojo { --g-cara: #FF8A94; --g-base: var(--rojo-d); }
.rr .gatillo.is-grande .gatillo-cara { min-height: 62px; font: italic 400 20px/1.1 var(--f-titulo); padding-left: 34px; }
.rr .gatillo.is-bloque { display: flex; width: 100%; }
.rr .pi { display: inline-flex; }
.rr .tecla { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 14px; border: 0; border-radius: 14px; background: #FFFFFF; color: var(--tinta); box-shadow: inset 0 0 0 2.5px var(--tinta), inset 0 -4px 0 #D6DAE6, 0 4px 0 var(--tinta); font: 800 15.5px/1.15 var(--f-texto); text-decoration: none; cursor: pointer; touch-action: manipulation; }
.rr .tecla:active { transform: translateY(3px); box-shadow: inset 0 0 0 2.5px var(--tinta), 0 1px 0 var(--tinta); }
.rr .tecla.is-azul { background: #CFE1FF; box-shadow: inset 0 0 0 2.5px var(--tinta), inset 0 -4px 0 #9DBDF5, 0 4px 0 var(--tinta); }
.rr .tecla.is-wa { background: #C9F5D6; box-shadow: inset 0 0 0 2.5px var(--tinta), inset 0 -4px 0 #95DDA9, 0 4px 0 var(--tinta); }
.rr .tecla.is-mini { min-height: 44px; padding: 0 12px; font-size: 14.5px; }
.rr .boton-redondo { width: 52px; height: 52px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; color: var(--tinta); cursor: pointer; touch-action: manipulation;
  background: radial-gradient(70% 55% at 34% 26%, #FFFFFF, rgba(255, 255, 255, 0) 70%), radial-gradient(circle, #FFFFFF 0 60%, #C9CEDC 61% 72%, #F4F6FA 73%); box-shadow: inset 0 0 0 3px var(--tinta), 0 4px 0 var(--tinta), 0 8px 12px rgba(10, 10, 30, .3); }
.rr .boton-redondo:active { transform: translateY(3px); box-shadow: inset 0 0 0 3px var(--tinta), 0 1px 0 var(--tinta); }
.rr .enlace { min-height: 44px; padding: 0 8px; border: 0; background: none; color: var(--tinta); cursor: pointer; font: 800 15.5px/1.2 var(--f-texto); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; }

/* ---------- HUD: botones redondos y las 5 banderitas ---------- */
.rr .hud { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; padding: calc(10px + var(--safe-t)) 11px 0; pointer-events: none; z-index: 8; transition: opacity .3s; }
.rr .hud > * { pointer-events: auto; }
.rr .hud.is-intro { opacity: 0; }
.rr .hud.is-portada .banderas { visibility: hidden; }
.rr .banderas { display: flex; align-items: flex-end; gap: 6px; margin: 0; padding: 6px 12px 5px; border-radius: 16px; background: linear-gradient(180deg, #2A2E5E, var(--tinta)); box-shadow: inset 0 0 0 2.5px var(--tinta), inset 0 0 0 5px #3B4185, 0 4px 0 #0B0C1C, 0 8px 14px rgba(10, 10, 30, .35); }
.rr .bd { position: relative; display: block; width: 30px; height: 40px; }
.rr .bd-asta { position: absolute; left: 6px; bottom: 12px; width: 3px; height: 26px; border-radius: 2px; background: #C9CEDC; }
.rr .bd-tela { position: absolute; left: 9px; top: 2px; width: 19px; height: 13px; border-radius: 0 3px 3px 0; background: #565C88; box-shadow: 0 0 0 1.5px #0B0C1C; transform-origin: left bottom; transform: translateY(12px) scaleY(.35); transition: transform .35s cubic-bezier(.2, 1.6, .4, 1), background .2s; }
.rr .bd-n { position: absolute; left: 0; right: 0; bottom: -1px; font: italic 400 11px/1 var(--f-titulo); color: #B9BEE0; text-align: center; }
.rr .bd.is-on .bd-tela { transform: none; background: repeating-conic-gradient(#14162B 0 25%, #FFFFFF 0 50%) 0 0 / 6.4px 6.5px; box-shadow: 0 0 0 1.5px #FFFFFF, 0 0 10px 2px rgba(255, 210, 63, .6); }
.rr .bd.is-on .bd-n { color: var(--amarillo); }
.rr .bd.is-pop .bd-tela { animation: rr-bandera .7s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes rr-bandera { 0% { transform: translateY(12px) scaleY(.35) rotate(-20deg); } 60% { transform: translateY(-3px) scale(1.35) rotate(6deg); } 100% { transform: none; } }

/* ---------- el control remoto en pantalla ---------- */
.rr .rc { position: absolute; left: 10px; right: 10px; bottom: calc(10px + var(--safe-b)); z-index: 6; transform: translateY(130%); transition: transform .45s cubic-bezier(.2, 1.3, .4, 1); }
.rr .rc.is-on { transform: none; }
.rr .rc.is-pits { transform: translateY(130%); }
.rr .rc-antena { position: absolute; right: 30px; top: -48px; width: 6px; height: 60px; border-radius: 3px; background: linear-gradient(90deg, #2A2D3A, #4A4F66); box-shadow: 0 0 0 2px var(--tinta); transform: rotate(12deg); transform-origin: bottom; }
.rr .rc-antena-bola { position: absolute; left: 50%; top: -10px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #FFFFFF 0 18%, var(--amarillo) 40%, #E0A200 100%); box-shadow: 0 0 0 2.5px var(--tinta); }
.rr .rc-cuerpo { position: relative; display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "led lcd solo" "riel riel riel"; align-items: center; gap: 8px 10px; padding: 12px 14px 14px; border-radius: 30px 30px 36px 36px;
  background: radial-gradient(120% 70% at 30% 0%, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 55%), linear-gradient(180deg, #5C9DFF, var(--azul) 45%, #2E6FE0);
  box-shadow: inset 0 0 0 3px var(--tinta), inset 0 -10px 0 rgba(20, 22, 43, .22), 0 6px 0 var(--tinta), 0 14px 26px rgba(10, 10, 30, .35); }
.rr .rc-led { grid-area: led; width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #FFFFFF 0 15%, #B4FFC0 40%, #23A043 100%); box-shadow: 0 0 0 2px var(--tinta), 0 0 10px 2px rgba(94, 211, 106, .9); }
.rr .rc-lcd { grid-area: lcd; display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 5px 10px 6px; border-radius: 10px; background: repeating-linear-gradient(0deg, var(--lcd) 0 2px, var(--lcd-2) 2px 3px); box-shadow: inset 0 0 0 2.5px var(--tinta), inset 0 3px 6px rgba(0, 0, 0, .18); color: var(--lcd-tinta); }
.rr .rc-tramo { font: italic 800 13.5px/1.1 var(--f-texto); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rr .rc-vel { display: flex; align-items: center; gap: 8px; }
.rr .rc-barras { display: flex; align-items: flex-end; gap: 3px; height: 14px; }
.rr .rc-barras i { display: block; width: 7px; border-radius: 1px; background: rgba(14, 42, 18, .18); }
.rr .rc-barras i:nth-child(1) { height: 4px; } .rr .rc-barras i:nth-child(2) { height: 5px; } .rr .rc-barras i:nth-child(3) { height: 6.5px; } .rr .rc-barras i:nth-child(4) { height: 8px; }
.rr .rc-barras i:nth-child(5) { height: 9.5px; } .rr .rc-barras i:nth-child(6) { height: 11px; } .rr .rc-barras i:nth-child(7) { height: 12.5px; } .rr .rc-barras i:nth-child(8) { height: 14px; }
.rr .rc-barras i.is-on { background: var(--lcd-tinta); }
.rr .rc-turbo { padding: 1px 5px; border-radius: 4px; font: italic 400 11px/1.2 var(--f-titulo); color: rgba(14, 42, 18, .3); box-shadow: inset 0 0 0 1.5px rgba(14, 42, 18, .25); }
.rr .rc-turbo.is-on { color: var(--lcd); background: var(--lcd-tinta); box-shadow: none; }
.rr .rc-solo { grid-area: solo; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 64px; min-height: 48px; padding: 0; border: 0; background: none; cursor: pointer; touch-action: manipulation; }
.rr .rc-solo-boton { width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #FFB3BA 0 15%, var(--rojo) 55%, var(--rojo-d) 100%); box-shadow: inset 0 0 0 2.5px var(--tinta), 0 3px 0 var(--tinta); }
.rr .rc-solo-t { font: italic 800 12px/1.05 var(--f-texto); color: #FFFFFF; text-shadow: 0 1px 0 var(--tinta), 0 0 3px var(--tinta); white-space: nowrap; }
.rr .rc-solo[aria-pressed="true"] .rc-solo-boton { transform: translateY(2px); background: radial-gradient(circle at 35% 30%, #FFFFFF 0 15%, #B4FFC0 40%, #23A043 100%); box-shadow: inset 0 0 0 2.5px var(--tinta), 0 1px 0 var(--tinta), 0 0 12px 3px rgba(94, 211, 106, .9); }
.rr .rc-riel { grid-area: riel; position: relative; display: flex; align-items: center; justify-content: space-between; height: 68px; padding: 0 8px; border-radius: 34px; background: linear-gradient(180deg, #1D2148, #2A2F66); box-shadow: inset 0 0 0 3px var(--tinta), inset 0 6px 10px rgba(0, 0, 0, .45); touch-action: none; cursor: grab; outline: none; }
.rr .rc-riel:focus-visible { box-shadow: inset 0 0 0 3px var(--tinta), 0 0 0 4px var(--amarillo); }
.rr .rc-ranura { position: absolute; left: 50px; right: 50px; top: 50%; height: 10px; margin-top: -5px; border-radius: 5px; background: #0B0C1C; box-shadow: inset 0 2px 3px rgba(0, 0, 0, .6); }
.rr .rc-ranura::before { content: ""; position: absolute; left: 50%; top: -6px; bottom: -6px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: rgba(255, 255, 255, .35); }
.rr .rc-flecha { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; color: var(--tinta); background: var(--amarillo); box-shadow: inset 0 0 0 2.5px var(--tinta); }
.rr .rc-perilla { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; z-index: 2; will-change: transform;
  background: radial-gradient(circle at 34% 28%, #FFB3BA 0 14%, var(--rojo) 50%, var(--rojo-d) 100%); box-shadow: inset 0 0 0 3px var(--tinta), 0 5px 0 var(--tinta), 0 8px 14px rgba(0, 0, 0, .45); }
.rr .rc-perilla-tapa { position: absolute; inset: 14px; border-radius: 50%; background: repeating-conic-gradient(rgba(20, 22, 43, .35) 0 6deg, rgba(20, 22, 43, 0) 6deg 18deg), radial-gradient(circle, #FF7A85, #E23B4A); box-shadow: inset 0 0 0 2px rgba(20, 22, 43, .6); }
.rr .rc.is-tocando .rc-perilla { box-shadow: inset 0 0 0 3px var(--tinta), 0 2px 0 var(--tinta), 0 0 0 6px rgba(255, 210, 63, .7); }
.rr .rc.is-solo .rc-riel { cursor: default; }
/* el dedo que enseña: va y viene sobre la palanca */
.rr .rc-dedo { position: absolute; left: 50%; bottom: 6px; width: 60px; height: 60px; margin-left: -18px; opacity: 0; pointer-events: none; z-index: 3; filter: drop-shadow(0 3px 4px rgba(10, 10, 30, .4)); }
.rr .rc-dedo.is-on { animation: rr-dedo 2s cubic-bezier(.5, 0, .3, 1) infinite; }
.rr .rc-dedo[data-dir="1"].is-on { animation-name: rr-dedo-der; }
.rr .rc-dedo[data-dir="-1"].is-on { animation-name: rr-dedo-izq; }
@keyframes rr-dedo { 0% { opacity: 0; transform: translateX(0) scale(1.1); } 10% { opacity: 1; transform: translateX(0) scale(.95); } 35% { transform: translateX(-80px) scale(.95); } 65% { transform: translateX(80px) scale(.95); } 85% { opacity: 1; transform: translateX(0) scale(.95); } 100% { opacity: 0; transform: translateX(0) scale(1.05); } }
@keyframes rr-dedo-der { 0% { opacity: 0; transform: translateX(0) scale(1.1); } 12% { opacity: 1; transform: translateX(0) scale(.95); } 55% { opacity: 1; transform: translateX(90px) scale(.95); } 80%, 100% { opacity: 0; transform: translateX(90px) scale(1.05); } }
@keyframes rr-dedo-izq { 0% { opacity: 0; transform: translateX(0) scale(1.1); } 12% { opacity: 1; transform: translateX(0) scale(.95); } 55% { opacity: 1; transform: translateX(-90px) scale(.95); } 80%, 100% { opacity: 0; transform: translateX(-90px) scale(1.05); } }

/* ---------- la nota de instrucciones ---------- */
.rr .nota { position: absolute; left: 50%; top: calc(76px + var(--safe-t)); display: flex; align-items: center; gap: 8px; max-width: calc(100% - 28px); margin: 0; padding: 9px 16px; border-radius: 14px; background: var(--amarillo); color: var(--tinta); font: italic 800 clamp(15.5px, 4.4cqw, 18px)/1.15 var(--f-texto); text-align: center;
  box-shadow: inset 0 0 0 2.5px var(--tinta), 0 4px 0 var(--tinta), 0 8px 12px rgba(10, 10, 30, .25); transform: translate(-50%, 10px); opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none !important; }
.rr .nota.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- banner del arco, letreritos y cuenta ---------- */
.rr .banner { position: absolute; left: 0; right: 0; top: 24cqh; display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 0; pointer-events: none !important; transform: translateX(120cqw) skewX(-10deg); }
.rr .banner.is-on { animation: rr-banner 1.6s cubic-bezier(.3, 1.1, .4, 1) both; }
.rr .banner-k { padding: 3px 12px; border-radius: 8px; font: italic 400 13px/1.2 var(--f-titulo); color: var(--tinta); background: var(--c, var(--amarillo)); box-shadow: 0 0 0 2.5px var(--tinta); }
.rr .banner-t { position: relative; padding: 8px 22px 9px 34px; border-radius: 12px; font: italic 400 clamp(21px, 6.4cqw, 27px)/1.1 var(--f-titulo); color: #FFFFFF; background: var(--tinta); box-shadow: 0 0 0 3px #FFFFFF, 0 8px 18px rgba(10, 10, 30, .35); overflow: hidden; }
.rr .banner-t::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 22px; background: var(--cuadros); background-size: 11px 11px; }
@keyframes rr-banner { 0% { transform: translateX(120cqw) skewX(-10deg); } 20%, 75% { transform: translateX(0) skewX(-10deg); } 100% { transform: translateX(-120cqw) skewX(-10deg); } }
.rr .pop { position: absolute; left: var(--x); top: var(--y); margin: 0; pointer-events: none !important; transform: translate(-50%, -50%); }
.rr .pop span { display: block; font: italic 400 30px/1 var(--f-titulo); color: var(--c, #FFFFFF); -webkit-text-stroke: 6px var(--tinta); paint-order: stroke fill; opacity: 0; }
.rr .pop.is-on span { animation: rr-pop .95s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes rr-pop { 0% { transform: scale(.3) rotate(-10deg); opacity: 0; } 30% { transform: scale(1.18) rotate(-5deg) translateY(-6px); opacity: 1; } 70% { transform: scale(1) rotate(-4deg) translateY(-16px); opacity: 1; } 100% { transform: scale(.95) rotate(-4deg) translateY(-28px); opacity: 0; } }
.rr .cuenta { position: absolute; left: 50%; top: 30cqh; display: flex; flex-direction: column; align-items: center; gap: 10px; transform: translate(-50%, -50%); opacity: 0; transition: opacity .2s; pointer-events: none !important; }
.rr .cuenta.is-on { opacity: 1; }
.rr .cuenta-luces { display: flex; gap: 10px; padding: 10px 14px; border-radius: 20px; background: linear-gradient(180deg, #2A2E5E, var(--tinta)); box-shadow: inset 0 0 0 3px #0B0C1C, 0 0 0 3px #FFFFFF, 0 8px 18px rgba(10, 10, 30, .4); }
.rr .cuenta-luces i { display: block; width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #6A6F8F 0 15%, #3A2C34 60%, #251C22 100%); box-shadow: inset 0 0 0 2.5px #0B0C1C; }
.rr .cuenta-luces i.is-on { background: radial-gradient(circle at 35% 30%, #FFFFFF 0 15%, #FF8A94 40%, #E8202F 100%); box-shadow: inset 0 0 0 2.5px #0B0C1C, 0 0 18px 5px rgba(255, 60, 70, .8); }
.rr .cuenta-luces i.is-verde { background: radial-gradient(circle at 35% 30%, #FFFFFF 0 15%, #A8FFB6 40%, #18B23A 100%); box-shadow: inset 0 0 0 2.5px #0B0C1C, 0 0 18px 5px rgba(60, 230, 100, .85); }
.rr .cuenta-n { font: italic 400 clamp(64px, 22cqw, 96px)/1 var(--f-titulo); color: #FFFFFF; -webkit-text-stroke: 9px var(--tinta); paint-order: stroke fill; }
.rr .cuenta.is-ya .cuenta-n { font-size: clamp(40px, 12cqw, 56px); color: var(--amarillo); }
.rr .cuenta-n.is-pum { animation: rr-pum .5s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes rr-pum { 0% { transform: scale(2.2); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

/* ---------- portada: cartel de carrera ---------- */
.rr .portada { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 16px; padding: calc(74px + var(--safe-t)) 16px calc(16px + var(--safe-b)); transition: opacity .3s, transform .3s; pointer-events: none !important; }
.rr .portada.is-out { opacity: 0; transform: translateY(-14px); }
.rr .cartel-carrera { position: relative; padding: 30px 20px 18px; border-radius: 22px; background: linear-gradient(180deg, #FFFFFF, var(--crema)); box-shadow: inset 0 0 0 3px var(--tinta), 0 6px 0 var(--tinta), 0 16px 28px rgba(10, 10, 30, .35); overflow: hidden; pointer-events: auto; transform: rotate(-1.2deg); animation: rr-cartel-entra .6s cubic-bezier(.2, 1.3, .4, 1) both; }
.rr .cartel-carrera .cuadros { position: absolute; left: 0; right: 0; top: 0; height: 16px; background: var(--cuadros); background-size: 16px 16px; box-shadow: inset 0 -2.5px 0 var(--tinta); }
@keyframes rr-cartel-entra { 0% { opacity: 0; transform: translateY(-30px) rotate(-5deg); } 100% { opacity: 1; transform: rotate(-1.2deg); } }
.rr .portada-k { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font: italic 800 13.5px/1.2 var(--f-texto); color: var(--tinta-2); letter-spacing: .02em; text-transform: uppercase; }
.rr .portada-t { margin: 0 0 8px; font: italic 400 clamp(25px, 7.4cqw, 31px)/1.05 var(--f-titulo); color: var(--tinta); }
.rr .portada-sub { margin: 0; font: 700 16.5px/1.32 var(--f-texto); }
.rr .portada-acciones { display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: auto; animation: rr-sube .5s .15s ease-out both; }
@keyframes rr-sube { 0% { opacity: 0; transform: translateY(16px); } 100% { opacity: 1; transform: none; } }
.rr .portada-extras { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.rr .portada-extras .enlace, .rr .saltar-intro, .rr .saltar { padding: 4px 14px; border-radius: 22px; background: rgba(255, 251, 240, .95); box-shadow: 0 0 0 2.5px var(--tinta); text-decoration-thickness: 1.5px; }
.rr .is-empezar { min-width: 260px; touch-action: none; }
.rr .is-empezar .gatillo-cara { min-height: 68px; font-size: 24px; }
.rr .saltar-intro { position: absolute; left: 50%; bottom: calc(14px + var(--safe-b)); transform: translateX(-50%); white-space: nowrap; }
.rr .saltar { position: absolute; right: 12px; bottom: calc(12px + var(--safe-b)); }

/* ---------- la tarjeta de cada arco: pantalla de control remoto ---------- */
.rr .tarjeta { position: absolute; left: 12px; right: 12px; bottom: calc(14px + var(--safe-b)); max-height: calc(100cqh - 200px); display: flex; flex-direction: column; padding: 18px 16px 16px; transform: translateY(40px) scale(.96); opacity: 0; transition: transform .38s cubic-bezier(.2, 1.3, .4, 1), opacity .25s; }
.rr .tarjeta.is-in { transform: none; opacity: 1; }
.rr .tarjeta.is-out { transform: translateY(46px); opacity: 0; }
.rr .tj-k { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; padding: 0 4px; font: italic 800 13px/1.25 var(--f-texto); color: var(--tinta); text-transform: uppercase; letter-spacing: .02em; }
.rr .tj-k span:last-child { padding: 2px 9px; border-radius: 8px; background: rgba(255, 255, 255, .88); box-shadow: 0 0 0 2px var(--tinta); }
.rr .tj-t { margin: 0 0 10px; padding: 0 4px; font: italic 400 clamp(23px, 6.8cqw, 28px)/1.06 var(--f-titulo); color: var(--tinta); text-shadow: 0 2px 0 rgba(255, 255, 255, .55); }
.rr .tj-t:focus, .rr .tj-t:focus-visible { outline: none; box-shadow: none; }
.rr .tj-cuerpo { display: flex; flex-direction: column; gap: 10px; min-height: 0; margin-bottom: 14px; padding: 12px; overflow: auto; border-radius: 18px; background: var(--crema); box-shadow: inset 0 0 0 2.5px var(--tinta), inset 0 4px 0 rgba(20, 22, 43, .08); font: 700 16.5px/1.3 var(--f-texto); }
.rr .tj-cuerpo p { margin: 0; }
.rr .tj-seguir { touch-action: none; flex: none; }
.rr .tj-avance { position: absolute !important; left: 22px; right: 14px; bottom: 6px; height: 4px; border-radius: 2px; background: rgba(20, 22, 43, .4); transform-origin: left; transform: scaleX(0); }
.rr .tarjeta.is-auto .tj-avance { animation: rr-av var(--auto, 11s) linear both; }
@keyframes rr-av { 0% { transform: scaleX(0); } 100% { transform: scaleX(1); } }
.rr.rm .tj-avance { display: none; }

/* pantallita LCD del dato */
.rr .lcd { padding: 9px 12px 11px; text-align: center; border-radius: 12px; background: repeating-linear-gradient(0deg, var(--lcd) 0 2px, var(--lcd-2) 2px 3px); color: var(--lcd-tinta); box-shadow: inset 0 0 0 3px var(--tinta), inset 0 4px 8px rgba(0, 0, 0, .15); }
.rr .lcd-k { margin: 0; font: italic 800 14px/1.2 var(--f-texto); text-transform: uppercase; letter-spacing: .05em; }
.rr .lcd-v { margin: 2px 0; font: italic 400 clamp(27px, 8cqw, 34px)/1.05 var(--f-titulo); }
.rr .lcd-s { margin: 0; font: 800 15px/1.2 var(--f-texto); }
.rr .cuenta-dias { display: flex; align-items: center; justify-content: center; gap: 6px; align-self: center; margin: 0; padding: 3px 14px; border-radius: 10px; font: italic 800 16px/1.2 var(--f-texto); color: var(--tinta); background: var(--amarillo); box-shadow: 0 0 0 2.5px var(--tinta); }
.rr .acciones { display: flex; flex-wrap: wrap; gap: 10px 8px; }
.rr .acciones > * { flex: 1 1 140px; }
.rr .vueltas { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.rr .vueltas li { display: grid; grid-template-columns: 26px 72px 1fr; gap: 8px; align-items: center; padding: 4px 0; border-bottom: 2px dashed rgba(20, 22, 43, .25); }
.rr .vu-n { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 6px; font: italic 400 13px/1 var(--f-titulo); color: #FFFFFF; background: var(--tinta); }
.rr .vu-hora { font-weight: 800; color: var(--tinta-2); }
.rr .mapa { line-height: 0; border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 2.5px var(--tinta); }
.rr .mapa svg { width: 100%; height: auto; display: block; }
.rr .lugar-nombre { margin: 0; font: italic 400 20px/1.15 var(--f-titulo); }
.rr .lugar-dir { margin: 0; font: 700 15px/1.25 var(--f-texto); }
.rr .mensaje { margin: 0; padding: 6px 14px; border-left: 6px solid var(--carcasa); border-radius: 4px; background: rgba(255, 255, 255, .7); }
.rr .mensaje p { font: italic 800 20px/1.22 var(--f-texto); }
.rr .mensaje footer { margin-top: 4px; font: 800 16px/1.2 var(--f-texto); color: var(--tinta-2); }
.rr .anfitriones { font: italic 400 26px/1.15 var(--f-titulo); text-align: center; }
.rr .invita-nota { text-align: center; }

/* ---------- final ---------- */
.rr .cumple { position: absolute; left: 0; right: 0; top: calc(76px + var(--safe-t)); display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 12px; pointer-events: none !important; animation: rr-cumple .7s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes rr-cumple { 0% { opacity: 0; transform: translateY(-30px) scale(.8); } 100% { opacity: 1; transform: none; } }
.rr .cumple-t { position: relative; margin: 0; padding: 8px 46px 10px; border-radius: 14px; font: italic 400 clamp(26px, 8cqw, 34px)/1.06 var(--f-titulo); color: var(--tinta); background: var(--amarillo);
  box-shadow: inset 0 0 0 3px var(--tinta), 0 5px 0 var(--tinta), 0 12px 22px rgba(10, 10, 30, .4); overflow: hidden; }
.rr .cumple-t::before, .rr .cumple-t::after { content: ""; position: absolute; top: 0; bottom: 0; width: 30px; background: var(--cuadros); background-size: 10px 10px; }
.rr .cumple-t::before { left: 0; box-shadow: inset -2.5px 0 0 var(--tinta); }
.rr .cumple-t::after { right: 0; box-shadow: inset 2.5px 0 0 var(--tinta); }
.rr .cumple-k { margin: 0 0 6px; padding: 3px 12px; font: italic 800 13px/1.2 var(--f-texto); color: #FFFFFF; background: var(--tinta); border-radius: 8px; letter-spacing: .02em; text-transform: uppercase; }
.rr .cumple-s { margin: 8px 0 0; padding: 3px 12px; font: italic 800 16px/1.2 var(--f-texto); color: var(--tinta); background: #FFFFFF; border-radius: 8px; box-shadow: 0 0 0 2.5px var(--tinta); }
.rr .cumple.is-arriba { top: calc(72px + var(--safe-t)); }
.rr .cumple.is-arriba .cumple-s, .rr .cumple.is-arriba .cumple-k { display: none; }
.rr .cumple.is-arriba .cumple-t { padding: 6px 40px 8px; font-size: clamp(22px, 6.6cqw, 28px); }
.rr .fin { --carcasa: var(--turquesa); position: absolute; left: 12px; right: 12px; bottom: calc(12px + var(--safe-b)); max-height: 50cqh; overflow: auto; padding: 18px 16px 10px; animation: rr-sube .5s ease-out both; }
.rr .fin .antena { display: none; }
.rr .fin-linea { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; padding: 6px 10px; border-radius: 10px; background: var(--crema); box-shadow: inset 0 0 0 2.5px var(--tinta); font: italic 800 16px/1.2 var(--f-texto); }
.rr .fin-rsvp { margin-bottom: 12px; }
.rr .fin-lugar { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; padding: 10px; border-radius: 14px; background: var(--crema); box-shadow: inset 0 0 0 2.5px var(--tinta); }
.rr .fin-lugar .mapa svg { max-height: 86px; }
.rr .fin-lugar .lugar-nombre { font-size: 18px; }
.rr .fin-lugar .lugar-dir { font-size: 14px; }
.rr .fin-enlaces { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 10px; margin-top: 6px; }
.rr .fin-enlaces .enlace { color: var(--tinta); }
.rr .destello { position: absolute; inset: 0; z-index: 5; background: #FFFFFF; pointer-events: none; animation: rr-fl .75s ease-out both; }
@keyframes rr-fl { 0% { opacity: .8; } 100% { opacity: 0; } }
.rr.rm .destello { display: none; }

.rr .vitrina-t { position: absolute; left: 0; right: 0; top: 4cqh; margin: 0; text-align: center; font: italic 400 clamp(30px, 6cqw, 56px)/1.05 var(--f-titulo); color: #FFFFFF; -webkit-text-stroke: 7px var(--tinta); paint-order: stroke fill; }
.rr .vitrina-t small { display: block; margin-top: 4px; font-size: .55em; }
.rr .dbg-fps { position: absolute; left: 8px; top: 64px; margin: 0; padding: 2px 6px; background: rgba(0, 0, 0, .65); color: #fff; font: 700 11px/1.3 monospace; z-index: 50; pointer-events: none !important; }
@media (prefers-reduced-motion: reduce) { .rr .rc-dedo.is-on { animation-duration: 3s; } .rr .cartel-carrera, .rr .portada-acciones, .rr .cumple, .rr .fin, .rr .led.is-on, .rr .bd.is-pop .bd-tela { animation-duration: .01s; } }
.rr.rm .led.is-on, .rr.rm .bd.is-pop .bd-tela { animation-duration: .01s; }
/* (con menos movimiento, el banner, los letreritos y la cuenta aparecen quietos y se van) */
.rr.rm .pop.is-on span, .rr.rm .banner.is-on, .rr.rm .cuenta-n.is-pum { animation: none; opacity: 1; transform: none; }
.rr.rm .banner.is-on { transform: skewX(-10deg); }
.rr.rm .velocidad { display: none; }
