/* tuclientefiel — sistema compartido (landing + app)
   Mundo: "el datáfono de los sellos". Una sola celda cuadrada dibuja todo (QR, cifras, anillo, tramas);
   los controles son teclas con labio y recorrido; verde confirma, rojo anula, amarillo premia. */
:root {
  --verde: #0b6e4f; --verde-h: #095c42; --verde-t: #dff0e8; --verde-tt: #eff6f2; --verde-labio: #064632;
  --lima: #c4f24a; --lima-h: #b4e437; --lima-labio: #86ad22;      /* lima = celda encendida */
  --tinta: #0c1512; --tinta-2: #3a4942; --tinta-3: #5c6b64;
  --noche: #141d19; --noche-2: #1e2924; --noche-linea: #2c3833;   /* superficies de pantalla */
  --humo: #b3c2ba; --humo-2: #8fa199;                              /* texto secundario sobre pantalla oscura */
  --linea: #d4dcd7; --borde: #b6c2bb; --fondo: #ffffff; --fondo-2: #f0f3f1;
  --oro: #f5b700; --oro-t: #fff1bf; --oro-tinta: #4a3600; --oro-labio: #bd8c00;   /* oro = solo premio */
  --rojo: #b42318; --rojo-t: #fdecea;
  --r: 18px; --r-m: 12px; --r-s: 9px;
  --sombra: 0 1px 1px rgb(12 21 18 / .07), 0 12px 26px -14px rgb(12 21 18 / .32);
  --sombra-s: 0 1px 1px rgb(12 21 18 / .08), 0 5px 12px -7px rgb(12 21 18 / .22);
  --relieve: 0 3px 0 var(--verde-labio);
  --brillo: linear-gradient(transparent, transparent);
  /* trama de celdas: blanca para campos de color, negra para usar de máscara */
  --trama: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3E%3Crect x='5' y='5' width='4' height='4' rx='1' fill='%23fff' fill-opacity='.1'/%3E%3C/svg%3E");
  --trama-m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Crect x='4' y='4' width='4' height='4' rx='1'/%3E%3C/svg%3E");
  --verde-superficie: var(--trama), var(--verde);
  --display: "Archivo", ui-sans-serif, system-ui, sans-serif;
  --texto: "Archivo", ui-sans-serif, system-ui, sans-serif;
  --ancho: 1180px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-color: #aebab3 transparent; }
body { margin: 0; font: 400 1rem/1.55 var(--texto); color: var(--tinta); background: var(--fondo); caret-color: var(--verde); -webkit-font-smoothing: antialiased; }
::selection { background: var(--lima); color: var(--tinta); }
:focus-visible { outline: 3px solid var(--verde); outline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 800; font-stretch: 112.5%; line-height: 1.04; letter-spacing: -.025em; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--verde); text-underline-offset: .22em; text-decoration-thickness: 1.5px; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ico { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.envoltura { width: min(100% - 32px, var(--ancho)); margin-inline: auto; }

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

/* ---- marca ---- */
.marca { display: inline-flex; align-items: center; gap: .55rem; font: 800 semi-expanded 1.18rem/1 var(--display); color: var(--tinta); text-decoration: none; letter-spacing: -.03em; }
.marca img, .marca svg { width: 30px; height: 30px; }
.marca b { color: var(--verde); font-weight: 800; }

/* ---- teclas (botones): cara + labio; al pulsar, la cara baja hasta el labio ---- */
.btn { --labio: var(--verde-labio); --viaje: 3px; display: inline-flex; align-items: center; justify-content: center; gap: .55em; min-height: 48px; padding: 0 1.25rem; border: 0; border-radius: var(--r-m); background: var(--verde); box-shadow: 0 var(--viaje) 0 var(--labio); color: #fff; font: 700 1rem/1.1 var(--texto); text-decoration: none; cursor: pointer; user-select: none; -webkit-user-select: none; transition: transform .07s ease-out, box-shadow .07s ease-out, background-color .15s; -webkit-tap-highlight-color: transparent; }
.btn:hover { background-color: var(--verde-h); }
.btn:active { transform: translateY(var(--viaje)); box-shadow: 0 0 0 var(--labio); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: 0 var(--viaje) 0 var(--labio); }
.btn.sec { --labio: #c2ccc6; background: var(--fondo); color: var(--tinta); box-shadow: inset 0 0 0 1.5px var(--borde), 0 var(--viaje) 0 var(--labio); }
.btn.sec:hover { background: var(--fondo-2); }
.btn.sec:active { box-shadow: inset 0 0 0 1.5px var(--borde), 0 0 0 var(--labio); }
.btn.oro { --labio: var(--oro-labio); background: var(--oro); color: var(--oro-tinta); }
.btn.oro:hover { background: #ffc61a; }
.btn.lima { --labio: var(--lima-labio); background: var(--lima); color: var(--tinta); }
.btn.lima:hover { background: var(--lima-h); }
.btn.oscuro { --labio: #000; background: var(--noche-2); color: #fff; }
.btn.oscuro:hover { background: #28352f; }
.btn.peligro { --labio: #e3bcb7; background: var(--fondo); color: var(--rojo); box-shadow: inset 0 0 0 1.5px #e6b5af, 0 var(--viaje) 0 var(--labio); }
.btn.peligro:hover { background: var(--rojo-t); }
.btn.peligro:active { box-shadow: inset 0 0 0 1.5px #e6b5af, 0 0 0 var(--labio); }
.btn.fantasma { background: transparent; color: var(--tinta-2); box-shadow: none; }
.btn.fantasma:hover { background: var(--fondo-2); }
.btn.fantasma:active { transform: translateY(1px); box-shadow: none; }
.btn.chico { --viaje: 2px; min-height: 38px; padding: 0 .85rem; font-size: .92rem; border-radius: var(--r-s); }
.btn.grande { --viaje: 4px; min-height: 58px; padding: 0 1.6rem; font-size: 1.08rem; border-radius: 14px; }
.btn.ancho { width: 100%; }
.btn[aria-busy="true"] { position: relative; color: transparent; pointer-events: none; }
.btn[aria-busy="true"]::after { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid #fff; border-right-color: transparent; animation: girar .7s linear infinite; }
.btn:is(.sec, .lima, .oro, .peligro)[aria-busy="true"]::after { border-color: var(--tinta); border-right-color: transparent; }
@keyframes girar { to { transform: rotate(1turn); } }

/* ---- formularios ---- */
.campo { display: grid; gap: .4rem; }
.campo > label, .etq { font-weight: 700; font-size: .93rem; }
input:is([type=text],[type=tel],[type=email],[type=password],[type=number],[type=date],[type=search]), select, textarea {
  width: 100%; min-height: 50px; padding: .7rem .95rem; border: 1.5px solid var(--borde); border-radius: var(--r-s);
  background: #fff; font: inherit; color: inherit; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--verde); box-shadow: 0 0 0 4px var(--verde-t); }
input::placeholder { color: #7f8f87; }
input[aria-invalid="true"] { border-color: var(--rojo); }
input:disabled { background: var(--fondo-2); color: var(--tinta-3); }
.clave { position: relative; display: block; }
.clave input { padding-right: 3.2rem; }
.ver-clave { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: var(--r-s); background: none; color: var(--tinta-3); cursor: pointer; }
.ver-clave:hover { color: var(--tinta); background: var(--fondo-2); }
.ver-clave[aria-pressed="true"] { color: var(--verde); }
.check { display: flex; gap: .7rem; align-items: flex-start; font-size: .93rem; color: var(--tinta-2); line-height: 1.45; }
.check input { width: 20px; height: 20px; margin: .1rem 0 0; accent-color: var(--verde); flex: none; }
/* casilla obligatoria sin marcar: se pinta y se sacude una vez */
.check.falta { border-radius: 3px; background: var(--rojo-t); box-shadow: 0 0 0 .55rem var(--rojo-t), 0 0 0 calc(.55rem + 1.5px) #e6b5af; color: var(--tinta); animation: sacude .35s; } /* el recuadro va por fuera (sombra): no empuja nada */
@keyframes sacude { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.ayuda { font-size: .86rem; color: var(--tinta-3); }
.error { color: var(--rojo); font-size: .93rem; font-weight: 700; }
.error:empty { display: none; }
.nota { padding: .9rem 1rem; border-radius: var(--r-m); background: var(--fondo-2); color: var(--tinta-2); font-size: .94rem; }
.nota.ok { background: var(--verde-t); color: var(--verde-h); }
.nota.mal { background: var(--rojo-t); color: var(--rojo); }

/* ---- desplegables: chevron dibujado, no el triángulo del navegador ---- */
details > summary { list-style: none; display: flex; align-items: center; gap: .6rem; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: ""; width: 8px; height: 8px; flex: none; border-right: 2.5px solid var(--tinta-2); border-bottom: 2.5px solid var(--tinta-2); transform: translateY(-2px) rotate(45deg); transition: transform .2s; }
details[open] > summary::after { transform: translateY(2px) rotate(-135deg); }

/* ---- insignias: etiqueta recta con su celda de estado ---- */
.insignia { display: inline-flex; align-items: center; gap: .4em; padding: .22rem .5rem; border-radius: 6px; font-size: .75rem; font-weight: 700; line-height: 1.2; background: var(--fondo-2); color: var(--tinta-2); white-space: nowrap; }
.insignia::before { content: ""; width: .5em; height: .5em; border-radius: 1.5px; background: currentColor; flex: none; }
.insignia:has(.ico)::before { display: none; }
.insignia.verde { background: var(--verde-t); color: var(--verde-h); }
.insignia.alerta { background: #ffe9d2; color: #8a4300; }
.insignia.premio { background: var(--oro-t); color: var(--oro-tinta); }
.insignia.mal { background: var(--rojo-t); color: var(--rojo); }

/* ---- cifras de matriz de puntos y tablero QR ---- */
.mx { display: inline-block; height: 1em; width: auto; fill: currentColor; vertical-align: -.12em; }
.mx rect { opacity: .12; transform-box: fill-box; transform-origin: center; }
.mx .en { opacity: 1; }
.mx .vf { animation: voltear .34s ease-in-out both; }
@keyframes voltear { 50% { transform: scaleY(0); } }
.tablero { position: relative; aspect-ratio: 1; border-radius: 8.5%; background: var(--noche); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .07), 0 6px 0 #040807; }
.tablero canvas { display: block; width: 100%; height: 100%; }
/* luz de estado: una celda que late */
.led { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .86rem; white-space: nowrap; }
.led::before { content: ""; width: 9px; height: 9px; border-radius: 2.5px; background: currentColor; animation: latido 1.6s steps(2, jump-none) infinite; }
@keyframes latido { 50% { opacity: .35; } }
/* punto guía de las cuentas: nombre ........ cifra */
.guia { flex: 1; min-width: 1rem; height: 4px; align-self: center; background: linear-gradient(90deg, currentColor 2px, transparent 2px) 0 0 / 6px 2px repeat-x; background-position-y: center; opacity: .28; }

/* ---- tarjeta de sellos del cliente ---- */
.tc { --c: var(--verde); --ct: #fff; --fuente: "Archivo"; --cols: 5; width: 100%; max-width: 380px; background: #fff; color: var(--tinta); text-align: left; border-radius: 26px; box-shadow: 0 0 0 1px rgb(12 21 18 / .07), var(--sombra); overflow: hidden; }
.tc-cab { position: relative; display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.15rem; background: var(--c); color: var(--ct); }
.tc-cab::after { content: ""; position: absolute; inset: 0; background: var(--ct); opacity: .07; pointer-events: none; -webkit-mask: var(--trama-m) 0 0 / 16px 16px; mask: var(--trama-m) 0 0 / 16px 16px; }
.tc-cab > * { position: relative; z-index: 1; }
.tc-cab > div { min-width: 0; }
.tc-logo { width: 58px; height: 58px; border-radius: 24%; object-fit: cover; flex: none; background: rgb(255 255 255 / .2); display: grid; place-items: center; font: 800 semi-expanded 1.05rem/1 var(--display); }
.tc-cab .tc-logo { width: 84px; height: 84px; font-size: 1.6rem; letter-spacing: -.02em; box-shadow: 0 0 0 1.5px rgb(255 255 255 / .35), 0 4px 0 rgb(0 0 0 / .18); }
.tc-cab strong { display: block; font: 800 1.4rem/1.08 var(--fuente), var(--display); letter-spacing: -.02em; overflow-wrap: anywhere; }
.tc[data-f="gabarito"] .tc-cab strong { font-stretch: 112.5%; }
.tc[data-f="pacifico"] :is(.tc-cab strong, .tc-premio b) { font-weight: 400; letter-spacing: 0; line-height: 1.3; }
.tc[data-f="bebas"] :is(.tc-cab strong, .tc-premio b) { font-weight: 400; letter-spacing: .03em; font-size: 1.65rem; }
.tc[data-f="bebas"] .tc-premio b { font-size: 1.55em; }
.tc-cab div > span { display: block; margin-top: .25rem; font-size: .88rem; font-weight: 500; opacity: .9; }
.tc-cuerpo { padding: 1.15rem 1.15rem 1.2rem; }
.tc-cuenta { display: flex; align-items: baseline; gap: .5rem; font-variant-numeric: tabular-nums; }
.tc-cuenta b { font: 900 semi-expanded 3.3rem/.82 var(--display); letter-spacing: -.045em; }
.tc-cuenta span { color: var(--tinta-3); font-weight: 600; font-size: 1.02rem; }
.tc-huecos { list-style: none; margin: 1rem 0 1.15rem; padding: 0; display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: .5rem; }
/* ranura vacía: hundida, con su número. Sello: tecla pulsada del color del negocio. */
.hueco { position: relative; aspect-ratio: 1; border-radius: 26%; display: grid; place-items: center; background: var(--fondo-2); box-shadow: inset 0 2px 0 rgb(12 21 18 / .08); color: #a3b0a9; font: 800 semi-expanded .82em/1 var(--display); }
.hueco svg { width: 50%; height: 50%; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.hueco.lleno { background: var(--c); color: var(--ct); box-shadow: inset 0 -4px 0 rgb(0 0 0 / .24), inset 0 1.5px 0 rgb(255 255 255 / .3); }
.hueco.lleno svg { margin-top: -4px; }
.hueco.premio { background: var(--oro-t); color: #946e00; box-shadow: inset 0 0 0 2px var(--oro); }
.hueco.premio.lleno { background: var(--oro); color: var(--oro-tinta); box-shadow: inset 0 -4px 0 rgb(0 0 0 / .2), inset 0 1.5px 0 rgb(255 255 255 / .5); }
.hueco.recien { animation: teclear .5s cubic-bezier(.3, 0, .2, 1) both; }
@keyframes teclear { 0% { transform: translateY(-16px) scale(1.14); opacity: 0; } 45% { transform: translateY(3px) scale(.95); opacity: 1; } 70% { transform: translateY(-1px); } 100% { transform: none; } }
/* el sello de cada negocio dentro de la casilla: ícono a dos tonos o su logo */
.hueco svg.sello-ico { width: 62%; height: 62%; stroke-width: 2.1; }
.hueco svg.sello-ico.grueso { width: 50%; height: 50%; stroke-width: 3; }
.sello-ico .t { fill: currentColor; fill-opacity: .3; }
.sello-logo { width: 74%; height: 74%; margin-top: -4px; border-radius: 24%; object-fit: cover; box-shadow: 0 0 0 1.5px rgb(255 255 255 / .55); }

/* ---- el sello a pantalla completa: cae, golpea, salta en celdas y vuela a su casilla ---- */
.sello-full { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; align-content: center; gap: 2rem; padding: 24px; background: var(--c); color: var(--ct); overflow: hidden; cursor: pointer; animation: sf-fondo .22s ease-out, sf-sacude .32s .36s; }
.sello-full::before { content: ""; position: absolute; inset: 0; background: var(--ct); opacity: .08; -webkit-mask: var(--trama-m) 0 0 / 22px 22px; mask: var(--trama-m) 0 0 / 22px 22px; }
.sello-full::after { content: ""; position: absolute; left: 50%; top: 42%; width: 34vmin; aspect-ratio: 1; border-radius: 26%; border: 5px solid var(--ct); opacity: 0; translate: -50% -50%; animation: sf-onda .7s .36s cubic-bezier(.2, .8, .3, 1); }
.sello-full.oro { --c: var(--oro); --ct: var(--oro-tinta); }
.sf-tecla { position: relative; width: min(54vw, 46vh, 270px); aspect-ratio: 1; border-radius: 26%; display: grid; place-items: center; background: #fff; color: var(--c); box-shadow: 0 14px 0 rgb(0 0 0 / .22); animation: sf-cae .66s cubic-bezier(.3, 0, .2, 1) both; }
.sello-full.oro .sf-tecla { color: #b07f00; }
.sf-tecla .sello-ico { width: 62%; height: 62%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sf-tecla .sello-ico.grueso { width: 54%; height: 54%; stroke-width: 2.8; }
.sf-tecla .sello-logo { width: 80%; height: 80%; margin: 0; box-shadow: none; }
.sf-celdas i { position: absolute; left: 50%; top: 42%; width: 3.4vmin; aspect-ratio: 1; border-radius: 24%; background: var(--ct); opacity: 0; animation: sf-celda .8s calc(.36s + var(--k) * 9ms) cubic-bezier(.15, .8, .3, 1) both; }
.sf-celdas i:nth-child(3n) { background: var(--lima); }
.sello-full.oro .sf-celdas i:nth-child(3n) { background: #fff; }
.sf-texto { position: relative; text-align: center; animation: sf-texto .45s .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.sf-texto b { display: block; font: 900 semi-expanded clamp(2.6rem, 12vw, 4.6rem)/.95 var(--display); letter-spacing: -.045em; }
.sf-texto span { display: block; max-width: 22rem; margin: .7rem auto 0; font-size: 1.1rem; font-weight: 700; opacity: .9; }
.sello-full.sale { animation: sf-sale .45s ease-in forwards; } /* se va el fondo; el sello sigue volando a su casilla */
.sello-full.sale::before, .sello-full.sale .sf-celdas { opacity: 0; transition: opacity .25s; }
.sello-full.sale .sf-texto, .sello-full.sale.sin-destino .sf-tecla { animation: sf-ocultar .25s ease-in forwards; }
@keyframes sf-fondo { from { opacity: 0; } }
@keyframes sf-cae { 0% { transform: translateY(-75vh) scale(1.9) rotate(-24deg); } 55% { transform: translateY(0) scale(.82, 1.12) rotate(3deg); } 68% { transform: scale(1.14, .88); } 82% { transform: scale(.96) rotate(-1deg); } 100% { transform: none; } }
@keyframes sf-sacude { 20% { translate: -7px 4px; } 40% { translate: 6px -5px; } 60% { translate: -4px 3px; } 80% { translate: 2px -1px; } }
@keyframes sf-onda { 0% { opacity: .9; transform: scale(.9); } 100% { opacity: 0; transform: scale(3.4); } }
@keyframes sf-celda { 0% { opacity: 1; transform: translate(-50%, -50%) rotate(var(--a)) translateY(0) scale(1.2); } 100% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--a)) translateY(calc(-1 * var(--d))) scale(.35) rotate(140deg); } }
@keyframes sf-texto { from { opacity: 0; transform: translateY(24px) scale(.9); } }
@keyframes sf-sale { to { background-color: transparent; } }
@keyframes sf-ocultar { to { opacity: 0; transform: scale(.9); } }
.tc-premio { padding-top: .95rem; background: linear-gradient(90deg, var(--linea) 4px, transparent 4px) 0 0 / 8px 4px repeat-x; }
.tc-premio small { display: block; font-size: .84em; font-weight: 600; color: var(--tinta-3); }
.tc-premio b { display: block; margin-top: .15em; font: 800 1.35em/1.15 var(--fuente), var(--display); letter-spacing: -.015em; color: var(--tinta); overflow-wrap: anywhere; }
.tc.completa .tc-premio { padding: .85rem .95rem; border-radius: 14px; background: var(--oro); box-shadow: inset 0 -4px 0 rgb(0 0 0 / .18); padding-bottom: calc(.85rem + 4px); }
.tc.completa .tc-premio small { color: #5c4300; }
.tc.completa .tc-premio b { color: var(--oro-tinta); }
/* Premios por etapas (Ultra): un boleto por premio, con talón y las muescas del corte */
.tc-boletos { list-style: none; margin: .1rem 0 0; padding: 0; display: grid; gap: .6rem; }
.boleto { --talon: 4.4em; position: relative; display: grid; grid-template-columns: var(--talon) minmax(0, 1fr) auto; align-items: center; min-height: 4.3em; border-radius: 14px; background: var(--fondo-2); color: var(--tinta-3);
  -webkit-mask: radial-gradient(circle at var(--talon) 0, #0000 .55em, #000 .58em) top / 100% 51% no-repeat, radial-gradient(circle at var(--talon) 100%, #0000 .55em, #000 .58em) bottom / 100% 51% no-repeat;
  mask: radial-gradient(circle at var(--talon) 0, #0000 .55em, #000 .58em) top / 100% 51% no-repeat, radial-gradient(circle at var(--talon) 100%, #0000 .55em, #000 .58em) bottom / 100% 51% no-repeat; }
.bol-talon { align-self: stretch; display: grid; place-content: center; justify-items: center; border-right: 2px dashed rgb(12 21 18 / .14); }
.bol-talon b { font: 900 semi-expanded 1.55em/1 var(--display); letter-spacing: -.04em; }
.bol-talon small { font-size: .66em; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; opacity: .75; }
.bol-cuerpo { display: grid; gap: .1em; min-width: 0; padding: .65em .85em; }
.bol-cuerpo b { font: 800 1.08em/1.15 var(--fuente), var(--display); letter-spacing: -.01em; color: var(--tinta-2); overflow-wrap: anywhere; }
.bol-cuerpo small { font-size: .8em; font-weight: 600; }
.bol-barra { position: relative; display: block; height: 6px; margin-top: .45em; border-radius: 3px; background: rgb(12 21 18 / .1); overflow: hidden; }
.bol-barra::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--p); border-radius: inherit; background: var(--c); }
.bol-ico { width: 1.7em; height: 1.7em; margin-right: .9em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* ganado: dorado y el regalo se mueve; siguiente: blanco con borde dorado; los demás esperan */
.boleto.listo { background: var(--oro); color: var(--oro-tinta); box-shadow: inset 0 -4px 0 rgb(0 0 0 / .16); }
.boleto.listo .bol-talon { border-color: rgb(74 54 0 / .3); }
.boleto.listo .bol-cuerpo b { color: var(--oro-tinta); }
.boleto.sigue { background: #fff; color: var(--tinta-2); box-shadow: inset 0 0 0 2px var(--oro), inset 0 -3px 0 rgb(12 21 18 / .07); }
.boleto.sigue .bol-talon { color: #8a6400; }
.boleto.sigue .bol-cuerpo b { color: var(--tinta); }
.boleto.luego { opacity: .85; }
@media (prefers-reduced-motion: no-preference) {
  .boleto.listo .bol-ico { animation: bol-regalo 2.4s ease-in-out infinite; transform-origin: 50% 80%; }
  .tc-boletos .boleto { animation: cae-suave .45s cubic-bezier(.2, .9, .3, 1) both; }
  .tc-boletos .boleto:nth-child(2) { animation-delay: 70ms; } .tc-boletos .boleto:nth-child(3) { animation-delay: 140ms; }
}
@keyframes bol-regalo { 0%, 70%, 100% { transform: none; } 76% { transform: rotate(-12deg) scale(1.08); } 82% { transform: rotate(10deg) scale(1.08); } 88% { transform: rotate(-6deg); } }
.tc.meta-lista .tc-premio { padding: .85rem .95rem; border-radius: 14px; background: var(--oro-t); box-shadow: inset 0 0 0 2px var(--oro); }
.tc-premio .tc-sigue { margin-top: .4rem; color: var(--tinta-2); font-weight: 600; }

/* ---- celebración al completar la tarjeta ---- */
/* 1) las teclas se pulsan en ola  2) la tecla de premio cae y late  3) confeti de celdas  4) sube el premio */
.tc.celebra .tc-cuenta b { display: inline-block; animation: latir .6s cubic-bezier(.2, .9, .3, 1) both; }
.tc.celebra .hueco.lleno { animation: ola .45s cubic-bezier(.3, 0, .2, 1) calc(var(--i) * 55ms) both; }
.tc.celebra .hueco.premio { z-index: 1; animation: regalo .9s cubic-bezier(.2, .9, .3, 1) calc(var(--i) * 55ms + 120ms) both; }
.tc.celebra .hueco.premio::after { content: ""; position: absolute; inset: 0; border-radius: inherit; animation: halo 1.2s ease-out calc(var(--i) * 55ms + 500ms) 2; }
.confeti { position: absolute; left: 50%; top: 50%; pointer-events: none; }
.confeti i { position: absolute; left: -4px; top: -4px; width: var(--w); height: var(--w); border-radius: 2px; background: var(--k); opacity: 0; animation: confeti 1.4s cubic-bezier(.12, .75, .3, 1) calc(var(--i) * 55ms + 460ms) forwards; }
.tc.celebra .tc-premio { animation: subir .55s cubic-bezier(.2, .9, .3, 1) calc(var(--meta) * 55ms + 420ms) both; }
@keyframes latir { 0% { transform: scale(.6); } 60% { transform: scale(1.1); } 100% { transform: none; } }
@keyframes ola { 40% { transform: translateY(4px); box-shadow: inset 0 -1px 0 rgb(0 0 0 / .24), inset 0 1.5px 0 rgb(255 255 255 / .3); } }
@keyframes regalo { 0% { transform: translateY(-22px) scale(1.5) rotate(-10deg); opacity: 0; } 45% { transform: translateY(4px) scale(.94); opacity: 1; } 70% { transform: translateY(-3px) scale(1.04); } 100% { transform: none; } }
@keyframes halo { from { box-shadow: 0 0 0 0 rgb(245 183 0 / .6); } to { box-shadow: 0 0 0 16px rgb(245 183 0 / 0); } }
@keyframes confeti { 0% { opacity: 1; transform: rotate(var(--a)) translateY(0) rotate(0); } 80% { opacity: 1; } 100% { opacity: 0; transform: rotate(var(--a)) translateY(calc(var(--d) * -1)) rotate(var(--r)); } }
@keyframes subir { from { opacity: 0; transform: translateY(10px); } }

/* ---- utilidades de app ---- */
.pila { display: grid; gap: 1rem; }
.fila { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.caja { background: #fff; border: 1.5px solid var(--linea); border-radius: var(--r); padding: 1.25rem; }
.vacio { padding: 2rem 1rem; text-align: center; color: var(--tinta-3); }
.vacio strong { display: block; color: var(--tinta); font: 800 semi-expanded 1.08rem/1.3 var(--display); letter-spacing: -.02em; margin-bottom: .3rem; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; background: var(--tinta); color: #fff; padding: .8rem 1.1rem; border-radius: var(--r-m); font-weight: 700; box-shadow: 0 4px 0 #000, var(--sombra); transition: opacity .2s, transform .25s cubic-bezier(.2, .9, .3, 1); z-index: 50; max-width: calc(100% - 32px); pointer-events: none; }
.toast.ver { opacity: 1; transform: translate(-50%, 0); }

/* ---- pregunta: confirmar antes de algo que cuesta deshacer (reemplaza al confirm del navegador) ---- */
.btn.rojo { --labio: #7d1810; background: var(--rojo); color: #fff; }
.btn.rojo:hover { background: #9c1d14; }
.pregunta { width: min(430px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 0; border-radius: var(--r); background: var(--fondo); color: var(--tinta); box-shadow: inset 0 0 0 1.5px var(--linea), 0 6px 0 rgb(12 21 18 / .45); overflow: auto; overscroll-behavior: contain; }
.pregunta::backdrop { background: rgb(12 21 18 / .6); }
.pregunta[open] { animation: pregunta-sube .3s cubic-bezier(.2, .9, .3, 1); }
.pregunta[open]::backdrop { animation: pregunta-fondo .2s ease-out; }
.pregunta form { display: grid; gap: .85rem; padding: 1.5rem 1.4rem 1.4rem; }
.pregunta h2 { margin: 0; font: 800 semi-expanded 1.35rem/1.15 var(--display); letter-spacing: -.025em; text-wrap: balance; overflow-wrap: anywhere; }
.pregunta p { margin: 0; color: var(--tinta-2); text-wrap: pretty; }
.pregunta-botones { display: flex; justify-content: flex-end; gap: .6rem; margin-top: .45rem; }
@keyframes pregunta-sube { from { opacity: 0; transform: translateY(18px); } }
@keyframes pregunta-fondo { from { opacity: 0; } }
@media (max-width: 560px) { /* en celular sale desde abajo, con los botones a la mano */
  .pregunta { width: 100%; max-height: calc(100dvh - 48px); margin: auto 0 0; border-radius: 22px 22px 0 0; box-shadow: inset 0 1.5px 0 var(--linea); }
  .pregunta[open] { animation: pregunta-hoja .34s cubic-bezier(.2, .9, .3, 1); }
  .pregunta form { padding: 1.5rem 16px calc(1.1rem + env(safe-area-inset-bottom)); }
  .pregunta-botones { flex-direction: column-reverse; }
  .pregunta-botones .btn { width: 100%; }
  @keyframes pregunta-hoja { from { transform: translateY(100%); } }
}
/* el premio que se va a fijar: nombre grande y la fila de sellos con el último en oro */
.fijar { display: grid; gap: .3rem; padding: 1rem 1.05rem 1.1rem; border-radius: var(--r-m); background: var(--fondo-2); box-shadow: inset 0 0 0 1.5px var(--linea); }
.fijar small { color: var(--tinta-3); font-size: .84rem; font-weight: 700; }
.fijar b { font: 800 semi-expanded 1.45rem/1.15 var(--display); letter-spacing: -.025em; overflow-wrap: anywhere; }
.fijar-celdas { display: grid; grid-template-columns: repeat(var(--cols, 10), minmax(0, 20px)); gap: 4px; margin-top: .45rem; }
.fijar-celdas i { aspect-ratio: 1; border-radius: 5px; background: var(--verde); box-shadow: inset 0 -3px 0 rgb(0 0 0 / .22); }
.fijar-celdas i:last-child, .fijar-celdas i.p { background: var(--oro); }
.fijar-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.fijar-lista li { display: grid; gap: .05rem; }
.fijar-lista span { color: var(--tinta-3); font-size: .8rem; font-weight: 700; }
.fijar-lista b { font-size: 1.15rem; }

/* ---- tecla flotante de WhatsApp ---- */
.wa-flota { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); z-index: 50; width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; color: var(--tinta); background: #25d366; box-shadow: 0 4px 0 #17a34a; transition: transform .07s ease-out, box-shadow .07s ease-out, background-color .15s; }
.wa-flota:hover { background: #1fc65e; }
.wa-flota:active { transform: translateY(4px); box-shadow: 0 0 0 #17a34a; }
.wa-flota .ico { width: 28px; height: 28px; stroke-width: 2; }

/* ---- Sensación al pasar el cursor: solo con mouse, y "reducir movimiento" la apaga (regla de arriba) ---- */
@media (hover: hover) and (pointer: fine) {
  .btn:hover:not(:active):not([disabled]):not([aria-disabled="true"]) { transform: translateY(-2px); box-shadow: 0 calc(var(--viaje) + 2px) 0 var(--labio); }
  .btn .ico { transition: transform .22s cubic-bezier(.2, .9, .3, 1); }
  .btn:hover .ico { transform: translateX(2px) rotate(-6deg); }
  a:not(.btn):not(.marca):not(.tecla) { transition: color .15s, text-underline-offset .18s; }
  a:not(.btn):not(.marca):not(.tecla):hover { text-underline-offset: .34em; }
  .marca img, .marca svg { transition: transform .4s cubic-bezier(.2, 1.4, .4, 1); }
  .marca:hover img, .marca:hover svg { transform: rotate(-14deg) scale(1.08); }
  .plan, .opcion { transition: transform .22s cubic-bezier(.2, .9, .3, 1), box-shadow .22s, border-color .2s; }
  .plan:hover, .opcion:hover { transform: translateY(-5px); box-shadow: 0 7px 0 var(--borde); }
  .tecla, .chip, .muestra { transition: transform .12s ease-out, box-shadow .12s ease-out; }
  .tecla:hover:not(:active), .chip:hover:not(:active), .muestra:hover:not(:active) { transform: translateY(-2px); }
  .hueco { transition: transform .25s cubic-bezier(.2, 1.4, .4, 1); }
  .tc:hover .hueco.lleno:nth-child(odd) { transform: scale(1.07) rotate(-5deg); }
  .tc:hover .hueco.lleno:nth-child(even) { transform: scale(1.07) rotate(5deg); }
  details > summary { transition: color .15s; }
  details > summary:hover { color: var(--verde); }
  input:not([type=checkbox]):not([type=radio]):not([type=color]):hover, select:hover, textarea:hover { border-color: var(--borde); }
  .item, .ev { transition: background-color .15s, transform .2s cubic-bezier(.2, .9, .3, 1); }
  .item:hover, .ev:hover { transform: translateX(4px); }
  .tabs a .ico { transition: transform .28s cubic-bezier(.2, 1.4, .4, 1); }
  .tabs a:hover .ico { transform: translateY(-2px) scale(1.14); }
  .paso-n { transition: transform .22s cubic-bezier(.2, 1.4, .4, 1); }
  .paso:hover .paso-n { transform: scale(1.12) rotate(-6deg); }
  .tablero { transition: transform .35s cubic-bezier(.2, .9, .3, 1); }
  .tablero:hover { transform: rotate(-1.5deg) scale(1.02); }
}

/* ---- feeling: lo que entra, entra con peso (todo se apaga solo con «reducir movimiento») ---- */
@media (prefers-reduced-motion: no-preference) {
  /* una pestaña del panel: sus bloques y filas caen en cascada al abrirla */
  .entrando > *, .entrando :is(.item, .persona, .caja, .banda, .plan-op, .opcion) { animation: cae-suave .42s cubic-bezier(.2, .9, .3, 1) both; }
  .entrando > :nth-child(2), .entrando :is(.item, .persona):nth-child(2) { animation-delay: 40ms; }
  .entrando > :nth-child(3), .entrando :is(.item, .persona):nth-child(3) { animation-delay: 80ms; }
  .entrando > :nth-child(4), .entrando :is(.item, .persona):nth-child(4) { animation-delay: 120ms; }
  .entrando > :nth-child(5), .entrando :is(.item, .persona):nth-child(5) { animation-delay: 160ms; }
  .entrando > :nth-child(n+6), .entrando :is(.item, .persona):nth-child(n+6) { animation-delay: 200ms; }
  /* la landing: cada bloque sube al aparecer en pantalla (la clase se quita al terminar, así el hover sigue igual) */
  .revela { opacity: 0; transform: translateY(26px); }
  .revela.revelado { opacity: 1; transform: none; transition: opacity .55s ease-out var(--d, 0s), transform .7s cubic-bezier(.2, .9, .3, 1) var(--d, 0s); }
  /* avisos y tarjetas */
  .toast.ver { animation: toast-rebota .45s cubic-bezier(.2, 1.5, .4, 1); }
  .hoja > .tc, .hoja > article, .hoja > .acciones { animation: cae-suave .5s .08s cubic-bezier(.2, .9, .3, 1) both; } /* pantalla del cliente */
  .hoja > :nth-child(3) { animation-delay: .16s; } .hoja > :nth-child(4) { animation-delay: .24s; }
  .pregunta[open] .btn { animation: cae-suave .35s .08s cubic-bezier(.2, .9, .3, 1) both; }
  .marca-paso svg { animation: sello-pop .45s cubic-bezier(.2, 1.6, .4, 1) both; }
}
@keyframes cae-suave { from { opacity: 0; transform: translateY(14px); } }
@keyframes toast-rebota { 0% { transform: translate(-50%, 24px) scale(.92); } 60% { transform: translate(-50%, -4px) scale(1.02); } 100% { transform: translate(-50%, 0); } }
@keyframes sello-pop { 0% { transform: scale(0) rotate(-30deg); } 100% { transform: none; } }
