@font-face {
  font-family: "Bricolage";
  src: url("BricolageGrotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --noche: #1c1936;
  --violeta: #6857ff;
  --violeta-boton: #5135f5;
  --violeta-tinta: #4325d5;
  --lima: #c9ff4a;
  --papel: #f5f2ea;
  --superficie: #fffefa;
  --tinta: #1c1936;
  --apagado: #6c6876;
  --linea: #e3dfe7;
  --sombra-dura: 2px 3px 0 var(--tinta);
  --elevar: 0 1px 2px rgb(28 25 54 / .06), 0 16px 34px -16px rgb(28 25 54 / .3);
  --entrar: cubic-bezier(.2, .8, .2, 1);
  --rebote: cubic-bezier(.3, 1.6, .45, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Bricolage", system-ui, sans-serif; font-size: 16px; line-height: 1.45; font-weight: 440;
  color: var(--tinta); background: var(--noche);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overflow-x: hidden;
}
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; text-align: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--violeta); outline-offset: 2px; border-radius: 10px; }
p { margin: 0; text-wrap: pretty; }

#app { position: relative; min-height: 100dvh; max-width: 480px; margin: 0 auto; overflow: hidden; }
.pantalla { position: relative; min-height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.pantalla > :not(.masas):not(.escanear):not(.barra) { position: relative; z-index: 1; }
.noche { background: var(--noche); color: #fff; --clave: var(--lima); --raya: var(--lima); }
.violeta { background: var(--violeta); color: #fff; --clave: var(--lima); --raya: var(--lima); }
.lima { background: var(--lima); color: var(--tinta); --clave: var(--tinta); --raya: var(--violeta); }
.papel { background: var(--papel); color: var(--tinta); --clave: var(--violeta-boton); --raya: var(--lima); }

.masas { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.masas svg { position: absolute; animation: masa 1100ms var(--entrar) var(--d, 0ms) both; }
@keyframes masa { from { opacity: 0; transform: scale(.82) translateY(20px); } }
.titulo { margin: 0; font-weight: 800; letter-spacing: -.045em; line-height: 1.04; }
.titulo-xl { font-size: 48px; line-height: 1; }
.titulo-l { font-size: 38px; }
.titulo-m { font-size: 29px; }
.titulo-s { font-size: 22px; letter-spacing: -.035em; }
.tl { display: block; }
.tw { display: inline-block; position: relative; isolation: isolate; white-space: nowrap; }
.tle {
  display: inline-block; transform: translateY(var(--y)) rotate(var(--r)); transform-origin: 50% 80%;
  animation: letra 560ms var(--rebote) calc(var(--i) * 18ms + 80ms) both;
}
@keyframes letra { from { opacity: 0; transform: translateY(.5em) rotate(0deg); } }
.tw.clave { color: var(--clave); }
.raya { position: absolute; z-index: -1; left: -.05em; bottom: -.17em; width: calc(100% + .1em); height: .3em; overflow: visible; }
.raya path { fill: none; stroke: var(--raya); stroke-width: 6px; stroke-linecap: round; vector-effect: non-scaling-stroke;
  stroke-dasharray: 1; stroke-dashoffset: 1; animation: raya 700ms var(--entrar) calc(var(--i, 10) * 18ms + 380ms) forwards; }
.titulo-s .raya path { stroke-width: 4.5px; }
@keyframes raya { to { stroke-dashoffset: 0; } }

.chico { font-size: 14px; font-weight: 560; opacity: .72; }
.num { font-variant-numeric: tabular-nums; }
.pastilla {
  display: inline-flex; align-items: center; gap: 8px; justify-self: start; align-self: flex-start;
  padding: 7px 15px 9px; border-radius: 999px; font-weight: 750; font-size: 15px; letter-spacing: -.01em; white-space: nowrap;
}
.pastilla-noche { background: var(--noche); color: #fff; }
.pastilla-blanca { background: #fff; color: var(--tinta); }
.pastilla-lima { background: var(--lima); color: var(--tinta); border: 2px solid var(--tinta); box-shadow: var(--sombra-dura); }
.pastilla i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: latir 1.5s ease-in-out infinite; }
@keyframes latir { 50% { opacity: .2; } }
.accion {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 58px; padding: 0 22px;
  border-radius: 18px; font-weight: 750; font-size: 17px; letter-spacing: -.01em;
  background: var(--violeta-boton); color: #fff; border: 2px solid var(--tinta); box-shadow: var(--sombra-dura);
  transition: transform 110ms, box-shadow 110ms;
}
.accion:active { transform: translate(2px, 3px); box-shadow: 0 0 0 var(--tinta); }
.accion svg { width: 22px; height: 22px; flex: none; }
.noche .accion, .violeta .accion { background: var(--lima); color: var(--tinta); }
.lima .accion { background: var(--noche); color: #fff; }
.accion.accion-borde { background: #fff; color: var(--tinta); }
.accion-dos { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 50px; border-radius: 16px; font-weight: 680; font-size: 16px; }
.accion-dos:active { background: rgb(128 128 128 / .14); }
.google {
  display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 58px; border-radius: 18px;
  background: #fff; color: var(--tinta); font-weight: 720; font-size: 17px; border: 2px solid var(--tinta); box-shadow: var(--sombra-dura);
}
.google:active { transform: translate(2px, 3px); box-shadow: none; }
.google svg { width: 22px; height: 22px; }
.enlace { font-weight: 700; text-decoration: underline wavy; text-decoration-color: var(--raya, var(--lima)); text-underline-offset: 5px; text-decoration-thickness: 2px; }
.foto-caja { position: relative; }
.foto { position: absolute; inset: 0; overflow: hidden; isolation: isolate; border-radius: inherit; background: #ddd8cf; }
.foto > img { width: 100%; height: 100%; object-fit: cover; }
.foto-apagado {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  transform: translateY(calc(var(--arriba) - 100%));
  animation: apagado var(--dura, 1400ms) var(--entrar) var(--espera, 0ms) both;
}
.foto-recorte {
  position: absolute; inset: 0; overflow: hidden;
  --onda: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='6'%3E%3Cpath d='M0 0H32V3Q28 6 24 3T16 3T8 3T0 3Z'/%3E%3C/svg%3E");
  -webkit-mask: var(--onda) left bottom / 32px 6px repeat-x, linear-gradient(#000 0 0) left top / 100% calc(100% - 5.5px) no-repeat;
  mask: var(--onda) left bottom / 32px 6px repeat-x, linear-gradient(#000 0 0) left top / 100% calc(100% - 5.5px) no-repeat;
}
.foto-copia {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transform: translateY(calc(100% - var(--arriba)));
  filter: grayscale(1) brightness(.92) contrast(.9);
  animation: copia var(--dura, 1400ms) var(--entrar) var(--espera, 0ms) both;
}
.foto-onda {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 7px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='7'%3E%3Cpath d='M0 3.5Q4 .5 8 3.5T16 3.5T24 3.5T32 3.5' fill='none' stroke='%23c9ff4a' stroke-width='2.6'/%3E%3C/svg%3E") left top / 32px 7px repeat-x;
  filter: drop-shadow(0 1px 1px rgb(0 0 0 / .35));
}
.foto-caja[data-llena] .foto-apagado { display: none; }
@keyframes apagado { from { transform: translateY(calc(var(--desde, 100%) - 100%)); } }
@keyframes copia { from { transform: translateY(calc(100% - var(--desde, 100%))); } }

.nivel {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  transform: translateY(clamp(18px, var(--arriba), calc(100% - 18px)));
  animation: nivel var(--dura, 1400ms) var(--entrar) var(--espera, 0ms) both;
}
@keyframes nivel { from { transform: translateY(clamp(18px, var(--desde, 100%), calc(100% - 18px))); } }
.ficha {
  position: absolute; right: -8px; top: 0; translate: 0 -50%; rotate: -4deg;
  padding: 5px 11px 6px; border-radius: 999px; white-space: nowrap;
  background: var(--lima); color: var(--tinta); border: 2px solid var(--tinta); box-shadow: var(--sombra-dura);
  font-weight: 800; font-size: 14px; letter-spacing: -.01em; font-variant-numeric: tabular-nums;
}
.ficha-grande { font-size: 22px; padding: 6px 15px 8px; right: -18px; }
.cabeza { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: max(16px, env(safe-area-inset-top)) 18px 4px; }
.local { display: inline-flex; align-items: center; gap: 10px; font-weight: 720; font-size: 15.5px; letter-spacing: -.01em; }
.local img { width: 36px; height: 36px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2.5px #fff; }
.papel .local img { box-shadow: 0 0 0 1.5px var(--linea); }

.mostrador { padding-bottom: max(16px, env(safe-area-inset-bottom)); }
.mostrador-arriba { padding: 14px 20px 0; display: grid; gap: 6px; }
.mostrador-centro { flex: 1; display: grid; place-items: center; padding: 18px 0 14px; min-height: 250px; }
.mostrador-abajo { padding: 0 20px; display: grid; gap: 14px; }
.circulo { width: min(68vw, 280px); aspect-ratio: 1; border-radius: 50%; }
.circulo-grande { width: min(80vw, 330px); }
.circulo > .foto { box-shadow: 0 0 0 5px rgb(255 255 255 / .12), 0 24px 50px -18px rgb(0 0 0 / .6); }
.circulo-anillo { position: absolute; inset: -14px; border-radius: 50%; border: 3px dashed rgb(255 255 255 / .45); animation: girar 14s linear infinite; }
.lima .circulo-anillo { border-color: rgb(28 25 54 / .35); }
@keyframes girar { to { rotate: 1turn; } }
.circulo[data-encendido] > .foto { animation: encender 900ms var(--entrar) both; }
@keyframes encender {
  0% { box-shadow: 0 0 0 5px rgb(255 255 255 / .12), 0 24px 50px -18px rgb(0 0 0 / .6); }
  35% { box-shadow: 0 0 0 18px var(--lima), 0 24px 50px -18px rgb(0 0 0 / .6); }
  100% { box-shadow: 0 0 0 7px var(--lima), 0 24px 50px -18px rgb(0 0 0 / .6); }
}
.chispas { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
.chispas span {
  position: absolute; left: 50%; top: 50%; width: 7px; height: 30px; margin: -15px 0 0 -3.5px; border-radius: 6px;
  background: var(--chispa, var(--lima)); opacity: 0;
  animation: chispa 900ms var(--entrar) var(--cuando, 0ms) both;
}
@keyframes chispa {
  0% { opacity: 0; transform: rotate(var(--a)) translateY(-120px) scaleY(.3); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: rotate(var(--a)) translateY(calc(-1 * var(--r, 190px))) scaleY(1); }
}
.visto {
  position: absolute; right: 3%; bottom: 3%; z-index: 4; display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%;
  background: var(--noche); color: var(--lima); border: 3px solid #fff; animation: caer 500ms var(--rebote) 250ms both;
}
.visto svg { width: 32px; height: 32px; }
@keyframes caer { from { opacity: 0; scale: 2; } }
.nombre {
  display: flex; align-items: center; gap: 14px; padding: 13px 18px 14px; border-radius: 20px;
  background: #fff; color: var(--tinta); box-shadow: var(--sombra-dura); border: 2px solid var(--tinta);
}
.nombre small { display: block; font-size: 13.5px; font-weight: 600; color: var(--apagado); }
.nombre b { display: block; font-size: 27px; font-weight: 800; letter-spacing: -.035em; line-height: 1.05; }
.nombre svg { width: 30px; height: 30px; color: var(--violeta); flex: none; }

.pasos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; padding: 0; list-style: none; }
.pasos li { padding: 10px 11px 11px; border-radius: 16px; font-size: 13.5px; line-height: 1.2; font-weight: 640; background: rgb(255 255 255 / .07); color: rgb(255 255 255 / .55); }
.pasos li b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; margin-bottom: 7px; font-size: 12.5px; font-weight: 800; background: rgb(255 255 255 / .12); color: #fff; }
.pasos li[data-ahora] { background: var(--lima); color: var(--tinta); }
.pasos li[data-ahora] b { background: var(--tinta); color: var(--lima); }

.siguiente { display: flex; align-items: center; gap: 14px; padding: 12px 16px 12px 12px; border-radius: 22px; width: 100%; text-align: left; background: rgb(255 255 255 / .09); }
.lima .siguiente { background: rgb(255 255 255 / .62); }
.siguiente .foto-caja { width: 62px; height: 62px; border-radius: 16px; flex: none; }
.siguiente .ficha, .otro .ficha, .hoja-figura .ficha { font-size: 11px; padding: 2px 7px 3px; right: -12px; box-shadow: none; }
.siguiente b { display: block; font-size: 17px; font-weight: 760; letter-spacing: -.02em; line-height: 1.2; }
.mazo { display: grid; gap: 18px; justify-items: center; width: min(66vw, 262px); border-radius: 34px; }
.mazo:focus-visible { outline-offset: 16px; }
.mazo-cartas { position: relative; width: 100%; aspect-ratio: 4 / 5; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.carta { position: absolute; inset: 0; cursor: grab; transition: transform 460ms var(--entrar), opacity 340ms; }
.carta[data-arrastra] { transition: none; cursor: grabbing; }
.carta img, .eleccion-carta img { pointer-events: none; -webkit-user-drag: none; }
.carta > .foto-caja { position: absolute; inset: 0; border-radius: 34px; }
.carta .foto { box-shadow: 0 0 0 5px rgb(255 255 255 / .14), 0 24px 46px -20px rgb(0 0 0 / .7); transition: filter 340ms, box-shadow 340ms; }
.carta[data-tuyo] .foto { box-shadow: 0 0 0 6px var(--lima), 0 24px 46px -20px rgb(0 0 0 / .7); }
.carta[data-encender] .foto { animation: encender 900ms var(--entrar) both; }
.carta-anillo { position: absolute; inset: -12px; border-radius: 44px; border: 3px dashed rgb(255 255 255 / .45); pointer-events: none; }
.carta[data-pos="0"] { z-index: 5; }
.carta[data-pos="1"] { z-index: 4; transform: translate(34px, 10px) rotate(7.5deg) scale(.92); }
.carta[data-pos="2"] { z-index: 3; transform: translate(-32px, 18px) rotate(-8deg) scale(.86); }
.carta[data-pos="atras"] { z-index: 2; transform: translateY(18px) scale(.8); opacity: 0; }
.carta[data-pos="fuera"] { z-index: 6; pointer-events: none; opacity: 0; transform: translateX(-135%) rotate(-20deg); }
.carta[data-pos="fuera"][data-lado="1"] { transform: translateX(135%) rotate(20deg); }
.carta:not([data-pos="0"]) .foto { filter: brightness(.7) saturate(.85); }
.carta :is(.nivel, .pastilla, .carta-anillo) { transition: opacity 240ms; }
.carta:not([data-pos="0"]) :is(.nivel, .pastilla, .carta-anillo) { opacity: 0; }
.mazo:not([data-abierto]) .carta:is([data-pos="1"], [data-pos="2"]) { transform: translateY(6px) scale(.96); }
.carta[data-pos="1"][data-asoma] { transform: translate(78px, -6px) rotate(12deg) scale(.95); }
.carta[data-pos="2"][data-asoma] { transform: translate(-76px, -2px) rotate(-12deg) scale(.9); }
.carta[data-asoma] .foto { filter: none; }
.carta[data-amague] { animation: amague 1150ms var(--entrar) both; }
.mazo:has([data-amague]) .carta[data-pos="1"] { transform: translate(54px, 4px) rotate(10deg) scale(.94); }
@keyframes amague { 32% { transform: translateX(-62px) rotate(-8deg); } 58% { transform: translateX(-44px) rotate(-5.5deg); } }
.mazo { position: relative; }
.mazo-flechas { position: absolute; z-index: 8; inset: 0 -50px; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.mazo-flechas button {
  pointer-events: auto; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  background: var(--lima); color: var(--tinta); border: 2px solid var(--tinta); box-shadow: var(--sombra-dura);
  transition: opacity 240ms, scale 160ms;
}
.mazo-flechas svg { stroke-width: 3px; }
.mazo-flechas button:active { scale: .9; }
.mazo-flechas button:disabled { opacity: 0; pointer-events: none; }
.mazo-flechas svg { width: 22px; height: 22px; }
.mazo[data-abierto] [data-mazo-mover="1"] { animation: empujar 800ms ease-in-out 700ms 2; }
@keyframes empujar { 50% { translate: 6px 0; } }
.solo-lector { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.mazo-bajada { display: grid; justify-items: center; align-content: center; gap: 8px; min-height: 66px; text-align: center; font-size: 16px; font-weight: 560; opacity: .92; }
.tambien {
  display: inline-block; padding: 5px 14px 7px; border-radius: 999px; rotate: -2deg;
  background: var(--lima); color: var(--tinta); border: 2px solid var(--tinta); box-shadow: var(--sombra-dura);
  font-weight: 800; font-size: 18px; letter-spacing: -.02em;
}
.tambien[data-pop] { animation: caer 520ms var(--rebote) both; }
.mazo-botones { display: grid; gap: 4px; }
.eleccion { display: flex; justify-content: center; align-items: center; padding: 0 12px 18px; }
.eleccion-carta {
  position: relative; flex: none; width: min(46vw, 188px); aspect-ratio: 4 / 5; margin: 0 -9px;
  rotate: calc(var(--lado) * 5deg); translate: 0 calc(var(--k) * 20px);
  transition: transform 460ms var(--rebote), rotate 460ms var(--rebote), filter 300ms;
}
.eleccion-carta > .foto-caja { position: absolute; inset: 0; border-radius: 30px; }
.eleccion-carta .foto { box-shadow: 0 0 0 4px rgb(255 255 255 / .16), 0 20px 40px -18px rgb(0 0 0 / .7); transition: box-shadow 300ms; }
.eleccion:not([data-elegido]) .eleccion-carta { animation: flotar-suave 2.4s ease-in-out calc(var(--k) * -1.2s) infinite alternate; }
@keyframes flotar-suave { to { transform: translateY(-7px) rotate(calc(var(--lado) * 1.5deg)); } }
.eleccion-carta[aria-pressed="true"] { z-index: 2; rotate: 0deg; transform: scale(1.1); }
.eleccion-carta[aria-pressed="true"] .foto { box-shadow: 0 0 0 5px #fff, 0 26px 50px -18px rgb(0 0 0 / .75); }
.eleccion[data-elegido] .eleccion-carta[aria-pressed="false"] { transform: scale(.84); filter: brightness(.5) saturate(.6); }
.eleccion[data-elegido] .eleccion-carta[aria-pressed="false"] .pastilla { opacity: 0; }
.centrado { text-align: center; }
.centrado .mostrador-arriba { justify-items: center; }
.centrado .pastilla { justify-self: center; align-self: center; }
.centrado .mostrador-centro { flex: none; margin-top: auto; padding-top: 30px; }
.centrado .mostrador-abajo { margin-bottom: auto; padding-top: 26px; }
.regalo {
  position: relative; display: grid; gap: 6px; width: 100%; text-align: left; margin-top: 16px;
  padding: 22px 84px 20px 20px; border-radius: 28px; color: var(--tinta);
  border: 2px solid var(--tinta); box-shadow: 3px 4px 0 var(--tinta);
  background: radial-gradient(circle at 11px 11px, rgb(28 25 54 / .1) 3px, transparent 3.6px) 0 0 / 22px 22px, var(--lima);
}
.regalo::before { content: ""; position: absolute; top: 0; bottom: 0; right: 34px; width: 26px; background: var(--violeta); border-inline: 2px solid var(--tinta); }
.regalo > * { position: relative; }
.regalo-mono { position: absolute; right: 6px; top: -34px; width: 86px; transform-origin: 50% 80%; animation: mecer 2.6s ease-in-out infinite alternate; }
@keyframes mecer { from { rotate: -5deg; } to { rotate: 5deg; } }
.regalo small { font-size: 14px; font-weight: 700; }
.regalo b { font-size: 30px; font-weight: 800; letter-spacing: -.045em; line-height: 1; }
.regalo-texto { font-size: 15.5px; font-weight: 560; line-height: 1.35; }
.regalo-google {
  justify-self: start; display: inline-flex; align-items: center; gap: 9px; margin-top: 8px; padding: 9px 15px 10px;
  border-radius: 14px; background: #fff; border: 2px solid var(--tinta); font-weight: 750; font-size: 15px;
}
.regalo-google svg { width: 18px; height: 18px; }
.regalo-abierto { display: grid; gap: 14px; margin-top: 16px; padding: 14px; border-radius: 28px; background: var(--superficie); box-shadow: var(--elevar); }
.regalo-abierto-arriba { display: flex; align-items: center; gap: 14px; }
.regalo-abierto-arriba .foto-caja { width: 76px; height: 76px; border-radius: 20px; flex: none; }
.regalo-abierto small { display: block; font-size: 14px; font-weight: 650; color: var(--apagado); }
.regalo-abierto b { font-size: 22px; font-weight: 800; letter-spacing: -.035em; }
.regalo-incluido { display: flex; align-items: center; gap: 12px; padding: 8px 14px 8px 8px; border-radius: 18px; border: 1.5px dashed rgb(201 255 74 / .55); font-size: 14.5px; line-height: 1.3; text-align: left; }
.regalo-incluido[hidden] { display: none; }
.regalo-incluido img { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; flex: none; }
.regalo-incluido b { display: block; color: var(--lima); font-size: 15.5px; }
.con-regalo { display: inline-flex; align-items: center; gap: 9px; padding: 5px 14px 5px 5px; border-radius: 999px; background: #fff; color: var(--tinta); font-weight: 720; font-size: 15px; }
.con-regalo img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.con-regalo-hoja { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 18px; background: var(--lima); font-weight: 600; font-size: 15px; line-height: 1.3; }
.hoja .con-regalo-hoja { color: var(--tinta); }
.con-regalo-hoja img { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; flex: none; }
.vence { position: absolute; z-index: 4; left: 10px; top: 10px; rotate: -4deg; font-size: 13px; padding: 4px 10px 6px; }
.envoltorio { position: absolute; inset: 0; z-index: 3; }
.envoltorio span { position: absolute; top: 0; bottom: 0; width: 50%; background-size: 200% 100%; animation: romper 760ms var(--entrar) 1100ms forwards; }
.envoltorio span:first-child { left: 0; background-position: left center; --hacia: -1; }
.envoltorio span:last-child { right: 0; background-position: right center; --hacia: 1; }
@keyframes romper { to { transform: translate(calc(var(--hacia) * 70%), 12%) rotate(calc(var(--hacia) * 26deg)); opacity: 0; } }

.escanear { position: fixed; z-index: 30; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); translate: -50% 0; width: min(calc(100% - 40px), 360px); }

.grilla { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 14px; }
.grilla .item { flex: none; }
.fondo-hoja { position: fixed; inset: 0; z-index: 50; background: rgb(14 12 30 / .55); animation: aparecer 260ms ease both; }
@keyframes aparecer { from { opacity: 0; } }
.hoja {
  position: fixed; z-index: 51; left: 50%; bottom: 0; translate: -50% 0; width: min(100%, 480px); overflow: hidden;
  background: var(--papel); color: var(--tinta); border-radius: 32px 32px 0 0; --clave: var(--violeta-boton); --raya: var(--lima);
  padding: 12px 20px max(18px, env(safe-area-inset-bottom)); display: grid; gap: 16px; animation: hoja 480ms var(--entrar) both;
}
@keyframes hoja { from { transform: translateY(100%); } }
.hoja::before { content: ""; justify-self: center; width: 42px; height: 5px; border-radius: 9px; background: rgb(28 25 54 / .15); position: relative; z-index: 1; }
.hoja > :not(.masas) { position: relative; z-index: 1; }
.hoja p { color: #3d3a48; }
.hoja-figura { display: flex; align-items: center; gap: 16px; padding: 12px; border-radius: 22px; background: var(--superficie); }
.hoja-figura .foto-caja { width: 74px; height: 74px; border-radius: 18px; flex: none; }
.hoja .accion-dos { color: var(--apagado); }
.ruedas { position: relative; display: grid; grid-template-columns: 1fr 1.9fr; gap: 6px; height: 184px; perspective: 520px; }
.ruedas::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 50px; translate: 0 -50%;
  border-radius: 16px; background: var(--lima); border: 2px solid var(--tinta); box-shadow: var(--sombra-dura);
}
.rueda {
  position: relative; margin: 0; padding: 69px 0; list-style: none; overflow-y: auto; overscroll-behavior: contain;
  scroll-snap-type: y mandatory; scrollbar-width: none; transform-style: preserve-3d; border-radius: 16px;
  -webkit-mask: linear-gradient(transparent, #000 32%, #000 68%, transparent); mask: linear-gradient(transparent, #000 32%, #000 68%, transparent);
}
.rueda::-webkit-scrollbar { display: none; }
.rueda:focus-visible { outline-offset: -3px; }
.rueda li {
  height: 46px; display: grid; place-items: center; scroll-snap-align: center; cursor: pointer;
  font-size: 23px; font-weight: 800; letter-spacing: -.03em; color: var(--tinta); font-variant-numeric: tabular-nums; backface-visibility: hidden;
}
.falta-cumple { min-height: 24px; text-align: center; font-size: 16.5px; font-weight: 600; }
.falta-cumple b { color: var(--violeta-tinta); }
.falta-cumple [data-latir] { display: inline-block; animation: latido 320ms var(--rebote); }
@keyframes latido { from { scale: 1.12; } }

.tostada {
  position: fixed; z-index: 60; left: 50%; top: max(14px, env(safe-area-inset-top)); translate: -50% 0;
  display: flex; align-items: center; gap: 10px; padding: 11px 18px; border-radius: 99px;
  background: var(--noche); color: #fff; font-weight: 680; font-size: 15px; white-space: nowrap; animation: tostada 3s var(--entrar) both;
}
.tostada svg { width: 18px; height: 18px; color: var(--lima); }
@keyframes tostada { from { opacity: 0; transform: translateY(-20px); } 12%, 85% { opacity: 1; transform: none; } to { opacity: 0; } }
.camara-vista { position: relative; flex: 1; min-height: 420px; }
.mira { position: absolute; left: 50%; top: 46%; translate: -50% -50%; width: 250px; aspect-ratio: 1; }
.mira > svg { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--lima); z-index: 2; }
.mira::after { content: ""; position: absolute; left: 30px; right: 30px; height: 3px; top: 30px; border-radius: 3px; background: var(--lima); box-shadow: 0 0 18px var(--lima); animation: barrer 1.6s ease-in-out infinite alternate; z-index: 3; }
@keyframes barrer { to { top: calc(100% - 33px); } }
.cartel { position: absolute; inset: 36px; border-radius: 22px; background: #fff; display: grid; place-items: center; box-shadow: 0 20px 40px -10px rgb(0 0 0 / .6); }
.cartel svg { width: 64%; height: 64%; color: var(--tinta); }
.detectado {
  position: absolute; left: 50%; bottom: 4%; translate: -50% 0; display: flex; align-items: center; gap: 10px;
  padding: 9px 18px 9px 9px; border-radius: 99px; background: #fff; color: var(--tinta); font-weight: 750; white-space: nowrap;
  animation: subir 520ms var(--rebote) 1000ms both;
}
.detectado img { width: 34px; height: 34px; border-radius: 50%; }
@keyframes subir { from { opacity: 0; transform: translateY(26px) scale(.85); } }
.camara-pie { padding: 0 24px max(30px, env(safe-area-inset-bottom)); display: grid; gap: 8px; text-align: center; justify-items: center; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 260ms; }
::view-transition-group(servido) { animation-duration: 560ms; animation-timing-function: var(--entrar); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .carta { cursor: default; }
}
