/* aulas PRO 2.0 · registro · estilos base.
   Las secciones de cada pantalla (pasos, mapa, resumen, tiquete) se agregan al final, debajo de su propio comentario. */

/* === Tokens === */
:root {
  --naranja: #FC8004;
  --naranja-hondo: #E26A00;
  --naranja-luz: #FFB45E;
  --azul: #52709C;
  --azul-hondo: #3A5682;
  --azul-luz: #DCE7F6;
  --grafito: #303030;
  --fondo: #2B2B2B;
  --papel: #F5F3F0;
  --blanco: #FFFFFF;
  --texto: #2B2B2B;
  --texto-suave: #5E5B57;
  --linea: #E2DED8;
  --exito: #2E7D4F;
  --error: #B3261E;
  --naranja-texto: #A84E00;   /* naranja para texto sobre fondo claro (AA) */
  --naranja-suave: #FFF1E3;
  --error-suave: #FDECEA;
  --naranja-borde: #F3C08C;   /* borde de avisos sobre naranja-suave */
  --error-borde: #EBB0AA;     /* borde de avisos de error sobre error-suave */
  --exito-suave: #F3FAF5;
  --exito-borde: #BFE0CC;
  --verde-silla: #3FC495;     /* mesas verdes del croquis */
  --borde-campo: #8F877E;     /* borde de campos y contadores (3:1 sobre blanco) */

  --e1: 4px;
  --e2: 8px;
  --e3: 12px;
  --e4: 16px;
  --e5: 24px;
  --e6: 32px;
  --e7: 48px;

  --r-s: 8px;
  --r-m: 14px;
  --r-l: 20px;
  --r-pastilla: 999px;

  --sombra-s: 0 1px 2px rgba(20, 20, 20, .08), 0 2px 6px rgba(20, 20, 20, .06);
  --sombra-m: 0 6px 18px rgba(20, 20, 20, .12);
  --sombra-barra: 0 -6px 20px rgba(20, 20, 20, .14);

  --alto-barra: 76px;
  --barra-alto: calc(var(--alto-barra) + env(safe-area-inset-bottom));   /* compra.js lo cambia por el alto real de la barra */
  --ancho-contenido: 1080px;
  --fuente: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* === Reinicio y tipografía === */
*, *::before, *::after { box-sizing: border-box; }
/* --alto-reloj lo pone reloj.js (alto real de la barra del reloj, 0 si no se ve): al enfocar, nada queda debajo de él */
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--alto-reloj, 0px); scroll-padding-bottom: calc(var(--barra-alto) + var(--e4)); }
body {
  margin: 0;
  font-family: var(--fuente);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--texto);
  background: var(--papel);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 32px; font-weight: 800; line-height: 1.1; letter-spacing: -.8px; }
h2 { font-size: 24px; font-weight: 700; line-height: 1.2; letter-spacing: -.4px; }
h3 { font-size: 20px; font-weight: 700; line-height: 1.25; }
strong { font-weight: 700; }
a { color: var(--azul-hondo); }
.pista { font-size: 14px; font-weight: 500; color: var(--texto-suave); }
.blanco { filter: brightness(0) invert(1); }
.solo-lectores { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.saltar { position: absolute; left: var(--e4); top: -100px; z-index: 100; padding: var(--e3) var(--e4); border-radius: var(--r-s); background: var(--blanco); color: var(--texto); font-weight: 700; }
.saltar:focus { top: var(--e2); }
@media (max-width: 480px) {
  h1 { font-size: 28px; }
  h2 { font-size: 22px; }
}

/* === Foco === */
:focus-visible { outline: 3px solid var(--naranja); outline-offset: 2px; }
.cabecera :focus-visible, .barra :focus-visible { outline-color: var(--naranja-luz); }
main:focus { outline: none; }

/* === Botones === */
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--e2);
  min-height: 44px;
  padding: 0 var(--e5);
  border: 2px solid transparent;
  border-radius: var(--r-pastilla);
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .1s ease, box-shadow .15s ease;
}
.boton--primario { background: var(--naranja); color: #1E1E1E; box-shadow: 0 4px 12px rgba(226, 106, 0, .3); }
.boton--primario:hover { background: var(--naranja-luz); }
.boton--primario:active { transform: translateY(1px); background: var(--naranja-hondo); }
.boton--secundario { background: transparent; color: var(--texto); border-color: var(--texto); }
.boton--secundario:hover { background: rgba(43, 43, 43, .06); }
.boton--discreto { background: transparent; color: var(--azul-hondo); padding: 0 var(--e3); text-decoration: underline; text-underline-offset: 3px; }
.boton[disabled], .boton[aria-disabled="true"] { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; }

/* === Tarjetas === */
.tarjeta {
  background: var(--blanco);
  border-radius: var(--r-l);
  padding: var(--e5);
  box-shadow: var(--sombra-s);
}
.tarjeta--oscura { background: var(--grafito); color: var(--blanco); }
.tarjeta--acento { border-top: 4px solid var(--naranja); }
.aviso { padding: var(--e4); border: 1px solid var(--naranja-borde); border-radius: var(--r-m); background: var(--naranja-suave); font-weight: 600; }
.chip { display: inline-flex; align-items: center; min-height: 24px; padding: 0 var(--e3); border-radius: var(--r-pastilla); font-size: 12px; font-weight: 700; color: var(--blanco); background: var(--azul); }
.chip--a { background: var(--naranja); color: #1E1E1E; }

/* === Cabecera y barra de progreso === */
.cabecera { background: var(--fondo); color: var(--blanco); padding: var(--e3) var(--e4) 0; border-bottom: 4px solid var(--naranja); }
.cabecera__fila { display: flex; align-items: center; justify-content: space-between; gap: var(--e4); max-width: var(--ancho-contenido); margin: 0 auto; }
.cabecera__logo { display: block; }
.cabecera__logo img { height: 44px; width: auto; }
.cabecera__socios { display: flex; align-items: center; gap: var(--e4); }
.cabecera__socios img { width: auto; opacity: .85; }

.progreso { max-width: var(--ancho-contenido); margin: var(--e3) auto 0; }
.progreso__lista { display: flex; gap: var(--e1); margin: 0; padding: 0; list-style: none; counter-reset: paso; }
.progreso__paso {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  gap: var(--e2);
  min-height: 44px;
  padding: var(--e2) var(--e3);
  border-radius: var(--r-s) var(--r-s) 0 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  color: rgba(255, 255, 255, .6);
  background: rgba(255, 255, 255, .05);
  box-shadow: inset 0 -3px 0 transparent;
}
.progreso__numero {
  flex: none;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  background: rgba(255, 255, 255, .14);
}
.progreso__paso[aria-current="step"] { color: var(--blanco); background: rgba(255, 255, 255, .12); box-shadow: inset 0 -3px 0 var(--naranja); }
.progreso__paso[aria-current="step"] .progreso__numero { background: var(--naranja); color: #1E1E1E; }
.progreso__paso--hecho { color: rgba(255, 255, 255, .85); }
.progreso__paso--hecho .progreso__numero { background: var(--naranja-hondo); color: var(--blanco); }
@media (max-width: 720px) {
  .cabecera__socios { display: none; }
  .progreso__lista { gap: 2px; }
  /* en el teléfono solo el paso actual muestra su nombre */
  .progreso__paso { justify-content: center; padding: var(--e2); }
  .progreso__paso:not([aria-current="step"]) .progreso__nombre { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .progreso__paso[aria-current="step"] { flex: 3 1 0; justify-content: flex-start; }
}

/* === Contenido y reloj === */
.paso { max-width: var(--ancho-contenido); margin: 0 auto; padding: var(--e5) var(--e4) calc(var(--barra-alto) + var(--e7)); }
.reloj { position: sticky; top: 0; z-index: 20; padding: var(--e2) var(--e4); text-align: center; font-size: 14px; font-weight: 700; color: var(--blanco); background: var(--azul-hondo); }
.reloj[hidden] { display: none; }
.reloj--urgente { background: var(--error); }

/* === Barra inferior === */
.barra {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: var(--e4);
  min-height: var(--alto-barra);
  padding: var(--e3) var(--e4) calc(var(--e3) + env(safe-area-inset-bottom));
  background: var(--fondo);
  color: var(--blanco);
  border-top: 3px solid var(--naranja);
  box-shadow: var(--sombra-barra);
}
.barra__total { display: flex; flex-direction: column; line-height: 1.15; min-width: 96px; }
.barra__etiqueta { font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, .65); text-transform: uppercase; letter-spacing: .6px; }
.barra__monto { font-size: 22px; font-weight: 800; }
.barra__falta { flex: 1; font-size: 14px; font-weight: 500; line-height: 1.3; color: rgba(255, 255, 255, .85); }
.barra .boton { flex: none; }
/* Sobre la barra oscura el naranja a media opacidad se ve café: mientras falta algo, el botón va en gris */
/* (Guardando… también va deshabilitado, pero ese sigue naranja: aria-busy) */
.barra .boton--primario[aria-disabled="true"]:not([aria-busy="true"]),
.barra .boton--primario[disabled]:not([aria-busy="true"]) {
  opacity: 1; background: #4A4643; color: rgba(255, 255, 255, .72); box-shadow: none;
}
@media (max-width: 480px) {
  /* En el teléfono "qué falta" va en su propia fila y el botón puede partirse en dos líneas
     ("Reservar y pagar por transferencia"): nada se sale de la pantalla */
  .barra { flex-wrap: wrap; gap: var(--e2) var(--e3); }
  .barra__falta { order: 3; flex-basis: 100%; font-size: 13px; }
  .barra__falta:empty { display: none; }
  .barra .boton { flex: 1 1 0; min-width: 0; max-width: max-content; margin-left: auto; padding: 4px var(--e4); white-space: normal; }
}

/* === Nate ===
   #nate es la región viva: siempre en la página, vacía mide 0 × 0. Va en la esquina, encima de la barra de abajo
   (--barra-alto es su alto real): nunca tapa Continuar. Burbuja arriba y Nate debajo, a la derecha. */
.nate { --nate-figura: 128px; position: fixed; right: var(--e4); bottom: calc(var(--barra-alto) + var(--e3)); z-index: 25; pointer-events: none; }
.nate:empty { width: 0; height: 0; overflow: hidden; }
body[data-pagina="tiquete"] .nate { bottom: calc(var(--e4) + env(safe-area-inset-bottom)); }
/* Mientras la tarjetita de confirmar (o su aviso) está sobre el mapa del paso 3 (lugares.js), o hay una alerta abajo
   (compra.js; en el teléfono le pasaría por encima a la burbuja), Nate se hace a un lado */
body.confirmando .nate__escena,
body.con-alerta .nate__escena,
body.nate-aparte .nate__escena { visibility: hidden; }   /* nate-aparte: taparía el aviso de transferencia o el campo donde escribes */
/* nate.js mide la burbuja nueva antes de mostrarla: escondida y sin animación, para medirla donde va a quedar */
.nate__escena--midiendo { visibility: hidden; }
.nate__escena--midiendo, .nate__escena--midiendo * { animation: none !important; }
/* En la esquina izquierda (a la derecha taparía algo, ver nate.js): todo en espejo */
.nate--izquierda { right: auto; left: var(--e4); }
.nate--izquierda .nate__escena { align-items: flex-start; }
.nate--izquierda .nate__escena--entra { animation-name: nate-entra-izq; }
.nate--izquierda .nate__escena--sale { animation-name: nate-sale-izq; }
.nate--izquierda .nate__burbuja::after { right: auto; left: 44px; }
.nate--izquierda .nate__figura { margin: var(--e1) 0 0 var(--e3); }

.nate__escena { display: flex; flex-direction: column; align-items: flex-end; width: min(320px, calc(100vw - 2 * var(--e4))); }
.nate__escena--entra { animation: nate-entra .55s cubic-bezier(.25, .8, .35, 1) both; }
.nate__escena--sale { animation: nate-sale .22s ease-in both; }
/* Topada: nunca más alta que el 45 % de la pantalla ni que el espacio sobre Nate (con su ✕ adentro de la pantalla);
   lo que no cabe se desplaza dentro del texto y el botón de acción queda a la vista. */
.nate__burbuja {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: min(45vh, calc(100vh - var(--alto-reloj, 0px) - var(--barra-alto) - var(--nate-figura) - 48px));
  max-height: min(45dvh, calc(100dvh - var(--alto-reloj, 0px) - var(--barra-alto) - var(--nate-figura) - 48px));
  padding: var(--e3) var(--e5) var(--e3) var(--e4);
  border-radius: var(--r-l);
  background: var(--blanco);
  color: var(--texto);
  box-shadow: var(--sombra-m), 0 0 0 1px rgba(20, 20, 20, .08);
  pointer-events: auto;
}
.nate__burbuja::after { content: ""; position: absolute; right: 44px; bottom: -7px; width: 14px; height: 14px; background: var(--blanco); transform: rotate(45deg); }
.nate__texto { position: relative; z-index: 1; flex: 0 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; font-size: 15px; font-weight: 600; line-height: 1.4; }
.nate__texto:focus-visible { outline: 3px solid var(--naranja); outline-offset: 2px; border-radius: 4px; }
.nate__texto em { font-weight: 700; }
.nate__palabra { animation: nate-palabra .14s ease-out both; animation-delay: calc(var(--i, 0) * var(--paso, 30ms)); }
.nate__escena--entra .nate__palabra { animation-delay: calc(.25s + var(--i, 0) * var(--paso, 30ms)); }   /* escribe al llegar */
.nate__accion { position: relative; z-index: 1; flex: none; width: 100%; margin-top: var(--e3); padding: var(--e1) var(--e4); font-size: 14px; white-space: normal; }
.nate__accion[aria-busy="true"] { opacity: .8; cursor: progress; }
.nate__accion[aria-busy="true"]::after { content: ""; flex: none; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: nate-gira .7s linear infinite; }
/* La ✕ en la esquina de la burbuja: 44 × 44 para tocar, dentro de la pantalla, con un círculo visible más chico arriba a la derecha */
.nate__cerrar { position: absolute; top: -18px; right: -16px; z-index: 2; display: grid; place-items: start end; width: 44px; height: 44px; padding: 4px; border: 0; border-radius: 50%; background: none; color: var(--texto); cursor: pointer; }
.nate__x { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--blanco); box-shadow: var(--sombra-s), 0 0 0 1px rgba(20, 20, 20, .14); }
.nate__x .icono { width: 16px; height: 16px; stroke-width: 2.6; }
.nate__cerrar:hover .nate__x { background: var(--papel); }
.nate__cerrar:focus-visible { outline: none; }
.nate__cerrar:focus-visible .nate__x { outline: 3px solid var(--naranja); outline-offset: 2px; }
.nate__figura { flex: none; width: auto; height: var(--nate-figura); margin: var(--e1) var(--e3) 0 0; transform-origin: 50% 100%; pointer-events: none; animation: nate-ladea .9s ease-in-out .35s both; }

@keyframes nate-entra {   /* entra deslizándose desde la derecha y rebota un poco */
  0% { opacity: 0; transform: translateX(110%); }
  55% { opacity: 1; transform: translateX(-10px); }
  75% { transform: translate(3px, -5px); }
  90% { transform: translate(-1px, 0); }
  100% { transform: none; }
}
@keyframes nate-sale { to { opacity: 0; transform: translateX(32px); } }
@keyframes nate-entra-izq {   /* lo mismo desde la izquierda */
  0% { opacity: 0; transform: translateX(-110%); }
  55% { opacity: 1; transform: translateX(10px); }
  75% { transform: translate(-3px, -5px); }
  90% { transform: translate(1px, 0); }
  100% { transform: none; }
}
@keyframes nate-sale-izq { to { opacity: 0; transform: translateX(-32px); } }
@keyframes nate-ladea {   /* ladea la cabeza mientras habla */
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-6deg); }
  55% { transform: rotate(4deg); }
  80% { transform: rotate(-2deg); }
}
@keyframes nate-palabra { from { opacity: 0; } to { opacity: 1; } }
@keyframes nate-gira { to { transform: rotate(360deg); } }

/* En el teléfono ocupa como mucho el 40 % del ancho */
@media (max-width: 480px) {
  .nate__escena { width: 40vw; }
  .nate__burbuja { padding: 10px 14px 10px 12px; border-radius: var(--r-m); }
  .nate__burbuja::after { right: 22px; }
  .nate--izquierda .nate__burbuja::after { right: auto; left: 22px; }
  .nate__texto { font-size: 13px; line-height: 1.35; }
  .nate__accion { margin-top: var(--e2); padding: var(--e1) var(--e2); font-size: 13px; }
  .nate__x { width: 28px; height: 28px; }
  .nate { --nate-figura: 72px; }
  .nate__figura { margin-right: var(--e2); }
  .nate--izquierda .nate__figura { margin: var(--e1) 0 0 var(--e2); }
}
/* Pantalla baja (teléfono acostado): Nate más chico para que la burbuja tenga espacio */
@media (max-height: 560px) {
  .nate { --nate-figura: 72px; }
}
/* Burbuja larga (nate.js la marca) en el teléfono o en pantalla baja: Nate se achica para dejarle lugar */
@media (max-width: 480px), (max-height: 560px) {
  .nate__escena--larga { --nate-figura: 40px; }
}

/* Sin movimiento: aparece quieto y con todo el texto de una vez */
@media (prefers-reduced-motion: reduce) {
  .nate__escena--entra, .nate__escena--sale, .nate__figura, .nate__palabra { animation: none !important; }
}

/* === Página vacía (404) y tiquete === */
.vacio { display: grid; justify-items: center; gap: var(--e4); max-width: 520px; margin: 0 auto; padding: var(--e7) var(--e4); text-align: center; }
.vacio img { width: auto; }
.vacio p { color: var(--texto-suave); }
.tiquete { max-width: 720px; margin: 0 auto; padding: var(--e5) var(--e4) var(--e7); }
body[data-pagina="no-encontrada"], body[data-pagina="no-recordar"], body[data-pagina="tiquete"] { min-height: 100vh; }

/* === Íconos === */
.icono { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* === Progreso: pasos hechos (botón para volver) === */
.progreso__paso--hecho { padding: 0; }
.progreso__boton {
  display: flex;
  align-items: center;
  gap: var(--e2);
  width: 100%;
  min-height: 44px;
  padding: var(--e2) var(--e3);
  border: 0;
  border-radius: inherit;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color .15s ease;
}
.progreso__boton:hover { background: rgba(255, 255, 255, .08); }
.progreso__check { width: 14px; height: 14px; stroke-width: 3.2; }
/* Pago con tarjeta iniciado: los pasos 1 a 4 se ven listos, sin botón para volver */
.progreso__paso--cerrado { padding: var(--e2) var(--e3); }
@media (max-width: 720px) {
  .progreso__boton { justify-content: center; padding: var(--e2); }
  .progreso__paso--cerrado { padding: var(--e2); }
}

/* === Flujo: encabezado de paso, avisos y carga === */
.paso__encabezado { margin-bottom: var(--e5); }
.paso__eyebrow { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: var(--naranja-texto); }
.paso__eyebrow::before { content: ""; width: 28px; height: 4px; border-radius: 2px; background: var(--naranja); }
.paso__titulo { margin-top: var(--e2); }
.paso__titulo:focus { outline: none; }
.paso__bajada { max-width: 60ch; margin-top: var(--e2); color: var(--texto-suave); }
.avisos { display: grid; gap: var(--e3); margin-bottom: var(--e4); }
.avisos:empty { display: none; }
.aviso { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; line-height: 1.45; }
.aviso p { margin: 0; }
.aviso__icono { margin-top: 1px; color: var(--naranja-texto); }
.aviso--suave { border-color: transparent; font-size: 14px; }
.aviso--error { border-color: var(--error-borde); background: var(--error-suave); }
.aviso--error .aviso__icono { color: var(--error); }
.cargando { display: flex; align-items: center; justify-content: center; gap: var(--e3); padding: var(--e7) 0; font-weight: 600; color: var(--texto-suave); }
.cargando__punto { width: 12px; height: 12px; border-radius: 50%; background: var(--naranja); animation: latido 1s ease-in-out infinite alternate; }
@keyframes latido { from { transform: scale(.7); opacity: .5; } to { transform: scale(1); opacity: 1; } }

/* === Barra inferior: IVA, cotizando y qué falta === */
.barra[hidden] { display: none; }
.barra__iva { font-size: 11.5px; font-weight: 600; color: rgba(255, 255, 255, .72); }
.barra__iva:empty { display: none; }
.barra__monto { transition: opacity .2s ease; }
.barra__total--cotizando .barra__monto { opacity: .55; }
.barra__falta--aviso { animation: falta .6s ease; }
@keyframes falta {
  0%, 100% { color: rgba(255, 255, 255, .85); transform: none; }
  30% { color: var(--naranja-luz); transform: translateX(-3px); }
  60% { color: var(--naranja-luz); transform: translateX(3px); }
}
.boton[aria-busy="true"] { cursor: progress; }
.boton[disabled][aria-busy="true"] { opacity: .8; }

/* === Alertas (errores del servidor, encima de la barra) === */
.alertas {
  position: fixed;
  left: var(--e4);
  right: var(--e4);
  bottom: calc(var(--barra-alto) + var(--e3));
  z-index: 35;
  max-width: 560px;
  margin: 0 auto;
}
.sin-barra .alertas { bottom: calc(var(--e4) + env(safe-area-inset-bottom)); }
.alerta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: var(--e2) var(--e1) var(--e2) var(--e4);
  border: 1px solid var(--error-borde);
  border-radius: var(--r-m);
  background: var(--blanco);
  box-shadow: var(--sombra-m);
  animation: entra .2s ease-out;
}
@keyframes entra { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.alerta__icono { color: var(--error); }
.alerta__texto { flex: 1; padding: var(--e1) 0; font-size: 15px; font-weight: 600; line-height: 1.4; }
.alerta__lista { margin: 4px 0 0; padding-left: 1.1em; font-weight: 500; }
.alerta__lista li + li { margin-top: 2px; }
.alerta__accion { min-height: 44px; padding: 0 var(--e4); font-size: 14px; }
.alerta__cerrar { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: var(--texto-suave); cursor: pointer; }
.alerta__cerrar:hover { background: var(--papel); }
@media (max-width: 480px) {
  .alerta { flex-wrap: wrap; }
  .alerta__texto { flex-basis: calc(100% - 90px); }
  .alerta__accion { order: 4; margin: 0 0 var(--e1); }
}

/* === Pantallas especiales (se acabó el tiempo, reserva en curso, error de carga) === */
.pantalla { display: grid; justify-items: center; gap: var(--e3); max-width: 560px; margin: var(--e5) auto 0; padding: var(--e6) var(--e5); text-align: center; }
.pantalla__icono { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--naranja-suave); color: var(--naranja-texto); }
.pantalla__icono .icono { width: 36px; height: 36px; stroke-width: 2; }
.pantalla__titulo { font-size: 26px; line-height: 1.2; }
.sin-corte { white-space: nowrap; }
.pantalla__titulo:focus, .pantalla__pregunta:focus { outline: none; }
.pantalla__texto { max-width: 46ch; color: var(--texto-suave); }
.pantalla__acciones { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--e3); margin-top: var(--e2); }
.pantalla__confirmar { display: grid; gap: var(--e3); width: 100%; margin-top: var(--e2); padding: var(--e4); border-radius: var(--r-m); background: var(--papel); }
.pantalla__pregunta { font-weight: 700; }
.pantalla__confirmar .pantalla__acciones { margin-top: 0; }
@media (max-width: 480px) {
  .pantalla { padding: var(--e5) var(--e4); }
  .pantalla__acciones { flex-direction: column; align-self: stretch; }
}

/* === Formularios === */
.formulario { max-width: 760px; margin: 0 auto; }
.bloque { display: grid; gap: var(--e4); }
.bloque + .bloque { margin-top: var(--e4); }
.bloque__titulo { font-size: 20px; font-weight: 800; letter-spacing: -.3px; }
.rejilla { display: grid; gap: var(--e4); }
@media (min-width: 640px) {
  .rejilla { grid-template-columns: 1fr 1fr; gap: var(--e4) var(--e5); }
}
.campo { display: grid; gap: 6px; align-content: start; }
.campo__etiqueta { font-size: 14px; font-weight: 700; }
.campo__opcional { font-weight: 500; color: var(--texto-suave); }
.campo__control {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1.5px solid var(--borde-campo);
  border-radius: var(--r-s);
  background: var(--blanco);
  color: var(--texto);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.campo__control::placeholder { color: #8A847D; font-weight: 500; }
.campo__control:hover { border-color: var(--texto-suave); }
.campo__control:focus { outline: none; border-color: var(--naranja-hondo); box-shadow: 0 0 0 3px rgba(252, 128, 4, .3); }
.campo__control[aria-invalid="true"] { border-color: var(--error); }
.campo__control[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(179, 38, 30, .25); }
.campo__control--select {
  appearance: none;
  padding-right: 44px;
  background: var(--blanco) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%232B2B2B' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 14px center / 18px no-repeat;
}
.campo__error { font-size: 13.5px; font-weight: 700; color: var(--error); }
.campo__nota { font-size: 13px; color: var(--texto-suave); }
.trampa { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* === Buscador de institución (combobox) === */
.buscador { position: relative; }
.buscador__icono { position: absolute; left: 14px; top: 14px; color: var(--texto-suave); pointer-events: none; }
.buscador__control { padding-left: 44px; }
.buscador--fijo .buscador__control { border-style: solid; border-color: var(--azul); background: #F3F6FB; cursor: default; }
.buscador--fijo .buscador__control:focus { box-shadow: 0 0 0 3px rgba(82, 112, 156, .3); }
.buscador--fijo .buscador__icono { color: var(--azul-hondo); }
.buscador__lista {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 15;
  max-height: min(392px, 50vh);
  margin: 0;
  padding: 6px;
  overflow-y: auto;
  list-style: none;
  border: 1px solid var(--linea);
  border-radius: var(--r-m);
  background: var(--blanco);
  box-shadow: var(--sombra-m);
}
.buscador__lista[hidden] { display: none; }
.buscador__opcion {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: var(--e2) var(--e3);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
}
.buscador__opcion:hover { background: var(--papel); }
.buscador__opcion[aria-selected="true"] { background: var(--naranja-suave); box-shadow: inset 3px 0 0 var(--naranja); }

/* === Insignias y código Progrentis === */
.insignias { display: grid; gap: var(--e3); justify-items: start; }
.insignias:empty { display: none; }
.insignia {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 4px 14px 4px 10px;
  border-radius: 16px;
  background: var(--naranja);
  color: #1E1E1E;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}
.insignia .icono { width: 16px; height: 16px; stroke-width: 2.6; }
.insignia--verificada { padding-left: 14px; background: var(--azul-hondo); color: var(--blanco); }
.insignia--chica { min-height: 26px; margin-top: 6px; padding: 2px 10px 2px 8px; font-size: 12px; }
.insignia[hidden] { display: none; }
.enlace-discreto {
  justify-self: start;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--azul-hondo);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.codigo__zona { display: grid; gap: var(--e2); margin-top: calc(-1 * var(--e2)); }
.codigo__zona[hidden] { display: none; }
.codigo { display: grid; gap: var(--e2); padding: var(--e4); border-radius: var(--r-m); background: var(--papel); }
.codigo[hidden] { display: none; }
.codigo__fila { display: flex; flex-wrap: wrap; gap: var(--e2); }
.codigo__control { flex: 1 1 180px; width: auto; text-transform: uppercase; letter-spacing: 1px; }
.codigo__fila .boton { flex: none; }

/* === Ayuda: docentes === */
.ayuda { grid-template-columns: 1fr; align-items: center; background: linear-gradient(135deg, var(--blanco) 55%, var(--naranja-suave)); }
.ayuda__texto { display: grid; gap: var(--e1); }
.ayuda__entrada { display: flex; align-items: center; gap: var(--e3); }
.ayuda__control { width: 112px; text-align: center; font-size: 20px; font-weight: 800; }
.ayuda__unidad { font-size: 14px; font-weight: 700; color: var(--texto-suave); }
.ayuda__resultado { display: flex; align-items: center; gap: var(--e2); font-size: 17px; font-weight: 800; color: var(--naranja-texto); }
.ayuda__resultado:empty { display: block; margin-top: calc(-1 * var(--e4)); }
@media (min-width: 640px) {
  .ayuda { grid-template-columns: 1fr auto; }
  .ayuda__resultado { grid-column: 1 / -1; }
}

/* === Paso 2: productos y contadores === */
.compra { display: grid; gap: var(--e4); }
.compra__productos { display: grid; gap: var(--e4); align-content: start; }
@media (min-width: 900px) {
  .compra { grid-template-columns: minmax(0, 1fr) 340px; gap: var(--e5); align-items: start; }
}
.producto { display: grid; gap: var(--e4); }
.producto__cabeza { display: flex; align-items: center; gap: var(--e4); }
.glifo { flex: none; width: 38px; height: 57px; }
.glifo__sillas { fill: rgba(43, 43, 43, .2); }
.producto__texto { display: grid; justify-items: start; }
.producto__titulo { font-size: 22px; font-weight: 800; letter-spacing: -.4px; }
.producto__detalle { font-size: 14px; font-weight: 600; color: var(--texto-suave); }
.producto__pie { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--e3) var(--e4); padding-top: var(--e4); border-top: 1px solid var(--linea); }
.producto__cifras { display: grid; gap: 2px; }
.producto__cifras--pie { padding-top: var(--e3); border-top: 1px solid var(--linea); }
.producto__precio { font-size: 14px; font-weight: 600; color: var(--texto-suave); }
.producto__precio strong { font-size: 22px; font-weight: 800; letter-spacing: -.4px; color: var(--texto); }
.producto__subtotal { font-size: 14px; font-weight: 700; color: var(--naranja-texto); transition: opacity .2s ease; }
.producto__subtotal:empty { display: none; }
.producto__subtotal--viejo { opacity: .55; }
.producto__dias { display: grid; }
.dia-fila { display: flex; align-items: center; justify-content: space-between; gap: var(--e3); padding: var(--e3) 0; }
.dia-fila + .dia-fila { border-top: 1px solid var(--linea); }
.dia-fila__nombre { font-size: 16px; font-weight: 700; line-height: 1.25; }
.dia-fila__fecha { display: block; font-size: 13px; font-weight: 600; color: var(--texto-suave); }

.contador { flex: none; display: inline-flex; align-items: stretch; border: 1.5px solid var(--borde-campo); border-radius: var(--r-m); background: var(--blanco); overflow: hidden; }
.contador__boton { display: grid; place-items: center; width: 48px; min-height: 48px; padding: 0; border: 0; background: none; color: var(--texto); cursor: pointer; transition: background-color .15s ease; }
.contador__boton .icono { width: 20px; height: 20px; stroke-width: 2.8; }
.contador__boton:hover { background: var(--papel); }
.contador__boton:active { background: var(--naranja-suave); }
.contador__boton[aria-disabled="true"] { color: #B5AFA7; cursor: not-allowed; background: none; }
.contador__boton:focus-visible, .contador__valor:focus-visible { outline-offset: -3px; }
.contador__valor {
  width: 56px;
  min-height: 48px;
  padding: 0;
  border: 0;
  border-left: 1.5px solid var(--linea);
  border-right: 1.5px solid var(--linea);
  background: none;
  color: var(--texto);
  font: inherit;
  font-size: 20px;
  font-weight: 800;
  text-align: center;
  -moz-appearance: textfield;
  appearance: textfield;
}
.contador__valor::-webkit-outer-spin-button, .contador__valor::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.contador__valor:focus { outline: 3px solid var(--naranja); outline-offset: -3px; }

/* === Paso 2: solo la Edición especial (sin mesas ni sillas) === */
.solo-especial {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "arco texto" "boton boton";
  align-items: center;
  gap: var(--e4);
}
.solo-especial[hidden] { display: none; }
.solo-especial__arco {
  position: relative;
  width: 64px;
  height: 84px;
  overflow: hidden;
  grid-area: arco;
  border-radius: 32px 32px 10px 10px;
  background: radial-gradient(90% 70% at 50% 24%, rgba(214, 228, 248, .75), rgba(214, 228, 248, 0) 70%), linear-gradient(180deg, #86A3CD 0%, var(--azul) 45%, var(--azul-hondo) 100%);
}
.solo-especial__foto { position: absolute; left: 50%; top: 6px; width: 132%; max-width: none; height: auto; transform: translateX(-50%); }
.solo-especial__texto { grid-area: texto; display: grid; gap: 4px; }
.solo-especial__titulo { font-size: 18px; font-weight: 800; line-height: 1.25; letter-spacing: -.3px; text-wrap: balance; }
.solo-especial__detalle { font-size: 14px; font-weight: 600; line-height: 1.45; color: var(--texto-suave); text-wrap: pretty; }
.solo-especial__boton { grid-area: boton; padding-inline: var(--e4); }
@media (min-width: 480px) {
  .solo-especial { grid-template-areas: "arco texto" "arco boton"; gap: var(--e3) var(--e4); }
  .solo-especial__arco { align-self: start; }
  .solo-especial__boton { justify-self: start; }
}

/* === Paso 2: resumen tipo boleto === */
.boleto { position: relative; padding: var(--e5); border-radius: var(--r-l); background: var(--grafito); color: var(--blanco); box-shadow: var(--sombra-m); }
@media (min-width: 900px) {
  .boleto { position: sticky; top: var(--e4); }
}
.boleto::before { content: ""; position: absolute; left: var(--e5); top: 0; width: 30px; height: 5px; border-radius: 0 0 3px 3px; background: var(--naranja); }
.boleto__titulo { font-size: 13px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: var(--naranja-luz); }
.boleto__lineas { display: grid; gap: var(--e3); margin: var(--e4) 0 0; padding: 0; list-style: none; transition: opacity .2s ease; }
.boleto__linea { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--e3); }
.boleto__concepto { font-size: 14px; font-weight: 600; line-height: 1.35; color: rgba(255, 255, 255, .92); }
.boleto__cantidad { display: block; margin-top: 2px; font-size: 12.5px; color: rgba(255, 255, 255, .7); }
.boleto__monto { flex: none; font-size: 15px; font-weight: 800; }
.boleto__vacio { font-size: 14px; color: rgba(255, 255, 255, .72); }
.boleto__corte { position: relative; height: 0; margin: var(--e5) calc(-1 * var(--e5)); border-top: 2px dashed rgba(255, 255, 255, .28); }
.boleto__corte::before, .boleto__corte::after { content: ""; position: absolute; top: -12px; width: 22px; height: 22px; border-radius: 50%; background: var(--papel); }
.boleto__corte::before { left: -11px; }
.boleto__corte::after { right: -11px; }
.boleto__cifras { display: grid; grid-template-columns: 1fr auto; gap: var(--e2) var(--e3); margin: 0; transition: opacity .2s ease; }
.boleto__cifras:empty { display: none; }
.boleto__cifras dt { font-size: 14px; font-weight: 600; color: rgba(255, 255, 255, .75); }
.boleto__cifras dd { margin: 0; font-size: 14px; font-weight: 700; text-align: right; }
.boleto__cifras .boleto__total { padding-top: var(--e2); font-size: 22px; font-weight: 800; letter-spacing: -.4px; color: var(--blanco); }
.boleto__cifras dt.boleto__total { font-size: 16px; align-self: end; }
.boleto--viejo .boleto__lineas, .boleto--viejo .boleto__cifras { opacity: .55; }

/* === Mapa del salón: croquis a escala, estados, zoom y leyenda === */
.mapa {
  --mapa-libre: var(--naranja);
  --mapa-libre-borde: var(--naranja-texto);   /* el contorno de lo libre: 3:1 o más sobre el piso */
  --mapa-silla: rgba(43, 43, 43, .2);
  --mapa-vendida: #D9D4CD;
  --mapa-ocupada: var(--borde-campo);
  display: grid;
  gap: var(--e3);
}
.mapa--B { --mapa-libre: var(--azul); --mapa-libre-borde: #2D4468; }
.mapa__herramientas { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--e2); }
.mapa__zoom { width: 44px; padding: 0; }
.mapa__zoom .icono { width: 20px; height: 20px; stroke-width: 2.8; }
.mapa__todo { padding: 0 var(--e4); }
.mapa__visor {
  position: relative;
  aspect-ratio: var(--proporcion);
  width: min(100%, calc(72vh * var(--proporcion)));
  width: min(100%, calc(72svh * var(--proporcion)));
  margin-inline: auto;
  overflow: hidden;
  border-radius: var(--r-m);
  background: var(--blanco);
  box-shadow: inset 0 0 0 1px var(--linea);
  touch-action: none;                          /* con zoom: un dedo mueve el mapa, dos lo amplían */
}
.mapa__visor--entero { touch-action: pan-y; } /* sin zoom: un dedo desplaza la página */
.mapa__visor:not(.mapa__visor--entero) { cursor: grab; }   /* con zoom, la vista se puede arrastrar */
.mapa__visor--arrastrando, .mapa__visor--arrastrando .esp--tocable { cursor: grabbing; }
.mapa__svg { width: 100%; height: 100%; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.mapa__svg text { font-family: var(--fuente); }
.mapa__svg:focus { outline: none; }
.mapa__svg:focus-visible { outline: 3px solid var(--naranja-hondo); outline-offset: -3px; }   /* el mapa sin nada tocable recibe el foco */
.mapa__aviso { min-height: 1.4em; font-size: 14px; font-weight: 600; text-align: center; color: var(--texto-suave); }
.mapa__aviso:empty { min-height: 0; }

/* Plano: piso, muros, accesos, tarima y pantalla */
.mapa__piso { fill: rgba(82, 112, 156, .06); }
.mapa__muro { fill: none; stroke: var(--texto); stroke-width: 4; stroke-linecap: square; }
.mapa__puerta { fill: none; stroke: rgba(43, 43, 43, .55); stroke-width: 1.2; stroke-dasharray: 3 2.5; }
.mapa__tarima { fill: rgba(82, 112, 156, .14); stroke: rgba(58, 86, 130, .55); stroke-width: 1.2; }
.mapa__pantalla { stroke: var(--azul-hondo); stroke-width: 4; stroke-linecap: round; }
.mapa__rotulo-pantalla { fill: var(--texto-suave); }
.mapa__rotulo { fill: var(--texto); }
.mapa__cartel { fill: var(--texto); }
.mapa__cartel-texto { fill: var(--naranja-luz); }
.mapa__rayas-fondo { fill: var(--mapa-ocupada); }
.mapa__rayas-raya { fill: rgba(255, 255, 255, .6); }

/* Espacios (mesas y sillas). El color dice el estado y una segunda señal lo confirma:
   libre = contorno, tuya = ✓ y borde grueso, vendida = ✕, alguien la está comprando = rayas. */
.esp { outline: none; }
.esp--tocable { cursor: pointer; }
.esp__sillas { fill: var(--mapa-silla); }
.esp__placa { fill: var(--blanco); }
.esp__placa--vip { fill: var(--naranja-luz); }
.esp__numero { fill: var(--texto); }
.esp__toque { fill: none; pointer-events: all; }
.esp__anillo, .esp__si, .esp__no, .esp__foco { display: none; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.esp__anillo { stroke: var(--texto); stroke-width: 3; }
.esp[data-tipo="silla"] .esp__anillo { stroke-width: 2; }
.esp__si { stroke: var(--blanco); stroke-width: 2.2; }
.esp__no { stroke: var(--texto-suave); stroke-width: 2; }
.esp[data-tipo="silla"] .esp__si, .esp[data-tipo="silla"] .esp__no { stroke-width: 1.6; }
.esp__foco { stroke: var(--naranja-hondo); stroke-width: 3; }
.esp:focus-visible .esp__foco { display: inline; }

.esp--cargando .esp__cuerpo { fill: var(--linea); }
.esp--libre .esp__cuerpo { fill: var(--mapa-libre); stroke: var(--mapa-libre-borde); stroke-width: 2; }
.esp--tuya .esp__cuerpo { fill: var(--texto); }
.esp--tuya .esp__anillo, .esp--tuya .esp__si { display: inline; }
.esp--vendida .esp__cuerpo { fill: var(--mapa-vendida); }
.esp--vendida .esp__no { display: inline; }
.esp--vip .esp__cuerpo { fill: var(--texto); }
.esp--verde .esp__cuerpo { fill: var(--verde-silla); }
/* apartada (rayas) y honor (dorado) llevan el relleno como atributo: patrón y degradado del propio SVG */
@media (hover: hover) {
  .esp--tocable:hover .esp__cuerpo { stroke-width: 3.5; }
}
/* En modo silla, las mesas que se venden completas quedan de fondo */
.mapa--silla .esp[data-tipo="mesa"], .mapa--silla .esp[data-tipo="vip"], .mapa--silla .esp[data-tipo="honor"] { opacity: .3; }

/* Leyenda: los mismos símbolos del mapa */
.mapa__leyenda { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--e2) var(--e4); margin: 0; padding: 0; list-style: none; font-size: 13px; font-weight: 600; line-height: 1.25; color: var(--texto-suave); }
.mapa__leyenda li { display: flex; align-items: center; gap: var(--e2); }
.mapa__glifo { flex: none; width: 20px; height: 28px; }

/* === Reloj de la compra (15 minutos, arriba de todo) === */
.reloj { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--e1) var(--e3); min-height: 40px; transition: background-color .3s ease; }
.reloj__texto { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 6px; }
.reloj__icono { width: 18px; height: 18px; }
.reloj__cifra { min-width: 3.2em; font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; text-align: left; }
.reloj__extender { min-height: 44px; padding: 0 var(--e4); border-color: var(--blanco); background: var(--blanco); color: var(--error); font-size: 14px; }
.reloj__extender[hidden] { display: none; }
.reloj__extender:hover { background: var(--error-suave); }
.reloj__extender[aria-busy="true"] { cursor: progress; }
.reloj:focus { outline: none; }
.reloj :focus-visible { outline: 3px solid var(--blanco); outline-offset: 2px; }
/* La barra ocupa todo el ancho: el contorno va por dentro para que se vea */
.reloj:focus-visible { outline: 3px solid var(--blanco); outline-offset: -5px; }

/* === Paso 3: talleres y lugares === */
/* Sin anclaje de desplazamiento del navegador: lugares.js mantiene quieto el mapa (mapaQuieto) y no deben sumarse */
.lugares { display: grid; gap: var(--e4); overflow-anchor: none; }

/* Pestañas por mesa (se desplazan de lado cuando hay muchas) */
.pestanas {
  position: relative;
  display: flex;
  gap: var(--e1);
  margin: 0 -6px;
  padding: 6px 6px 0;
  overflow-x: auto;
  scrollbar-width: thin;
  border-bottom: 1.5px solid var(--linea);
}
.pestana {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 48px;
  padding: 0 var(--e4);
  border: 0;
  border-radius: var(--r-s) var(--r-s) 0 0;
  background: none;
  color: var(--texto-suave);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: inset 0 -3px 0 transparent;
  transition: color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.pestana:hover { color: var(--texto); background: rgba(43, 43, 43, .05); }
.pestana[aria-selected="true"] { color: var(--texto); box-shadow: inset 0 -3px 0 var(--naranja); }
.pestana:focus-visible { outline-offset: -3px; }
.pestana__listo { display: none; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--exito); color: var(--blanco); }
.pestana__listo .icono { width: 12px; height: 12px; stroke-width: 3.4; }
.pestana--lista .pestana__listo { display: grid; }

/* Chips de día */
.lugares__panel { display: grid; gap: var(--e4); }
.dias { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--e2); max-width: 480px; }
.dia-chip {
  position: relative;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0 6px;
  min-height: 44px;
  padding: 4px var(--e2);
  border: 1.5px solid var(--borde-campo);
  border-radius: var(--r-pastilla);
  background: var(--blanco);
  color: var(--texto);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.dia-chip:hover { border-color: var(--texto); }
.dia-chip[aria-pressed="true"] { border-color: var(--fondo); background: var(--fondo); color: var(--blanco); }
.dia-chip__cuenta { font-size: 12.5px; font-weight: 600; }
.dia-chip__cuenta:empty { display: none; }
.dia-chip__listo { position: absolute; top: -6px; right: -4px; display: none; place-items: center; width: 20px; height: 20px; border: 2px solid var(--papel); border-radius: 50%; background: var(--exito); color: var(--blanco); }
.dia-chip__listo .icono { width: 12px; height: 12px; stroke-width: 3.4; }
.dia-chip--listo .dia-chip__listo { display: grid; }

/* Vista del día: a la izquierda los talleres y lo tuyo, a la derecha (o debajo, en el teléfono) el mapa */
.dia-vista { display: grid; gap: var(--e4); }
.dia-vista__elegir { display: grid; gap: var(--e3); align-content: start; }
.dia-vista__titulo { font-size: 22px; font-weight: 800; letter-spacing: -.4px; }
.dia-vista__titulo:focus { outline: none; }
.dia-vista__guia { color: var(--texto-suave); }
@media (min-width: 900px) {
  .dia-vista { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--e5); align-items: start; }
}

/* Tarjetas de taller, como las del PDF: busto del expositor, color del salón, título con corte y bandera */
.talleres { display: grid; gap: var(--e3); }
.taller {
  position: relative;
  display: flex;
  align-items: stretch;
  min-height: 136px;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: var(--r-m);
  color: var(--texto);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.taller--A { background: linear-gradient(90deg, rgba(252, 128, 4, .26), rgba(252, 128, 4, .1)) var(--blanco); box-shadow: inset 4px 0 0 var(--naranja); }
.taller--B { background: linear-gradient(90deg, rgba(82, 112, 156, .3), rgba(82, 112, 156, .1)) var(--blanco); box-shadow: inset 4px 0 0 var(--azul); }
.taller:hover { border-color: rgba(43, 43, 43, .35); }
.taller[aria-pressed="true"] { border-color: var(--texto); }
.taller__bustos { position: relative; flex: none; display: flex; align-items: flex-end; width: 96px; }
.taller--duo .taller__bustos { width: 128px; }
.taller__busto { position: relative; flex: 1; align-self: stretch; overflow: hidden; }
/* La foto siempre llega al borde de abajo: si la tarjeta es más alta que la foto (título de tres líneas), crece
   desde arriba (cover) en vez de dejar ver el fondo debajo del busto. --arriba: el aire sobre la cabeza. */
.taller__foto { --arriba: 10px; position: absolute; top: var(--arriba); left: 50%; width: 140px; min-height: calc(100% - var(--arriba)); max-width: none; height: auto; object-fit: cover; object-position: 50% 0; transform: translateX(-50%); filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .25)); }
.taller__foto--emilio { width: 160px; --arriba: 8px; }
.taller__foto--floren { width: 112px; }
.taller__foto--marcos { width: 118px; }
.taller__foto--michael { width: 122px; }
.taller__foto--guillermina { width: 112px; --arriba: 0px; }
.taller--duo .taller__foto { width: 104px; }
.taller--duo .taller__foto--michael { width: 108px; }
.taller__texto { flex: 1; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px; min-width: 0; padding: var(--e3) 40px var(--e3) var(--e3); }
.taller__salon { min-height: 22px; letter-spacing: .4px; text-transform: uppercase; }
.taller__titulo { font-size: 17px; font-weight: 800; line-height: 1.2; letter-spacing: -.3px; }
.taller__expositores { display: grid; gap: 2px; }
.taller__expositor { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--texto-suave); }
.taller__bandera { flex: none; width: 20px; height: 14px; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px rgba(43, 43, 43, .2); }
.taller__pie { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--e2); }
.taller__quedan { font-size: 13px; font-weight: 700; color: var(--texto); }
.taller__quedan:empty { display: none; }
.taller__tuyo { display: inline-flex; align-items: center; min-height: 22px; padding: 0 10px; border-radius: var(--r-pastilla); background: var(--texto); color: var(--blanco); font-size: 12px; font-weight: 800; }
.taller__tuyo[hidden] { display: none; }
.taller__marca { position: absolute; top: var(--e3); right: var(--e3); display: none; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--texto); color: var(--blanco); }
.taller__marca .icono { width: 16px; height: 16px; stroke-width: 3; }
.taller[aria-pressed="true"] .taller__marca { display: grid; }
/* Con 1 mesa, el taller del otro salón ese día queda cerrado hasta quitar la mesa (lugares.js). Se puede tocar: Nate explica. */
.taller--cerrado { background: #EEEBE7; box-shadow: inset 4px 0 0 var(--borde-campo); cursor: not-allowed; }
.taller--cerrado:hover { border-color: transparent; }
.taller--cerrado .taller__foto { filter: grayscale(1); opacity: .5; }
.taller--cerrado .taller__salon, .taller--cerrado .taller__titulo, .taller--cerrado .taller__expositores { opacity: .55; }
.taller--cerrado .taller__marca { display: grid; background: var(--texto-suave); }
.taller--cerrado .taller__marca .icono { stroke-width: 2.4; }
@media (max-width: 380px) {
  .taller__bustos { width: 84px; }
  .taller--duo .taller__bustos { width: 104px; }
  .taller__titulo { font-size: 16px; }
}

/* Lo que ya es tuyo ese día, con "Quitar" */
.tuyo { display: grid; gap: var(--e2); padding: var(--e3) var(--e4); border-radius: var(--r-m); background: var(--blanco); box-shadow: var(--sombra-s); }
.tuyo--vacio { padding: 0; background: none; box-shadow: none; color: var(--texto-suave); }
.tuyo:focus { outline: none; }
.tuyo:focus-visible { outline: 3px solid var(--naranja); outline-offset: 2px; }
.tuyo__fila { display: flex; align-items: center; gap: var(--e3); }
.tuyo__marca { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--texto); color: var(--blanco); }
.tuyo__marca .icono { width: 14px; height: 14px; stroke-width: 3; }
.tuyo__texto { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; line-height: 1.35; }
.tuyo__taller { display: block; font-size: 13px; font-weight: 500; color: var(--texto-suave); }
.tuyo__quitar { flex: none; min-height: 44px; }
.tuyo__nota { font-size: 13px; color: var(--texto-suave); }
.tuyo__lista { display: grid; gap: var(--e1); margin: 0; padding: 0; list-style: none; }

/* Zona del mapa: en el teléfono ocupa todo el ancho de la pantalla */
.lugares__mapa { position: relative; margin-inline: calc(-1 * var(--e4)); padding: var(--e4) 0; background: var(--blanco); box-shadow: var(--sombra-s); scroll-margin-top: var(--e4); }
.lugares__mapa .mapa__herramientas, .lugares__mapa .mapa__aviso, .lugares__mapa .mapa__leyenda, .lugares__pista { padding-inline: var(--e4); }
.lugares__mapa .mapa__visor { border-radius: 0; box-shadow: inset 0 1px 0 var(--linea), inset 0 -1px 0 var(--linea); }
.lugares__mapa--vacio { display: none; }
.lugares__pista { color: var(--texto-suave); text-align: center; }
.lugares__pista[hidden] { display: none; }
.atajo { display: flex; width: calc(100% - 2 * var(--e4)); margin: 0 auto var(--e3); }
.atajo[hidden] { display: none; }
@media (min-width: 600px) {
  .lugares__mapa { margin-inline: 0; padding: var(--e4); border-radius: var(--r-l); }
  .lugares__mapa .mapa__herramientas, .lugares__mapa .mapa__aviso, .lugares__mapa .mapa__leyenda, .lugares__pista { padding-inline: 0; }
  .lugares__mapa .mapa__visor { border-radius: var(--r-m); box-shadow: inset 0 0 0 1px var(--linea); }
  .atajo { width: 100%; }
}
@media (min-width: 900px) {
  .lugares__mapa--vacio { display: grid; place-items: center; min-height: 320px; border: 2px dashed var(--linea); background: none; box-shadow: none; }
}

/* Tarjetita de confirmación: pegada arriba del mapa visible (debajo del reloj), nunca sobre la barra de abajo */
.confirmar-ancla { position: sticky; top: calc(var(--alto-reloj, 40px) + var(--e5)); z-index: 12; height: 0; }   /* justo debajo del reloj, mida lo que mida */
.confirmar {
  position: absolute;
  top: var(--e2);
  left: var(--e3);
  right: var(--e3);
  display: grid;
  gap: var(--e3);
  max-width: 440px;
  margin: 0 auto;
  padding: var(--e4);
  border-top: 4px solid var(--naranja);
  border-radius: var(--r-m);
  background: var(--blanco);
  box-shadow: var(--sombra-m), 0 0 0 1px rgba(20, 20, 20, .08);
  animation: entra .2s ease-out;
}
.confirmar__pregunta { font-size: 17px; font-weight: 800; line-height: 1.3; }
.confirmar__nota { margin-top: calc(-1 * var(--e2)); font-size: 14px; color: var(--texto-suave); }
.confirmar__acciones { display: flex; flex-wrap: wrap; gap: var(--e2); }
.confirmar__acciones .boton { flex: 1 1 120px; }
.confirmar .boton[aria-busy="true"] { opacity: .8; cursor: progress; }
.confirmar--error, .confirmar--info { grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: var(--e2) var(--e1) var(--e2) var(--e4); }
.confirmar--error { border-top-color: var(--error); }
.confirmar--info { border-top-color: var(--azul); }
.confirmar__icono { color: var(--error); }
.confirmar--info .confirmar__icono { color: var(--azul-hondo); }
.confirmar__texto { font-size: 15px; font-weight: 700; line-height: 1.35; }
.confirmar__cerrar { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: var(--texto-suave); cursor: pointer; }
.confirmar__cerrar:hover { background: var(--papel); }

/* === Paso 4: Edición especial (el pase del PDF: fondo oscuro, titular naranja y arco con Emilio) === */
.especial { max-width: 880px; overflow: hidden; border-radius: var(--r-l); background: var(--blanco); box-shadow: var(--sombra-m); }
.especial__pase {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "texto arco" "datos datos";
  gap: var(--e4);
  padding: var(--e5);
  color: var(--blanco);
  background:
    radial-gradient(420px 300px at 100% 0%, rgba(252, 128, 4, .3), rgba(252, 128, 4, 0) 70%),
    radial-gradient(380px 320px at 0% 100%, rgba(82, 112, 156, .42), rgba(82, 112, 156, 0) 70%),
    #171717;
}
/* Muescas de tiquete donde el pase se une con la parte blanca */
.especial__pase::before, .especial__pase::after { content: ""; position: absolute; bottom: -11px; width: 22px; height: 22px; border-radius: 50%; background: var(--papel); }
.especial__pase::before { left: -11px; }
.especial__pase::after { right: -11px; }
.especial__texto { grid-area: texto; display: grid; align-content: start; gap: var(--e2); }
.especial__kicker { font-size: 14px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: var(--naranja-luz); }
.especial__titulo { font-size: 26px; font-weight: 800; line-height: 1.05; letter-spacing: -.6px; }
.especial__acento { color: var(--naranja); }
.especial__arco {
  grid-area: arco;
  position: relative;
  width: 108px;
  height: 140px;
  overflow: hidden;
  border-radius: 54px 54px 14px 14px;
  background: radial-gradient(90% 70% at 50% 24%, rgba(214, 228, 248, .75), rgba(214, 228, 248, 0) 70%), linear-gradient(180deg, #86A3CD 0%, var(--azul) 45%, var(--azul-hondo) 100%);
}
.especial__foto { position: absolute; left: 50%; top: 10px; width: 132%; max-width: none; height: auto; transform: translateX(-50%); }
.especial__arco::after { content: ""; position: absolute; inset: auto 0 0; height: 56%; background: linear-gradient(180deg, rgba(23, 23, 23, 0), rgba(23, 23, 23, .92) 75%); }
.especial__quien { position: absolute; left: 4px; right: 4px; bottom: 8px; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2px 6px; font-size: 12px; font-weight: 800; line-height: 1.1; text-align: center; }
.especial__bandera { flex: none; width: 20px; height: 14px; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .9); }
.especial__datos { grid-area: datos; display: grid; gap: var(--e3); margin: 0; padding: 0; list-style: none; }
.especial__dato { display: flex; align-items: center; gap: var(--e3); font-size: 15px; font-weight: 700; line-height: 1.3; }
.especial__dato-icono { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(82, 112, 156, .24); box-shadow: inset 0 0 0 1.5px rgba(126, 156, 200, .75); color: #B4C8E6; }
.especial__compra { display: grid; gap: var(--e4); padding: var(--e5); }
.especial__fila { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--e3) var(--e4); }
.especial__personas { display: flex; align-items: center; gap: var(--e3); }
.especial__etiqueta { font-size: 16px; font-weight: 700; }
.especial__acciones { display: flex; flex-wrap: wrap; gap: var(--e3); }
.especial__acciones .boton { flex: 1 1 160px; }
.especial__pista { margin-top: calc(-1 * var(--e2)); }
/* Al tocar + nada se mueve (si no, el segundo toque cae en otro lado): el subtotal tiene su renglón desde el
   principio y la pista, al esconderse, guarda su lugar */
.especial__compra > .producto__subtotal { min-height: 1.45em; line-height: 1.45; }
.especial__compra > .producto__subtotal:empty { display: block; }
.especial__pista[hidden] { display: block; visibility: hidden; }
@media (min-width: 640px) {
  .especial__pase { grid-template-areas: "texto arco" "datos arco"; gap: var(--e4) var(--e6); padding: var(--e6); }
  .especial__titulo { font-size: 40px; }
  .especial__arco { width: 220px; height: 290px; border-radius: 110px 110px 20px 20px; align-self: end; }
  .especial__foto { top: 14px; width: 120%; }
  .especial__quien { bottom: 18px; font-size: 20px; gap: 9px; letter-spacing: -.4px; }
  .especial__bandera { width: 28px; height: 20px; }
  .especial__compra { padding: var(--e5) var(--e6) var(--e6); }
  .especial__acciones .boton { flex: 0 1 auto; min-width: 160px; }
}

/* === Paso 5: resumen tipo tiquete, facturación y método de pago === */
.pago { display: grid; gap: var(--e4); }
@media (min-width: 900px) {
  .pago { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--e5); align-items: start; }
}
.pago__tiempo { margin-bottom: var(--e4); }
.pago__formulario { display: grid; gap: var(--e4); }
.pago__formulario .bloque + .bloque { margin-top: 0; }

/* El tiquete: el mismo boleto oscuro del paso 2, con los lugares de cada mesa y cada día */
.boleto__cabeza { display: grid; gap: 2px; margin-top: var(--e2); }
.boleto__institucion { font-size: 18px; font-weight: 800; line-height: 1.25; letter-spacing: -.3px; }
.boleto__codigo { font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .75); }
.boleto__codigo strong { color: var(--naranja-luz); letter-spacing: .6px; }
.boleto__grupo { margin-top: var(--e5); }
.boleto__subtitulo { font-size: 13px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: var(--naranja-luz); }
.boleto__lugares { display: grid; margin: var(--e2) 0 0; padding: 0; list-style: none; }
.boleto__lugar { display: grid; gap: 2px; padding: var(--e2) 0; border-top: 1px solid rgba(255, 255, 255, .14); }
.boleto__dia { font-size: 14px; font-weight: 800; }
.boleto__taller { font-size: 13.5px; font-weight: 600; line-height: 1.3; color: rgba(255, 255, 255, .85); }
.boleto__donde { font-size: 13px; font-weight: 700; color: var(--naranja-luz); }
/* Por día (boleto.js): la fecha con sus personas a la derecha y, en cada taller, el título, quién y los lugares. */
.boleto__subtitulo--dia { display: flex; justify-content: space-between; align-items: baseline; gap: var(--e2); }
.boleto__personas { font-size: 12.5px; font-weight: 600; letter-spacing: 0; text-transform: none; color: rgba(255, 255, 255, .72); white-space: nowrap; }
.boleto__cuando { font-size: 12.5px; font-weight: 700; color: var(--naranja-luz); }
.boleto__taller-titulo { font-size: 14px; font-weight: 800; line-height: 1.3; }
.boleto__lugar--falta .boleto__donde { color: #FFD6A8; font-weight: 600; }
.boleto--pago .boleto__lineas { margin-top: 0; }
.boleto--pago .boleto__cifras { margin-top: var(--e4); padding-top: var(--e3); border-top: 1px solid rgba(255, 255, 255, .14); }

/* Nombres para el certificado (pasos/nombres.js): un grupo por mesa, por día de sillas y por la Edición especial */
.nombres__cabeza { display: grid; gap: var(--e2); }
.nombres__nota { margin: 0; font-size: 15px; line-height: 1.5; }
.nombres__nota strong { color: var(--naranja-texto); }
.nombres__cuenta { margin: 0; font-size: 14px; font-weight: 700; color: var(--texto-suave); }
.nombres__cuenta--lista { color: var(--exito); }
.nombres__grupo { min-width: 0; margin: 0; padding: var(--e4) 0 0; border: 0; border-top: 1px solid var(--linea); }
.nombres__titulo { padding: 0; font-size: 16px; font-weight: 800; }
.nombres__detalle { margin: 2px 0 0; }
.nombres__intro { margin: 4px 0 0; font-size: 14px; font-weight: 600; color: var(--texto-suave); }
.nombres__cursos { display: grid; gap: 6px; margin: var(--e2) 0 0; padding: 0; list-style: none; }
.nombres__curso { display: grid; grid-template-columns: 5.5em minmax(0, 1fr); column-gap: var(--e2); padding: 8px 12px; border-radius: var(--r-s); background: var(--papel); font-size: 14px; line-height: 1.35; }
.nombres__curso-dia { grid-row: span 2; font-weight: 800; color: var(--naranja-texto); }
.nombres__curso-titulo { font-weight: 700; }
.nombres__curso-con { font-size: 13px; color: var(--texto-suave); }
/* Tiquete: los nombres que faltan (aviso), la lista guardada y el formulario para completarlos */
.tq__nombres { display: grid; gap: var(--e3); padding: var(--e5); border-radius: var(--r-l); background: var(--blanco); box-shadow: var(--sombra-s); }
.tq__nombres h2 { outline: none; font-size: 20px; font-weight: 800; }
.tq__nombres p { margin: 0; }
.tq__nombres--faltan { border: 2px solid var(--naranja); background: var(--naranja-suave); }
.tq__nombres--form { padding: 0; background: none; box-shadow: none; }
.tq__nombres-form { display: grid; gap: var(--e4); }
.tq__nombres-grupos { display: grid; gap: var(--e4); }
.tq__nombres-grupo h3 { font-size: 16px; font-weight: 800; }
.tq__nombres-lista { display: grid; gap: 4px; margin: var(--e2) 0 0; padding-left: 1.2em; font-weight: 600; }
.nombres__rejilla { display: grid; gap: var(--e3); margin-top: var(--e3); }
@media (min-width: 560px) {
  .nombres__rejilla { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.nombres__pegar { border-radius: var(--r-m); background: var(--papel); padding: var(--e3) var(--e4); }
.nombres__pegar summary { cursor: pointer; font-size: 14px; font-weight: 700; color: var(--azul-hondo); }
.nombres__pegar-cuerpo { display: grid; gap: var(--e2); justify-items: start; margin-top: var(--e3); }
.nombres__lista { width: 100%; min-height: 120px; resize: vertical; font: inherit; line-height: 1.5; }
.nombres__despues { display: grid; gap: var(--e2); }
.nombres__aviso { font-weight: 600; }
.aviso[hidden] { display: none; }

/* Facturación */
.bloque__cabeza { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--e3); }
.bloque__atajo { display: grid; justify-items: start; gap: 4px; }
.boton--chico { min-height: 44px; padding: 0 var(--e4); font-size: 14px; }

/* Método de pago: dos tarjetas grandes con su radio */
.metodos { display: grid; gap: var(--e3); }
@media (min-width: 560px) and (max-width: 899px) {   /* lado a lado solo cuando el formulario va a todo el ancho */
  .metodos { grid-template-columns: 1fr 1fr; }
}
.metodos[aria-invalid="true"] .metodo { border-color: var(--error); }
.metodo {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: var(--e3);
  min-height: 112px;
  padding: var(--e4) 52px var(--e4) var(--e4);
  border: 2px solid var(--linea);
  border-radius: var(--r-m);
  background: var(--blanco);
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.metodo:hover { border-color: var(--borde-campo); }
.metodo:has(.metodo__radio:checked) { border-color: var(--texto); background: var(--naranja-suave); box-shadow: inset 0 0 0 1px var(--texto); }
.metodo:has(.metodo__radio:focus-visible) { outline: 3px solid var(--naranja); outline-offset: 2px; }
.metodo__radio { position: absolute; top: var(--e4); right: var(--e4); width: 22px; height: 22px; margin: 0; accent-color: var(--texto); cursor: inherit; }
/* el anillo pasa a la tarjeta solo donde :has existe; sin :has, el radio conserva el suyo */
@supports selector(:has(*)) {
  .metodo__radio:focus-visible { outline: none; }
}
.metodo__icono { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--papel); color: var(--texto); }
.metodo__icono .icono { width: 24px; height: 24px; }
.metodo__texto { display: grid; gap: 4px; }
.metodo__nombre { font-size: 17px; font-weight: 800; line-height: 1.25; }
.metodo__detalle { font-size: 14px; font-weight: 500; line-height: 1.4; color: var(--texto-suave); }
.metodo--no { cursor: not-allowed; border-style: dashed; background: var(--papel); }
.metodo--no:hover { border-color: var(--linea); }
.metodo--no .metodo__nombre { color: var(--texto-suave); }
.metodo--no .metodo__detalle { font-weight: 700; color: var(--texto); }
.metodo--no .metodo__icono { background: var(--blanco); color: var(--texto-suave); }
.metodo__pronto { display: inline-block; margin-left: var(--e2); padding: 2px 10px; border-radius: 999px; background: var(--naranja); color: var(--texto); font-size: 13px; font-weight: 800; line-height: 1.5; vertical-align: 2px; }

/* Transferencia: el aviso de 4 horas, imposible de pasar por alto */
.temporal { display: grid; gap: var(--e3); }
.temporal[hidden] { display: none; }
.temporal__aviso { display: flex; align-items: flex-start; gap: var(--e3); padding: var(--e4); border: 2px solid var(--naranja-hondo); border-radius: var(--r-m); background: var(--naranja-suave); animation: entra .2s ease-out; }
.temporal__icono { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--naranja); color: #1E1E1E; }
.temporal__icono .icono { width: 26px; height: 26px; stroke-width: 2.4; }
.temporal__texto { display: grid; gap: var(--e2); font-size: 15.5px; line-height: 1.45; }
.temporal__texto strong { font-weight: 800; }
.temporal__plazo { font-size: 14px; font-weight: 700; color: var(--naranja-texto); }

/* Casillas obligatorias (reserva temporal y condiciones) */
.casilla { display: flex; align-items: flex-start; gap: var(--e3); min-height: 44px; padding: 10px 0; font-size: 15px; font-weight: 700; line-height: 1.35; cursor: pointer; }
.casilla__control { flex: none; width: 24px; height: 24px; margin: -2px 0 0; accent-color: var(--texto); cursor: pointer; }
.casilla__control[aria-invalid="true"] { outline: 2px solid var(--error); outline-offset: 2px; }
.casilla--fuerte { padding: var(--e3) var(--e4); border-radius: var(--r-m); background: var(--papel); }
.condiciones { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--e4); padding-top: var(--e2); border-top: 1px solid var(--linea); }

/* Ventana de las condiciones de compra (dialog con showModal) */
.modal { width: min(520px, calc(100vw - 2 * var(--e4))); max-height: calc(100vh - 2 * var(--e4)); padding: 0; border: 0; border-radius: var(--r-l); background: var(--blanco); color: var(--texto); box-shadow: var(--sombra-m); }
.modal[open] { animation: entra .2s ease-out; }
.modal::backdrop { background: rgba(20, 20, 20, .55); }
.modal__cuerpo { display: grid; gap: var(--e4); padding: var(--e5); }
.modal__titulo { font-size: 22px; font-weight: 800; }
.modal__acciones { display: flex; justify-content: flex-end; }
/* Un texto largo (las condiciones de compra) se desplaza por dentro: el título y Cerrar quedan a la vista. */
.modal--texto .modal__cuerpo { max-height: inherit; grid-template-rows: auto minmax(0, 1fr) auto; }
.modal__texto { display: grid; gap: var(--e3); overflow-y: auto; overscroll-behavior: contain; }
.modal__texto p { white-space: pre-line; }
html:has(.modal[open]) { overflow: hidden; }

/* === Movimiento reducido === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* === Tiquete (/tiquete/<token>) === */
.tiquete { display: grid; gap: var(--e5); align-content: start; }
.tq__cabeza { display: grid; gap: var(--e2); }
.tq__marca { font-size: 13px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: var(--naranja-texto); }
.tq__titulo { outline: none; }
.tq__bajada { font-size: 16px; color: var(--texto-suave); }
.tq__acciones { display: flex; flex-wrap: wrap; gap: var(--e3); }
.tq__espera { display: flex; align-items: center; gap: var(--e2); color: var(--texto-suave); font-weight: 600; }

.tq__codigo { display: grid; gap: var(--e1); justify-items: start; padding: var(--e5); border-radius: var(--r-l); background: var(--blanco); border: 2px solid var(--naranja); box-shadow: var(--sombra-s); }
.tq__codigo-etiqueta { font-size: 13px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: var(--texto-suave); }
.tq__codigo-valor { font-size: 40px; font-weight: 800; letter-spacing: 2px; line-height: 1.1; overflow-wrap: anywhere; }

.tq__reloj { display: grid; gap: var(--e2); justify-items: center; padding: var(--e5) var(--e4); border-radius: var(--r-l); background: var(--grafito); color: var(--blanco); text-align: center; box-shadow: var(--sombra-m); }
.cuenta { display: grid; gap: var(--e1); justify-items: center; }
.cuenta__texto { display: inline-flex; align-items: center; gap: var(--e2); font-size: 14px; font-weight: 700; color: var(--naranja-luz); }
.cuenta__cifra { font-size: 56px; font-weight: 800; letter-spacing: -1px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.tq__limite { font-size: 18px; font-weight: 700; }

.tq__banco { display: grid; gap: var(--e3); padding: var(--e5) var(--e4); border-radius: var(--r-l); background: var(--blanco); box-shadow: var(--sombra-s); }
.tq__datos { display: grid; gap: var(--e3); }
.dato { display: flex; align-items: center; justify-content: space-between; gap: var(--e3); padding: var(--e3) 0; border-top: 1px solid var(--linea); }
.dato__cuerpo { display: grid; gap: 2px; min-width: 0; }
.dato__etiqueta { font-size: 13px; font-weight: 700; color: var(--texto-suave); }
.dato__valor { font-size: 17px; font-weight: 800; overflow-wrap: anywhere; user-select: all; }
.dato__nota { font-size: 13px; font-weight: 600; color: var(--naranja-texto); }
.dato__copiar { flex: none; min-width: 96px; padding: 0 var(--e4); }
.dato__copiar--listo { border-color: var(--exito); color: var(--exito); }
.dato--monto .dato__valor { user-select: auto; }

.tq__whatsapp { display: grid; gap: var(--e2); }
.tq__tarde { padding-top: var(--e4); border-top: 1px solid var(--linea); justify-items: start; }
.tq__tarde-texto { margin: 0; font-weight: 600; }
.boton--whatsapp { min-height: 56px; background: #1E7F46; color: var(--blanco); font-size: 18px; box-shadow: 0 4px 12px rgba(30, 127, 70, .3); }
.boton--whatsapp:hover { background: #176A3A; }
.boton--whatsapp:active { transform: translateY(1px); }

.boleto--tiquete { position: relative; top: auto; }
.boleto--tiquete .boleto__cifras { margin-top: var(--e4); padding-top: var(--e3); border-top: 1px solid rgba(255, 255, 255, .14); }
.boleto__expositor { font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, .72); }
.boleto__lugar-evento { display: flex; align-items: center; gap: var(--e2); margin-top: var(--e4); font-size: 14px; font-weight: 700; color: var(--naranja-luz); }

@media (max-width: 480px) {
  .tq__codigo-valor { font-size: 34px; }
  .cuenta__cifra { font-size: 46px; }
  .dato { align-items: flex-start; flex-wrap: wrap; }
  .dato__copiar { width: 100%; }
}

@media print {
  @page { margin: 14mm; }
  html, body { background: #fff !important; color: #000 !important; }
  body[data-pagina="tiquete"] { min-height: 0; }
  .nate, .saltar, .cabecera, .tq__acciones, .tq__whatsapp, .dato__copiar, .tq__reloj .cuenta__texto, .solo-lectores { display: none !important; }
  .tiquete { max-width: none; padding: 0; gap: 12pt; }
  *, *::before, *::after { animation: none !important; transition: none !important; box-shadow: none !important; }
  .tq__marca, .tq__bajada, .pista, .dato__etiqueta, .dato__nota, .tq__codigo-etiqueta { color: #000 !important; }
  .tq__codigo, .tq__banco, .tq__reloj { background: #fff !important; color: #000 !important; border: 1.5pt solid #000; border-radius: 0; break-inside: avoid; }
  .tq__codigo-valor { font-size: 30pt; }
  .cuenta { display: none !important; }
  .tq__limite { font-size: 12pt; }
  .dato { border-top: 0.5pt solid #000; break-inside: avoid; }
  .boleto, .boleto--tiquete { background: #fff !important; color: #000 !important; border: 1.5pt solid #000; border-radius: 0; padding: 12pt; position: static; }
  .boleto::before, .boleto__corte::before, .boleto__corte::after { display: none; }
  .boleto__corte { border-top: 1pt dashed #000; margin: 12pt 0; }
  .tiquete, .tiquete * { color: #000 !important; }
  .boleto__lugar { border-top: 0.5pt solid #000; break-inside: avoid; }
  .boleto__grupo { break-inside: avoid; }
  .boleto__institucion { font-size: 14pt; }
  .boleto__lugar-evento .icono { display: none; }
  a { color: #000; }
}
