/* RemateHoy Academia: estilos (celular primero) */
:root {
  --naranja: #EA6B21;          /* naranja oficial del logo */
  --naranja-hover: #F27A33;
  --morado: #312762;           /* morado oscuro de la marca */
  --morado-claro: #3E3278;
  --fondo: #15102F;
  --fondo-2: #1E1744;
  --texto: #FFFFFF;
  --texto-2: #E2DDF4;          /* secundario, siempre con buen contraste */
  --sobre-naranja: #15102F;    /* texto sobre botones naranjas */
  --borde: #5A4D9A;
  --bueno: #4ADE80;
  --bueno-fondo: #10372A;
  --malo: #FF8A8A;
  --malo-fondo: #4A1424;
  --neutro: #FFD166;
  --neutro-fondo: #3D3214;
  --radio: 16px;
  --sombra: 0 10px 30px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  color: var(--texto);
  background-color: var(--fondo);
  background-image: radial-gradient(120% 60% at 50% 0%, #2A2160 0%, var(--fondo) 70%);
  background-attachment: fixed;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; display: block; }
a { color: var(--naranja); font-weight: 600; }
strong { font-weight: 800; }
p { margin: 0 0 .75em; }
p:last-child { margin-bottom: 0; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 1.85rem; font-weight: 800; }
h2 { font-size: 1.35rem; font-weight: 800; }
h3 { font-size: 1.1rem; font-weight: 700; }
.oculto-visual {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Estructura */
.contenedor { width: 100%; max-width: 520px; margin: 0 auto; padding: 0 16px; }
main { flex: 1; padding-bottom: 24px; }

.encabezado { padding: 12px 0; }
.encabezado .contenedor { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.marca { display: flex; align-items: center; gap: 10px; color: var(--texto); text-decoration: none; min-height: 44px; }
.marca img { width: 38px; height: 38px; border-radius: 50%; }
.marca span { font-weight: 800; font-size: 1.05rem; line-height: 1.1; }
.marca em { font-style: normal; color: var(--naranja); }
.marca small { display: block; font-weight: 600; font-size: .78rem; color: var(--texto-2); letter-spacing: .04em; text-transform: uppercase; }
.volver {
  color: var(--texto); text-decoration: none; font-weight: 700; font-size: .95rem;
  min-height: 44px; display: inline-flex; align-items: center; padding: 0 4px;
}

.pie { padding: 20px 0 28px; border-top: 1px solid rgba(255,255,255,.12); margin-top: 8px; }
.pie p { font-size: .88rem; color: var(--texto-2); text-align: center; margin-bottom: .4em; }
.pie .eslogan { color: var(--texto); font-weight: 700; }

/* Botones */
.boton {
  position: relative;
  display: flex; align-items: center; justify-content: center; text-align: center;
  width: 100%; min-height: 54px; padding: 12px 18px;
  border: 0; border-radius: 14px; cursor: pointer;
  font: inherit; font-weight: 800; font-size: 1.05rem; line-height: 1.25;
  text-decoration: none;
  background: var(--naranja); color: var(--sobre-naranja);
  box-shadow: 0 6px 0 #A9480F;
  transition: transform .08s ease, box-shadow .08s ease, background .15s;
  -webkit-tap-highlight-color: transparent;
}
.boton:hover { background: var(--naranja-hover); }
.boton:active { transform: translateY(4px); box-shadow: 0 2px 0 #A9480F; }
.boton.secundario {
  background: transparent; color: var(--texto); box-shadow: none;
  border: 2px solid var(--borde);
}
.boton.secundario:hover { background: rgba(255,255,255,.06); }
.boton.secundario:active { transform: translateY(1px); }
.boton:focus-visible, .opcion:focus-visible, .ley-opcion:focus-within, .campo input:focus-visible, a:focus-visible {
  outline: 3px solid #FFFFFF; outline-offset: 3px;
}
.botones { display: grid; gap: 14px; margin-top: 18px; }
.fila-botones { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Tarjetas */
.tarjeta {
  background: var(--morado); border: 1px solid var(--borde);
  border-radius: var(--radio); padding: 18px; box-shadow: var(--sombra);
}
.tarjeta + .tarjeta { margin-top: 16px; }
.etiqueta {
  display: inline-block; font-size: .8rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  background: var(--fondo); color: var(--texto); border: 1px solid var(--borde);
  border-radius: 999px; padding: 4px 10px;
}

/* Profe Martillo */
.profe { position: relative; display: flex; justify-content: center; margin: 4px auto 0; }
.profe img { height: 190px; width: auto; filter: drop-shadow(0 12px 18px rgba(0,0,0,.45)); }
.profe.chico img { height: 120px; }
.profe::after {
  content: ""; position: absolute; bottom: -6px; left: 50%; width: 70%; height: 18px;
  transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(closest-side, rgba(234,107,33,.45), transparent);
  z-index: -1;
}
.bocadillo {
  position: relative; background: #FFFFFF; color: #1A1438;
  border-radius: 18px; padding: 16px 18px; margin-top: 14px; box-shadow: var(--sombra);
  font-size: 1.05rem;
}
.bocadillo::before {
  content: ""; position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  border: 10px solid transparent; border-top: 0; border-bottom-color: #FFFFFF;
}
.bocadillo strong { color: #1A1438; }
.bocadillo .quien { display: block; font-size: .8rem; font-weight: 800; color: #6B2C07; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }

/* Animaciones hechas con código */
.anim-aparecer { animation: aparecer .45s ease-out both; }
.anim-saludo img { animation: saludo 1.2s ease-in-out .2s 2; transform-origin: 50% 90%; }
.anim-temblar img { animation: temblar .5s ease-in-out .15s 2; }
.anim-mazo img { animation: mazo .7s cubic-bezier(.3,1.6,.5,1) .1s 2; transform-origin: 50% 100%; }
.anim-latido img { animation: latido 1.6s ease-in-out infinite; }
@keyframes aparecer { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes saludo { 0%,100% { transform: rotate(0); } 30% { transform: rotate(-4deg); } 60% { transform: rotate(3deg); } }
@keyframes temblar { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
@keyframes mazo { 0% { transform: scale(.9) translateY(10px); } 60% { transform: scale(1.06) translateY(-6px); } 100% { transform: none; } }
@keyframes latido { 0%,100% { transform: scale(1); } 50% { transform: scale(1.03); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Inicio */
.portada { text-align: center; padding-top: 8px; }
.portada h1 { margin-top: 14px; }
.portada h1 em { font-style: normal; color: var(--naranja); }
.portada .bajada { color: var(--texto-2); font-size: 1.05rem; }
.mapa { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mapa li {
  display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center;
  background: var(--fondo-2); border: 1px solid var(--borde); border-radius: 14px; padding: 12px 14px;
}
.mapa .icono {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  font-size: 1.25rem; background: var(--fondo); border: 2px solid var(--borde);
}
.mapa .abierto { border-color: var(--naranja); background: #2B1F55; }
.mapa .abierto .icono { background: var(--naranja); border-color: var(--naranja); color: var(--sobre-naranja); font-weight: 800; }
.mapa strong { display: block; }
.mapa span { color: var(--texto-2); font-size: .92rem; }
.seccion { margin-top: 28px; }
.seccion > h2 { margin-bottom: 12px; }

/* Reto */
.barra-reto { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 4px 0 6px; flex-wrap: wrap; }
.presupuesto { font-weight: 800; font-size: .95rem; background: var(--fondo-2); border: 1px solid var(--borde); border-radius: 999px; padding: 6px 12px; }
.titulo-escena { font-size: 1.2rem; text-align: center; margin: 10px 0 0; color: var(--texto); }
.titulo-escena:focus, .titulo-escena:focus-visible { outline: none; } /* sin el rectángulo azul al cambiar de pantalla */
.aviso-remate { margin-top: 16px; }
.aviso-remate h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.aviso-remate ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.aviso-remate li { display: grid; grid-template-columns: 28px 1fr; gap: 6px; align-items: start; }
.aviso-remate li b { font-weight: 800; }
.aviso-remate .sub { display: block; color: var(--texto-2); font-size: .9rem; }
.presupuesto-grande {
  margin-top: 16px; text-align: center; font-size: 1.15rem; font-weight: 800;
  background: var(--fondo-2); border: 2px dashed var(--naranja); border-radius: var(--radio); padding: 14px;
}
.presupuesto-grande b { display: block; font-size: 1.8rem; color: var(--naranja); }
.pregunta { font-weight: 800; margin: 18px 0 10px; }
.opciones { display: grid; gap: 12px; margin-top: 16px; }
.opcion {
  display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: center; text-align: left;
  width: 100%; min-height: 58px; padding: 12px 14px;
  font: inherit; font-size: 1rem; font-weight: 600; color: var(--texto);
  background: var(--fondo-2); border: 2px solid var(--borde); border-radius: 14px; cursor: pointer;
  transition: border-color .15s, background .15s, transform .08s;
  -webkit-tap-highlight-color: transparent;
}
.opcion:hover { border-color: var(--naranja); }
.opcion:active { transform: scale(.98); }
.opcion .letra {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; background: var(--morado-claro); color: var(--texto);
}
.opcion.elegida { border-color: var(--naranja); background: #3A2A66; }
.opcion.elegida .letra { background: var(--naranja); color: var(--sobre-naranja); }
.opcion[disabled] { cursor: default; }
.opcion[disabled]:not(.elegida) { opacity: .55; }
.opcion.rechazada { border-color: var(--malo); animation: temblar .4s ease-in-out; }
.opciones.montos .opcion { font-size: 1.2rem; font-weight: 800; }

.alerta {
  display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center;
  margin-top: 14px; padding: 12px 14px; border-radius: 14px;
  background: var(--malo-fondo); border: 2px solid var(--malo); font-weight: 700;
}
.alerta img { width: 56px; height: 56px; object-fit: cover; object-position: 50% 15%; border-radius: 50%; background: var(--morado); }
.alerta.amable { background: var(--fondo-2); border-color: var(--naranja); }

.reloj { margin-top: 16px; }
.reloj .cifras { display: flex; justify-content: space-between; font-weight: 800; margin-bottom: 6px; }
.reloj .cifras b { font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.reloj .pista { height: 12px; border-radius: 999px; background: var(--fondo-2); border: 1px solid var(--borde); overflow: hidden; }
.reloj .avance { height: 100%; width: 100%; background: var(--naranja); transform-origin: left; }
.reloj.urgente .avance { background: var(--malo); }
.reloj.urgente .cifras b { color: var(--malo); }

.puntos { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.puntos i { width: 10px; height: 10px; border-radius: 50%; background: var(--texto-2); animation: punto 1s infinite ease-in-out; }
.puntos i:nth-child(2) { animation-delay: .15s; }
.puntos i:nth-child(3) { animation-delay: .3s; }
@keyframes punto { 0%,100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-4px); } }

/* Resultado */
.resultado { margin-top: 18px; text-align: center; border-radius: var(--radio); padding: 18px; border: 2px solid; }
.resultado.malo { background: var(--malo-fondo); border-color: var(--malo); }
.resultado.bueno { background: var(--bueno-fondo); border-color: var(--bueno); }
.resultado.neutro { background: var(--neutro-fondo); border-color: var(--neutro); }
.resultado .etiqueta-resultado { font-size: .85rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.resultado .titulo { font-size: 1.2rem; font-weight: 800; margin: 6px 0 10px; }
.resultado .puntaje { font-size: 3rem; font-weight: 900; line-height: 1; }
.resultado .puntaje small { font-size: 1.2rem; font-weight: 800; }
.resultado .nota { margin-top: 10px; font-weight: 800; }
.cierre { margin-top: 16px; }

.tarjeta-compartir {
  margin-top: 18px; border-radius: var(--radio); padding: 18px; text-align: center;
  background: linear-gradient(135deg, var(--morado) 0%, #1A1340 100%); border: 2px solid var(--naranja);
}
.tarjeta-compartir .fila { display: grid; grid-template-columns: 84px 1fr; gap: 12px; align-items: center; text-align: left; }
.tarjeta-compartir img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; object-position: 50% 12%; background: var(--fondo); border: 2px solid var(--naranja); }
.tarjeta-compartir .frase { font-weight: 700; }
.tarjeta-compartir .frase b { color: var(--naranja); font-size: 1.4rem; }
.tarjeta-compartir .firma { margin-top: 12px; font-size: .85rem; color: var(--texto-2); }
.mensaje-copiado { text-align: center; font-weight: 700; color: var(--bueno); min-height: 1.5em; margin-top: 8px; }

/* Calculadora */
.campo { margin-top: 16px; }
.campo > label, .campo legend { display: block; font-weight: 800; margin-bottom: 8px; padding: 0; }
.campo .ayuda { color: var(--texto-2); font-size: .92rem; margin-top: 6px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.campo select, .campo input {
  width: 100%; min-height: 54px; padding: 12px 14px; font: inherit; font-size: 1.15rem; font-weight: 700;
  color: var(--texto); background: var(--fondo); border: 2px solid var(--borde); border-radius: 12px;
}
.campo select { appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #fff 50%), linear-gradient(135deg, #fff 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.campo input:focus, .campo select:focus { border-color: var(--naranja); outline: none; }
.campo-dinero { position: relative; }
.campo-dinero span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-weight: 800; font-size: 1.15rem; color: var(--texto-2); }
.campo-dinero input { padding-left: 52px; }
.error { color: var(--malo); font-weight: 700; margin-top: 8px; }
.leyes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ley-opcion { position: relative; }
.ley-opcion input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.ley-opcion label {
  display: block; text-align: center; padding: 12px 8px; min-height: 72px; border-radius: 12px; cursor: pointer;
  background: var(--fondo); border: 2px solid var(--borde); font-weight: 800;
}
.ley-opcion label small { display: block; font-weight: 600; color: var(--texto-2); font-size: .85rem; }
.ley-opcion input:checked + label { border-color: var(--naranja); background: #3A2A66; box-shadow: inset 0 0 0 1px var(--naranja); }

.cifra { padding: 14px 0; border-top: 1px solid rgba(255,255,255,.14); }
.cifra:first-of-type { border-top: 0; padding-top: 4px; }
.cifra .nombre { font-weight: 800; }
.cifra .monto { font-size: 2rem; font-weight: 900; color: var(--texto); line-height: 1.15; margin: 2px 0 4px; font-variant-numeric: tabular-nums; }
.cifra .formula { font-weight: 700; background: var(--fondo); border-radius: 10px; padding: 8px 10px; display: inline-block; }
.cifra .que-es { color: var(--texto-2); font-size: .92rem; margin-top: 8px; }
.vacio { color: var(--texto-2); text-align: center; padding: 8px 0; }
.lista-gastos { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lista-gastos label {
  display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; cursor: pointer;
  background: var(--fondo); border: 1px solid var(--borde); border-radius: 12px; padding: 12px 14px; min-height: 52px;
}
.lista-gastos input { width: 24px; height: 24px; margin: 0; accent-color: var(--naranja); }
.lista-gastos small { display: block; color: var(--texto-2); font-size: .9rem; }
.pais-nota { color: var(--texto-2); font-size: .92rem; margin-top: 6px; }

/* Ventana "próximamente" */
dialog.ventana {
  width: min(92vw, 440px); border: 2px solid var(--naranja); border-radius: 20px; padding: 22px;
  background: var(--morado); color: var(--texto); box-shadow: var(--sombra);
}
dialog.ventana::backdrop { background: rgba(10, 7, 26, .75); }
dialog.ventana h2 { text-align: center; }
dialog.ventana p { text-align: center; }

@media (max-height: 700px) {
  .profe.chico img { height: 96px; }
}
@media (min-width: 600px) {
  .profe img { height: 230px; }
  h1 { font-size: 2.2rem; }
}

/* Botón de sonido */
.boton-sonido {
  display: inline-grid; place-items: center; width: 46px; height: 46px; padding: 0;
  font: inherit; font-size: 1.25rem; color: var(--texto); cursor: pointer;
  background: var(--fondo-2); border: 2px solid var(--borde); border-radius: 50%;
}
.boton-sonido[aria-pressed="false"] { border-color: var(--texto-2); }
.encabezado .contenedor { flex-wrap: nowrap; }
.encabezado .acciones { display: flex; align-items: center; gap: 6px; }

/* Botón destacado (compartir) */
.boton.destacado {
  background: #FFFFFF; color: var(--sobre-naranja); box-shadow: 0 6px 0 #B9B2D9;
}
.boton.destacado:hover { background: #F3F0FF; }
.boton.destacado:active { box-shadow: 0 2px 0 #B9B2D9; }
.boton[disabled] { opacity: .5; cursor: not-allowed; box-shadow: none; }

/* Ventana «Avísame» */
dialog.ventana { max-height: 92vh; max-height: 92dvh; overflow-y: auto; }
.ventana-profe { height: 110px; width: auto; margin: 0 auto 6px; }
.ventana .campo input[type="text"], .ventana .campo input[type="email"], .ventana .campo input[type="tel"] { font-size: 1.05rem; }
.ventana .ley-opcion label { min-height: 54px; display: flex; align-items: center; justify-content: center; }
.acepto {
  display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; margin-top: 16px;
  font-size: .95rem; cursor: pointer; min-height: 44px;
}
.acepto input { width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--naranja); }
.acepto a { color: #FFB27F; }
.campo-trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Política de privacidad */
.legal h1 { font-size: 1.6rem; margin-top: 8px; }
.legal h2 { font-size: 1.15rem; margin-top: 1.6em; }
.legal p, .legal li { color: var(--texto); }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: .4em; }
.legal .fecha { color: var(--texto-2); }
.pie a { color: #FFB27F; }

@media (max-height: 700px) {
  .ventana-profe { height: 72px; }
  dialog.ventana { padding: 18px; }
}

/* ===================== Reto v2 ===================== */

/* Pulso de los botones principales: un contorno blanco delgado que se enciende y se apaga
   (el botón no se mueve). Con «reducir movimiento» activado en el celular, no se anima. */
.pulso::after {
  content: ""; position: absolute; inset: -5px; border-radius: 18px; pointer-events: none;
  border: 2px solid #FFFFFF; opacity: 0;
  animation: pulso 1.3s ease-in-out infinite;
}
@keyframes pulso { 0%, 100% { opacity: 0; } 45%, 60% { opacity: 1; } }
.boton[disabled].pulso::after { animation: none; opacity: 0; }
.boton.grande { min-height: 64px; font-size: 1.35rem; letter-spacing: .02em; font-weight: 900; }

/* Contenido por país: <html data-pais="pa|co"> lo pone /js/pais.js. Hasta saberlo, no se muestra ninguno. */
html:not([data-pais]) [data-solo-pais],
html[data-pais="pa"] [data-solo-pais="co"],
html[data-pais="co"] [data-solo-pais="pa"] { display: none !important; }

/* Selector de país */
.selector-pais { position: relative; }
.selector-pais summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 14px; border-radius: 999px; font-weight: 700; font-size: .95rem;
  background: var(--fondo-2); border: 2px solid var(--borde);
}
.selector-pais summary::-webkit-details-marker { display: none; }
.selector-pais ul {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; list-style: none; margin: 0; padding: 6px;
  min-width: 200px; background: var(--morado); border: 2px solid var(--borde); border-radius: 14px; box-shadow: var(--sombra);
}
.selector-pais li { display: block; }
.selector-pais li button {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px; min-height: 44px; border-radius: 10px;
  font: inherit; font-weight: 700; color: #fff; background: transparent; border: 0; cursor: pointer; text-align: left;
}
.selector-pais li button:hover, .selector-pais li button:focus-visible { background: rgba(255,255,255,.12); }
.selector-pais .marcado { margin-left: auto; color: var(--bueno); }
.selector-pais[hidden] { display: none; }
/* En el reto, el encabezado es más angosto: el selector muestra la bandera y la flecha. */
@media (max-width: 400px) {
  .encabezado .acciones .selector-pais summary { padding: 0 10px; font-size: 0; gap: 4px; }
  .encabezado .acciones .selector-pais summary > span { font-size: 1.1rem; }
}

/* Portada: el Profe es el protagonista; el post aparece a su lado como pop-up */
.portada .heroe { position: relative; height: 308px; margin-top: 0; }
.heroe-profe { position: absolute; left: -18px; bottom: 0; margin: 0; width: 84%; z-index: 1; }
.heroe-profe img { width: 100%; height: auto; filter: drop-shadow(0 14px 20px rgba(0,0,0,.5)); }
.heroe-post {
  position: absolute; right: 0; top: 0; margin: 0; width: 47%; z-index: 2;
  transform: rotate(4deg); animation: rebote .8s cubic-bezier(.3,1.5,.5,1) .35s both;
}
.heroe-post img {
  width: 100%; height: auto; border-radius: 12px; background: #fff; padding: 5px;
  box-shadow: 0 14px 30px rgba(0,0,0,.5);
}
/* Piquito hacia el Profe */
.heroe-post::before {
  content: ""; position: absolute; left: -15px; bottom: 16%;
  border: 16px solid transparent; border-right-color: #fff; border-left: 0;
}
@keyframes rebote { 0% { opacity: 0; transform: rotate(4deg) scale(.4) translate(-30px, 40px); } 100% { opacity: 1; transform: rotate(4deg) scale(1); } }
.portada h1 { margin: 6px 0 6px; font-size: 1.9rem; }
.portada .bajada { color: var(--texto); font-size: 1.12rem; margin-bottom: 12px; }
.como-jugar {
  text-align: left; background: var(--fondo-2); border: 2px solid var(--borde); border-radius: var(--radio);
  padding: 14px 16px 12px;
}
.como-jugar h2 { font-size: 1.1rem; margin-bottom: 10px; }
.como-jugar h2 em { font-style: normal; color: var(--naranja); }
.como-jugar ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.como-jugar li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center; font-size: 1.02rem; }
.como-jugar .num {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--naranja); color: var(--sobre-naranja); font-weight: 900;
}
@media (min-width: 600px) {
  .portada .heroe { height: 400px; }
}
@media (max-width: 360px) {
  .portada .heroe { height: 280px; }
  .portada h1 { font-size: 1.65rem; }
}

/* Bienvenida: Profe + post en miniatura */
.zona-profe.con-post { display: flex; justify-content: center; align-items: center; gap: 6px; }
.zona-profe.con-post .profe { margin: 4px 0 0; }
.post-mini {
  width: 90px; height: auto; border-radius: 8px; background: #fff; padding: 3px;
  transform: rotate(5deg); box-shadow: 0 8px 18px rgba(0,0,0,.45);
}
.anim-rebote { animation: rebote-mini .7s cubic-bezier(.3,1.5,.5,1) .3s both; }
@keyframes rebote-mini { 0% { opacity: 0; transform: rotate(5deg) scale(.4); } 100% { opacity: 1; transform: rotate(5deg) scale(1); } }
.presupuesto-grande small { display: block; font-size: .9rem; font-weight: 600; color: var(--texto-2); margin-top: 4px; }

/* Texto guía con flecha verde que titila */
.guia { text-align: center; font-weight: 800; margin: 18px 0 0; display: grid; justify-items: center; gap: 2px; }
.guia .flecha { color: #22C55E; animation: titilar 1.1s ease-in-out infinite; }
@keyframes titilar { 0%, 100% { opacity: 1; transform: translateY(0); } 50% { opacity: .35; transform: translateY(4px); } }
.decision .guia { margin-top: 18px; }
.decision .opciones { margin-top: 8px; }

/* Ficha del aviso (estilo de la app de RemateHoy) */
.ficha {
  margin-top: 8px; padding: 16px; border-radius: var(--radio);
  background: var(--morado); border: 3px solid var(--naranja); box-shadow: var(--sombra);
}
.ficha p { margin: 0 0 8px; }
.ficha-cab { display: grid; grid-template-columns: 64px 1fr auto; gap: 10px; align-items: start; margin-bottom: 10px; }
.ficha-casa { width: 64px; height: 64px; object-fit: contain; }
.ficha-id b { display: block; font-size: 1.05rem; }
.ficha-id span { color: var(--texto-2); font-size: .92rem; }
.ficha-cuando { color: #FF9A5C; font-weight: 800; white-space: nowrap; font-size: .95rem; display: inline-flex; align-items: center; gap: 5px; }
.ficha-cuando img { width: 20px; height: 20px; }
.ficha-datos { display: grid; gap: 8px; }
.ficha .etq { display: block; color: #FF9A5C; font-weight: 800; }
.ficha .valor { display: block; font-weight: 600; }
.ficha .valor small { color: var(--texto-2); font-weight: 500; }
.ficha .con-accion { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.ficha .con-accion.abajo { align-items: end; }
.ficha-acciones { display: flex; align-items: center; gap: 8px; }
.ficha-mapa, .ficha-corazon, .ficha-ver {
  min-width: 48px; min-height: 48px; border-radius: 12px; cursor: pointer; font: inherit; font-weight: 800;
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
}
.ficha-mapa, .ficha-corazon { background: transparent; border: 0; padding: 0; display: grid; place-items: center; }
.ficha-mapa img { width: 54px; height: 52px; }
.ficha-corazon img { width: 37px; height: 32px; }
.ficha-ver { background: var(--naranja); color: var(--sobre-naranja); border: 0; padding: 0 20px; font-size: 1.1rem; }
.ficha-mapa img, .ficha-corazon img { -webkit-user-drag: none; pointer-events: none; }
.ficha-mapa.presionado, .ficha-corazon.presionado, .ficha-ver.presionado { outline: 3px solid #fff; outline-offset: 2px; }

/* Cuadro flotante arriba (explicaciones del Profe y el aviso en la Escena 2) */
.flotante {
  position: fixed; z-index: 50; left: 0; right: 0; margin: 0 auto; top: max(10px, env(safe-area-inset-top));
  width: min(92vw, 488px); pointer-events: none;
  animation: aparecer .2s ease-out both;
}
.flotante .ficha { margin: 0; box-shadow: 0 18px 50px rgba(0,0,0,.7); }
.flotante-profe {
  display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: center;
  background: #fff; color: #1A1438; border-radius: 18px; padding: 10px 14px; font-weight: 700;
  border: 3px solid var(--naranja); box-shadow: 0 18px 50px rgba(0,0,0,.6);
}
.flotante-profe img { width: 64px; height: 64px; object-fit: cover; object-position: 50% 10%; border-radius: 50%; background: var(--morado); }

/* Escena 2: «Ver el aviso» (mantener presionado) */
.ver-aviso { margin-top: 14px; text-align: center; }
.ver-aviso .boton { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.ver-aviso .boton.presionado { border-color: var(--naranja); background: #3A2A66; }
.ayuda-mantener { font-size: .88rem; color: var(--texto-2); margin-top: 6px; }

/* Puja */
.globo-puja {
  position: relative; margin-top: 12px; padding: 14px 16px; border-radius: 18px;
  font-size: 1.35rem; font-weight: 900; text-align: center; color: #fff;
}
.globo-puja::before {
  content: ""; position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  border: 12px solid transparent; border-top: 0;
}
.globo-puja.verde { background: #15803D; }
.globo-puja.verde::before { border-bottom-color: #15803D; }
.globo-puja.amarillo { background: #FACC15; color: #1A1438; }
.globo-puja.amarillo::before { border-bottom-color: #FACC15; }
.globo-puja.rojo { background: #DC2626; }
.globo-puja.rojo::before { border-bottom-color: #DC2626; }
.globo-puja.neutro { background: #fff; color: #1A1438; font-size: 1.05rem; font-weight: 800; }
.globo-puja.neutro::before { border-bottom-color: #fff; }
.globo-puja.aviso { background: var(--malo-fondo); border: 2px solid var(--malo); font-size: 1.02rem; font-weight: 800; }
.globo-puja.aviso::before { border-bottom-color: var(--malo); }
.reloj .avance { transition: background-color .3s; }
.reloj.fase-verde .avance { background: #22C55E; }
.reloj.fase-verde .cifras b { color: #4ADE80; }
.reloj.fase-amarillo .avance { background: #FACC15; }
.reloj.fase-amarillo .cifras b { color: #FDE047; }
.reloj.fase-rojo .avance { background: #EF4444; }
.reloj.fase-rojo .cifras b { color: #FF8A8A; }
.en-vivo {
  margin-top: 12px; padding: 10px 14px; border-radius: 14px;
  background: #120D2B; border: 2px solid #7F1D1D;
}
.en-vivo-cab { font-weight: 900; letter-spacing: .04em; font-size: .9rem; }
.en-vivo ul { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 2px; }
.en-vivo li { font-weight: 600; }
.en-vivo li:first-child { font-size: 1.1rem; font-weight: 800; }
.en-vivo li:not(:first-child) { color: var(--texto-2); font-size: .92rem; }
.en-vivo .monto { color: #FF8A8A; }
.en-vivo li.tuya .monto { color: #4ADE80; }
.en-vivo .espera { color: var(--texto-2); font-weight: 600; }
.zona-opciones { position: relative; }
.zona-opciones .opciones { margin-top: 12px; gap: 10px; }
.opciones.montos .opcion { min-height: 54px; }
.sello-vendido {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center; z-index: 3;
  pointer-events: none;
}
.sello-vendido b, .sello-vendido span { transform: rotate(-8deg); }
.sello-vendido b {
  display: block; font-size: 2.6rem; font-weight: 900; color: #FF4D4D; letter-spacing: .04em;
  border: 6px solid #FF4D4D; border-radius: 14px; padding: 2px 18px; background: rgba(21,16,47,.88);
  animation: sello .45s cubic-bezier(.3,1.6,.5,1) both;
}
.sello-vendido span {
  display: block; margin-top: 8px; font-weight: 900; font-size: 1.1rem; color: #fff;
  background: rgba(21,16,47,.92); border-radius: 10px; padding: 4px 10px;
}
.sello-vendido.adjudicado b { font-size: 2.1rem; }
.sello-vendido.adjudicado { position: static; margin-top: 12px; padding: 6px 0 4px; }
.zona-opciones .opciones[hidden] { display: none; }

/* Sobre cerrado (Colombia) */
.sala li, .sala li:first-child, .sala li:not(:first-child) { font-size: 1rem; font-weight: 700; color: var(--texto); }
.sobre-tuyo {
  display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 10px 14px; border-radius: 14px;
  background: var(--fondo-2); border: 2px solid var(--naranja); font-weight: 700;
}
.sobre-tuyo b { color: #4ADE80; white-space: nowrap; }
.sobre-svg { flex: none; transition: transform .5s cubic-bezier(.3,1.5,.5,1); }
.sobre-svg .solapa { transform-origin: 32px 4px; transform: scaleY(-1); transition: transform .55s ease-in .15s; }
.sobre-tuyo.cerrado .solapa { transform: scaleY(1); }
.sobre-tuyo.cerrado .sobre-svg { transform: rotate(-6deg) scale(1.08); }
.apertura {
  margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: #120D2B; border: 2px solid var(--naranja);
}
.apertura h3 { margin: 0 0 6px; font-size: 1rem; letter-spacing: .03em; color: #FF9A5C; }
.apertura .sobres { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.apertura .sobre-abierto { font-size: 1.08rem; font-weight: 700; }
.apertura .sobre-abierto b { color: #FF8A8A; }
.apertura .sobre-abierto.tuyo b { color: #4ADE80; }
.presupuesto-grande .moneda-nombre { font-size: .55em; font-weight: 800; }
@keyframes sello { 0% { opacity: 0; transform: rotate(-8deg) scale(2.2); } 100% { opacity: 1; transform: rotate(-8deg) scale(1); } }

/* Tu resultado */
.resultado .puntaje { margin: 6px 0 8px; }
.resultado .titulo { font-size: 1.1rem; margin: 0; }
.explicaciones { display: grid; gap: 10px; margin-top: 12px; }
.explica {
  background: var(--fondo-2); border-radius: 14px; padding: 12px 14px 12px 16px;
  border: 1px solid var(--borde); border-left: 6px solid;
}
.explica h3 { font-size: 1.02rem; margin: 0 0 4px; }
.explica p { color: var(--texto); font-size: .98rem; margin: 0; }
.explica.bueno { border-left-color: var(--bueno); }
.explica.neutro { border-left-color: var(--neutro); }
.explica.malo { border-left-color: var(--malo); }
.caja-formulario {
  margin-top: 14px; padding: 4px 16px 16px; border-radius: var(--radio);
  background: var(--morado); border: 1px solid var(--borde);
}
.caja-formulario .campo input { font-size: 1.05rem; }
.ahora-no { text-align: center; margin-top: 12px; }
.ahora-no a { color: #FFB27F; display: inline-flex; align-items: center; min-height: 44px; }
.finales { margin-top: 14px; }
.finales .boton { min-height: 52px; font-size: .98rem; padding: 10px 12px; }

/* Agradecimiento: camino a postor profesional */
.camino { margin-top: 26px; }
.mapa .hecho { border-color: var(--bueno); }
.mapa .hecho .icono { background: var(--bueno-fondo); border-color: var(--bueno); }
.mapa .bloqueado { opacity: 1; }
.mapa li.abierto { padding: 0; display: block; }
.mapa-enlace {
  display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center;
  padding: 12px 14px; color: var(--texto); text-decoration: none; min-height: 44px;
}
.mapa .abierto .icono { color: var(--sobre-naranja); }

/* Celulares bajitos (iPhone SE): la puja completa cabe sin bajar */
@media (max-height: 700px) {
  #app[data-etapa="escena3"] .profe.chico img { height: 74px; }
  #app[data-etapa="escena3"] .titulo-escena { font-size: 1.05rem; margin-top: 4px; }
  #app[data-etapa="escena3"] .barra-reto { margin: 0 0 2px; }
  .globo-puja { margin-top: 10px; padding: 8px 12px; font-size: 1.15rem; }
  .globo-puja.neutro, .globo-puja.aviso { font-size: .95rem; }
  .reloj { margin-top: 8px; }
  .reloj .cifras { margin-bottom: 4px; }
  .en-vivo { margin-top: 8px; padding: 6px 12px; }
  .en-vivo li:not(:first-child) { display: none; }
  .zona-opciones .opciones { margin-top: 8px; gap: 8px; }
  .opciones.montos .opcion { min-height: 48px; padding: 6px 12px; }
  .encabezado { padding: 6px 0; }
}

/* ===================== Reto v3 ===================== */

/* Formulario con verificación */
.campo.medio { border: 0; margin: 16px 0 0; padding: 0; min-width: 0; }
.medios { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.medio-op { position: relative; cursor: pointer; }
.medio-op input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.medio-op > span {
  display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 50px; padding: 8px;
  border-radius: 12px; border: 2px solid var(--borde); background: var(--fondo-2); font-weight: 800;
}
.medio-op input:checked + span { border-color: var(--naranja); background: #4A2A1E; box-shadow: inset 0 0 0 1px var(--naranja); }
.medio-op input:focus-visible + span { outline: 3px solid #fff; outline-offset: 2px; }
.tel { display: grid; grid-template-columns: 1fr; gap: 8px; }
.campo .tel select, .campo .tel input { width: 100%; }
.estado-contacto { margin: 8px 0 0; font-weight: 700; min-height: 0; }
.estado-contacto:empty { display: none; }
.estado-contacto.ok { color: var(--bueno); }
.estado-contacto.mal { color: var(--malo); }
.estado-contacto.duda { color: var(--neutro); }
.sugerencia {
  font: inherit; font-weight: 800; color: #1A1438; background: var(--neutro); border: 0; border-radius: 10px;
  min-height: 44px; padding: 6px 12px; margin-top: 6px; cursor: pointer; text-align: left;
}
.error.falta { margin: 0; text-align: center; }
.error.falta:empty { display: none; }
.ya-registrado { margin-top: 14px; text-align: center; font-weight: 700; color: var(--bueno); }

/* Compartir (verde) y Volver a jugar (amarillo), con ícono */
.boton.compartir { background: #22C55E; color: #0B2416; box-shadow: 0 6px 0 #15803D; gap: 8px; }
.boton.compartir:hover { background: #2FD36B; }
.boton.compartir:active { box-shadow: 0 2px 0 #15803D; }
.boton.volver-jugar { background: #FFD166; color: #2A1F05; box-shadow: 0 6px 0 #C99A1E; gap: 8px; }
.boton.volver-jugar:hover { background: #FFDB85; }
.boton.volver-jugar:active { box-shadow: 0 2px 0 #C99A1E; }
.icono-boton { flex: none; width: 24px; height: 24px; }

/* Agradecimiento: botón pequeño «Avísame cuando salga el curso» */
.avisame-gracias { margin-top: 14px; text-align: center; }
.boton-chico {
  font: inherit; font-weight: 800; font-size: .98rem; color: var(--texto); cursor: pointer;
  background: transparent; border: 2px solid var(--borde); border-radius: 999px; min-height: 44px; padding: 8px 18px;
}
.boton-chico:hover { background: rgba(255,255,255,.06); }
.avisame-gracias .caja-formulario { text-align: left; }

/* ===================== Reto v4: agradecimiento con «Tu camino» ===================== */
.camino { margin-top: 24px; }
.camino h2 { margin-bottom: 2px; }
.avance { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; color: var(--texto); font-size: 1.02rem; }
.flecha-blanca { flex: none; animation: titilar 1.1s ease-in-out infinite; }
.ruta { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.paso { display: grid; grid-template-columns: 40px 1fr; column-gap: 12px; row-gap: 10px; align-items: center; }
.paso .marca { display: grid; place-items: center; }
.paso .caja {
  grid-column: 2; width: 100%; text-align: left; font: inherit; color: var(--texto);
  background: var(--fondo-2); border: 2px solid var(--borde); border-radius: 14px; padding: 12px 16px;
}
.paso.hecho .caja { border-color: var(--bueno); }
.paso .caja strong { display: block; font-size: 1.1rem; }
.paso .caja .detalle { display: block; color: var(--texto-2); }
.caja.tocable {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer;
  border-color: var(--naranja); background: #2B1F55; -webkit-tap-highlight-color: transparent;
}
.caja.tocable:active { transform: translateY(1px); }
.caja.tocable[disabled] { cursor: default; opacity: 1; color: var(--texto); }
.caja.tocable.avisado { border-color: var(--bueno); }
.linea-avisame { display: block; margin-top: 2px; color: #FF9A5C; font-weight: 800; }
.linea-avisame.avisado { color: var(--bueno); }
.mano { flex: none; animation: parpadeo 1.1s ease-in-out infinite; }
@keyframes parpadeo { 0%, 100% { opacity: 1; } 50% { opacity: .2; } }
.form-camino {
  grid-column: 2; padding: 4px 14px 14px; border-radius: var(--radio);
  background: var(--morado); border: 1px solid var(--borde);
}
.form-camino .campo input { font-size: 1.05rem; }
.boton.ver-remates { margin-top: 6px; font-size: 1.15rem; min-height: 58px; }

/* Aviso para el dueño (?no_contar=1 / ?contar=1) */
.aviso-dueno {
  position: fixed; left: 12px; right: 12px; bottom: 16px; z-index: 50; padding: 12px 16px; border-radius: 14px;
  background: #15803D; color: #fff; font-weight: 800; text-align: center; box-shadow: var(--sombra);
}
