/* El Laboratorio Loco — base: CUADERNO DE CIENTÍFICO. Hojas de papel cuadriculado con margen rojo y espiral de alambre,
   fórmulas y dibujitos a lápiz, notas adhesivas con cinta, sellos de "¡Experimento exitoso!", botones como BOTONES DE
   MÁQUINA (con foquito) y ETIQUETAS DE FRASCO, perillas redondas, y el contador como 5 MATRACES en una gradilla que se
   llenan de color. Letras: Caveat (títulos a mano) + Patrick Hand (texto a mano, legible). Todo cuelga de html.ll. Por
   dentro se mide contra el marco (.app es un contenedor de tamaño: cqw/cqh), nunca contra la ventana. Contraste ≥ 4.5:1. */
.ll {
  --tinta: #2B3150; --tinta-2: #4A5170; --papel: #FFFDF5; --papel-2: #F6F1E3; --cuadro: #C9DAF0; --margen: #E8A0A6;
  --nota: #FFF2A8; --nota-rosa: #FFD3E4; --sello: #C62F3B; --verde: #1F7A72; --verde-l: #2A9D93; --led: #B8F04A; --metal: #D9DEE6;
  --exp: #FF7BB0;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --f-titulo: "Caveat", "Patrick Hand", "Comic Sans MS", cursive;
  --f-texto: "Patrick Hand", system-ui, -apple-system, "Segoe UI", sans-serif;
  --papel-cuadros: repeating-linear-gradient(0deg, var(--cuadro) 0 1px, transparent 1px 20px), repeating-linear-gradient(90deg, var(--cuadro) 0 1px, transparent 1px 20px);
  --sombra-h: 0 2px 0 rgba(43, 49, 80, .25), 0 12px 22px rgba(43, 49, 80, .22);
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
}
.ll *, .ll *::before, .ll *::after { box-sizing: border-box; }
.ll body { margin: 0; font-family: var(--f-texto); color: var(--tinta); overflow: hidden; overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
.ll button { font: inherit; color: inherit; }
.ll :focus-visible { outline: 3px solid var(--tinta); outline-offset: 3px; box-shadow: 0 0 0 6px var(--led); }
.ll .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ll .noscript { margin: 24px; font: 400 19px/1.5 var(--f-texto); background: var(--papel); padding: 16px; border-radius: 10px; }

/* ---------- marco ---------- */
.ll .fondo { position: fixed; inset: 0; z-index: 0; pointer-events: none; background: var(--papel-cuadros), linear-gradient(180deg, #FFF6E6, #E6F7F4); }
.ll:not(.is-showcase) .fondo { filter: blur(1.5px); }
.ll.is-showcase .fondo { display: none; }
.ll .app { position: fixed; inset: 0; z-index: 1; overflow: hidden; isolation: isolate; container-type: size; container-name: marco; background: #FFF6E6; transition: opacity .5s ease; }
/* computadora y tableta: el mismo marco de teléfono que los demás diseños */
@media (min-width: 560px) and (min-height: 560px) {
  .ll .app { inset: auto; left: 50%; top: 50%; width: min(430px, 100vw - 32px); height: min(932px, 100dvh - 40px); transform: translate(-50%, -50%); border-radius: 30px;
    box-shadow: 0 0 0 4px var(--papel), 0 0 0 11px #2EC4B6, 0 0 0 14px var(--tinta), 0 30px 90px rgba(43, 49, 80, .42); }
}
.ll.is-showcase .app { inset: 0 !important; width: auto !important; height: auto !important; transform: none !important; border-radius: 0 !important; box-shadow: none !important; }
.ll .stage { position: absolute; inset: 0; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; outline: none; }
.ll .stage:focus-visible { box-shadow: inset 0 0 0 4px var(--led), inset 0 0 0 7px var(--tinta); }
.ll .gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .7s ease; }
.ll .gl.is-on { opacity: 1; }
.ll .vineta { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(130% 90% at 50% 50%, rgba(255, 246, 230, 0) 64%, rgba(43, 49, 80, .16) 100%); }
.ll .sin-gl .stage { background: url("../assets/poster/fondo-lab.webp") center / cover no-repeat, linear-gradient(180deg, #FFF6E6, #CFF3EA); }
.ll .ui { position: absolute; inset: 0; pointer-events: none; z-index: 20; }
.ll .ui > * { pointer-events: auto; }

/* ---------- hoja de cuaderno: cuadrícula, margen rojo, espiral ---------- */
.ll .cuaderno { position: relative; color: var(--tinta); border-radius: 4px 4px 8px 8px; padding-top: 26px;
  background: linear-gradient(90deg, transparent 30px, var(--margen) 30px 32px, transparent 32px), var(--papel-cuadros), var(--papel);
  box-shadow: 0 0 0 2px rgba(43, 49, 80, .55), var(--sombra-h); }
.ll .espiral { position: absolute; left: 18px; right: 18px; top: -12px; display: flex; justify-content: space-between; pointer-events: none; }
.ll .espiral i { display: block; width: 10px; height: 30px; border-radius: 6px; background: linear-gradient(90deg, #8F98A8, #F4F6FA 45%, #9AA3B4); box-shadow: 0 0 0 1.5px var(--tinta); }
.ll .espiral i::after { content: ""; display: block; width: 8px; height: 8px; margin: 22px 0 0 1px; border-radius: 50%; background: #E6DFCC; box-shadow: inset 0 1px 2px rgba(43, 49, 80, .5); }

/* ---------- botones: MÁQUINA (con foquito), ETIQUETA DE FRASCO y PERILLA ---------- */
.ll .maquina {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 0 24px 0 18px;
  border: 0; border-radius: 14px; color: #fff; text-decoration: none; cursor: pointer; font: 400 21px/1.05 var(--f-texto); letter-spacing: .01em; text-align: center;
  background: linear-gradient(180deg, var(--verde-l) 0%, var(--verde) 60%, #18625C 100%);
  box-shadow: inset 0 0 0 2.5px var(--tinta), inset 0 3px 0 3px rgba(255, 255, 255, .22), inset 0 -4px 0 2px rgba(0, 0, 0, .18), 0 5px 0 var(--tinta), 0 10px 16px rgba(43, 49, 80, .3);
  transition: transform .08s ease, box-shadow .08s ease; touch-action: manipulation; user-select: none;
}
.ll .maquina > * { position: relative; }
/* tornillitos de las esquinas */
.ll .maquina::before, .ll .maquina::after { content: ""; position: absolute; top: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--metal); box-shadow: inset 0 0 0 1.4px var(--tinta); }
.ll .maquina::before { left: 7px; } .ll .maquina::after { right: 7px; }
.ll .maquina:active { transform: translateY(4px); box-shadow: inset 0 0 0 2.5px var(--tinta), inset 0 3px 0 3px rgba(255, 255, 255, .22), inset 0 -2px 0 2px rgba(0, 0, 0, .18), 0 1px 0 var(--tinta); }
.ll .led { width: 14px; height: 14px; flex: none; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, var(--led) 45%, #6FA820); box-shadow: 0 0 0 2px var(--tinta), 0 0 10px 2px rgba(184, 240, 74, .7); }
.ll .maquina.is-grande { min-height: 64px; font-size: 25px; padding: 0 28px 0 22px; border-radius: 16px; }
.ll .maquina.is-bloque { width: 100%; }
.ll .maquina.is-chico { min-height: 46px; font-size: 18px; padding: 0 16px; }
.ll .pi { display: inline-flex; }

.ll .frasco-etq {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 46px; padding: 0 16px;
  border: 0; color: var(--tinta); text-decoration: none; cursor: pointer; font: 400 18px/1.1 var(--f-texto); text-align: center;
  background: radial-gradient(circle at 0 0, transparent 7px, #FFFBEA 7.5px) top left / 51% 51% no-repeat, radial-gradient(circle at 100% 0, transparent 7px, #FFFBEA 7.5px) top right / 51% 51% no-repeat,
    radial-gradient(circle at 0 100%, transparent 7px, #FFFBEA 7.5px) bottom left / 51% 51% no-repeat, radial-gradient(circle at 100% 100%, transparent 7px, #FFFBEA 7.5px) bottom right / 51% 51% no-repeat;
  filter: drop-shadow(0 0 1.2px var(--tinta)) drop-shadow(0 0 .6px var(--tinta)) drop-shadow(0 3px 0 rgba(43, 49, 80, .35));
  touch-action: manipulation;
}
.ll .frasco-etq::after { content: ""; position: absolute; inset: 4px 6px; border: 1.5px dashed rgba(43, 49, 80, .45); border-radius: 3px; pointer-events: none; }
.ll .frasco-etq > * { position: relative; }
.ll .frasco-etq:active { transform: translateY(2px); }
.ll .frasco-etq.is-wa { background-color: transparent; }
.ll .frasco-etq.is-wa > .pi { color: #12704A; }
.ll .frasco-etq.is-mini { min-height: 44px; padding: 0 12px; font-size: 16.5px; }

.ll .perilla { width: 50px; height: 50px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; color: var(--tinta); cursor: pointer; touch-action: manipulation;
  background: radial-gradient(circle at 50% 50%, var(--papel) 0 15px, transparent 15.5px), conic-gradient(from 0deg, #AEB8C6, #F4F6FA, #9AA3B4, #E6EAF0, #AEB8C6);
  box-shadow: inset 0 0 0 2.5px var(--tinta), inset 0 0 0 7px rgba(255, 255, 255, .25), 0 3px 0 var(--tinta), 0 6px 10px rgba(43, 49, 80, .25); }
.ll .perilla:active { transform: translateY(2px); box-shadow: inset 0 0 0 2.5px var(--tinta), 0 1px 0 var(--tinta); }
.ll .enlace { min-height: 44px; padding: 0 8px; border: 0; background: none; color: var(--tinta); cursor: pointer; font: 400 18px/1.2 var(--f-texto); text-decoration: underline wavy; text-underline-offset: 4px; text-decoration-thickness: 1.5px; text-decoration-color: var(--sello); }

/* ---------- HUD: perillas y la gradilla de 5 matraces ---------- */
.ll .hud { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; padding: calc(10px + var(--safe-t)) 11px 0; pointer-events: none; z-index: 8; transition: opacity .3s; }
.ll .hud > * { pointer-events: auto; }
.ll .hud.is-intro { opacity: 0; }
.ll .hud.is-portada .gradilla, .ll .app[data-fase="celebra"] .gradilla, .ll .app[data-fase="final"] .gradilla { visibility: hidden; }
.ll .gradilla { position: relative; display: flex; align-items: flex-end; gap: 4px; margin: 0; padding: 4px 12px 0; min-height: 52px; }
.ll .gradilla::before { content: ""; position: absolute; left: 0; right: 0; bottom: 10px; height: 9px; border-radius: 3px; background: linear-gradient(180deg, #F2C793, #D9A066); box-shadow: 0 0 0 2px var(--tinta); }
.ll .gradilla::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 9px; border-radius: 3px; background: linear-gradient(180deg, #E8B27A, #C98B57); box-shadow: 0 0 0 2px var(--tinta), 0 3px 0 rgba(43, 49, 80, .3); }
.ll .mt { position: relative; z-index: 1; display: block; line-height: 0; transform-origin: 50% 100%; }
.ll .mt.is-pop { animation: ll-mt .6s cubic-bezier(.2, 1.5, .4, 1) both; }
@keyframes ll-mt { 0% { transform: scale(.4, 1.5); } 60% { transform: scale(1.3, .84); } 100% { transform: scale(1); } }

/* ---------- el rótulo del experimento: tira de cinta adhesiva arriba ---------- */
.ll .rotulo { position: absolute; left: 50%; top: calc(76px + var(--safe-t)); width: min(310px, 82cqw); padding: 6px 18px 8px; text-align: center; transform: translate(-50%, -14px) rotate(-1.4deg); opacity: 0; transition: opacity .3s, transform .3s; pointer-events: none !important;
  background: linear-gradient(90deg, rgba(255, 255, 255, .35), transparent 40%), #F7EBC9; box-shadow: 0 1px 0 rgba(43, 49, 80, .3), 0 6px 12px rgba(43, 49, 80, .18);
  clip-path: polygon(0 4%, 3% 0, 7% 6%, 12% 1%, 18% 5%, 25% 0, 33% 4%, 41% 1%, 50% 5%, 58% 0, 66% 4%, 74% 1%, 82% 5%, 90% 0, 96% 4%, 100% 1%, 100% 96%, 97% 100%, 92% 95%, 86% 100%, 79% 96%, 71% 100%, 63% 95%, 55% 100%, 47% 96%, 39% 100%, 31% 95%, 23% 100%, 15% 96%, 8% 100%, 3% 95%, 0 100%); }
.ll .rotulo.is-on { opacity: 1; transform: translate(-50%, 0) rotate(-1.4deg); }
.ll .ro-k { margin: 0; font: 400 16px/1.1 var(--f-texto); color: var(--tinta-2); }
.ll .ro-t { margin: 0; font: 700 34px/1 var(--f-titulo); color: var(--tinta); }
.ll .ro-t::after { content: ""; display: block; height: 5px; margin: 1px 18% 0; border-radius: 3px; background: var(--exp); opacity: .85; transform: rotate(-.6deg); }
.ll .ro-f { margin: 2px 0 0; font: 400 16px/1.1 var(--f-texto); color: var(--tinta-2); }

/* ---------- la nota adhesiva (instrucción, medidor y "Hacer el experimento") ---------- */
.ll .nota { position: absolute; left: 50%; bottom: calc(22px + var(--safe-b)); display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 10px; width: min(330px, 88cqw); margin: 0; padding: 12px 16px 12px 12px;
  background: linear-gradient(135deg, var(--nota) 0 86%, #E8D77E 86% 88%, transparent 88%); color: var(--tinta);
  filter: drop-shadow(0 2px 0 rgba(43, 49, 80, .32)) drop-shadow(0 8px 10px rgba(43, 49, 80, .18)); opacity: 0; transform: translate(-50%, 14px) rotate(1.2deg); transition: opacity .25s, transform .25s; pointer-events: none !important; }
.ll .nota.is-on { opacity: 1; transform: translate(-50%, 0) rotate(1.2deg); }
.ll .nota-cinta { position: absolute; left: 50%; top: -10px; width: 74px; height: 20px; margin-left: -37px; background: rgba(255, 255, 255, .55); box-shadow: 0 0 0 1px rgba(43, 49, 80, .12); transform: rotate(-3deg); }
.ll .nota-dib { line-height: 0; }
.ll .nota-txt { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ll .nota-t { font: 400 clamp(20px, 5.6cqw, 23px)/1.12 var(--f-texto); }
.ll .nota[data-modo="bien"] { background: linear-gradient(135deg, #CDF5D8 0 86%, #9ED9AE 86% 88%, transparent 88%); }
.ll .medidor { display: block; height: 10px; border-radius: 0 6px 6px 0; background: rgba(255, 255, 255, .7); box-shadow: inset 0 0 0 2px var(--tinta); overflow: hidden; }
.ll .medidor i { display: block; height: 100%; background: repeating-linear-gradient(-45deg, var(--exp) 0 6px, color-mix(in srgb, var(--exp) 70%, #fff) 6px 12px); transform-origin: left; transform: scaleX(0); transition: transform .18s linear; }
.ll .hacer { grid-column: 1 / -1; justify-self: center; display: none; }
.ll .nota.is-hacer .hacer { display: inline-flex; }
.ll .nota.is-hacer { pointer-events: auto !important; }
/* (con el teclado el botón se puede alcanzar siempre: aparece al enfocarlo) */
.ll .hacer:focus-visible { display: inline-flex; }
.ll .nota:focus-within { pointer-events: auto !important; }

/* ---------- la manita que enseña el gesto ---------- */
.ll .manita { position: absolute; left: 0; top: 0; width: 64px; height: 64px; margin: -6px 0 0 -18px; opacity: 0; transform: translate(var(--x), var(--y)); pointer-events: none !important; }
.ll .manita.is-on { opacity: 1; }
.ll .manita-dedo { position: relative; z-index: 1; display: block; line-height: 0; filter: drop-shadow(0 3px 4px rgba(43, 49, 80, .35)); }
.ll .manita-onda { position: absolute; left: 12px; top: 0; width: 24px; height: 24px; margin: -12px 0 0 -2px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--tinta); opacity: 0; }
.ll .manita.is-on[data-gesto="jalar"] .manita-dedo { animation: ll-jala 1.5s ease-in-out infinite; }
@keyframes ll-jala { 0%, 15% { transform: translateY(-8px) scale(1); } 30% { transform: translateY(-4px) scale(.9); } 80% { transform: translateY(72px) scale(.9); } 100% { transform: translateY(72px) scale(1); opacity: 0; } }
.ll .manita.is-on[data-gesto="mantener"] .manita-dedo { animation: ll-mant 2s ease-in-out infinite; }
.ll .manita.is-on[data-gesto="mantener"] .manita-onda { animation: ll-onda-larga 2s ease-out infinite; }
@keyframes ll-mant { 0%, 100% { transform: scale(1); } 15%, 80% { transform: scale(.86); } }
@keyframes ll-onda-larga { 0%, 12% { opacity: 0; transform: scale(.3); } 20% { opacity: .9; } 80% { opacity: .6; transform: scale(2.6); } 100% { opacity: 0; transform: scale(2.8); } }
.ll .manita.is-on[data-gesto="tocar"] .manita-dedo { animation: ll-toca .42s ease-in-out infinite; }
.ll .manita.is-on[data-gesto="tocar"] .manita-onda { animation: ll-onda .42s ease-out infinite; }
@keyframes ll-toca { 0%, 100% { transform: translateY(-6px) scale(1); } 50% { transform: translateY(6px) scale(.88); } }
@keyframes ll-onda { 0%, 40% { opacity: 0; transform: scale(.4); } 55% { opacity: .9; } 100% { opacity: 0; transform: scale(1.8); } }
.ll .manita.is-on[data-gesto="girar"] .manita-dedo { animation: ll-gira 1.6s linear infinite; }
@keyframes ll-gira { 0% { transform: rotate(0deg) translateX(34px) rotate(0deg); } 100% { transform: rotate(360deg) translateX(34px) rotate(-360deg); } }
.ll .manita.is-on[data-gesto="apretar"] .manita-dedo { animation: ll-aprieta 1.1s ease-in-out infinite; }
.ll .manita.is-on[data-gesto="apretar"] .manita-onda { animation: ll-onda 1.1s ease-out infinite; }
@keyframes ll-aprieta { 0%, 100% { transform: translateY(-14px) scale(1); } 45%, 60% { transform: translateY(4px) scale(.86); } }

/* ---------- cuenta regresiva del cohete ---------- */
.ll .regresiva { position: absolute; left: 0; right: 0; top: 30cqh; margin: 0; text-align: center; pointer-events: none !important; }
.ll .regresiva span { display: inline-block; padding: 4px 26px 8px; font: 700 76px/1 var(--f-titulo); color: var(--sello); background: rgba(255, 253, 245, .92); border-radius: 50%; box-shadow: inset 0 0 0 5px var(--sello), inset 0 0 0 9px var(--papel), inset 0 0 0 11px var(--sello), 0 8px 18px rgba(43, 49, 80, .25); animation: ll-reg .9s cubic-bezier(.2, 1.3, .4, 1) both; }
.ll .regresiva span:not(:empty) { min-width: 130px; }
@keyframes ll-reg { 0% { opacity: 0; transform: scale(2.2) rotate(-12deg); } 25% { opacity: 1; transform: scale(.95) rotate(-6deg); } 75% { opacity: 1; transform: scale(1) rotate(-6deg); } 100% { opacity: 0; transform: scale(.9) rotate(-6deg); } }

/* ---------- portada ---------- */
.ll .portada { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: calc(78px + var(--safe-t)) 18px calc(20px + var(--safe-b)); transition: opacity .3s, transform .3s; pointer-events: none !important; }
.ll .portada.is-out { opacity: 0; transform: translateY(-14px); }
.ll .portada-hoja { padding: 30px 18px 14px 44px; transform: rotate(-1deg); pointer-events: auto; animation: ll-hoja-entra .6s cubic-bezier(.2, 1.2, .4, 1) both; }
@keyframes ll-hoja-entra { 0% { opacity: 0; transform: translateY(-24px) rotate(3deg); } 100% { opacity: 1; transform: rotate(-1deg); } }
.ll .portada-garabato { position: absolute; right: 8px; bottom: 6px; opacity: .6; line-height: 0; }
.ll .portada-k { margin: 0 0 2px; font: 400 18px/1.2 var(--f-texto); color: var(--tinta-2); }
.ll .portada-t { margin: 0 0 6px; font: 700 clamp(38px, 11cqw, 46px)/.98 var(--f-titulo); color: var(--tinta); }
.ll .portada-sub { margin: 0; padding-right: 30px; font: 400 18.5px/1.28 var(--f-texto); }
.ll .portada-acciones { display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: auto; animation: ll-sube .5s .15s ease-out both; }
@keyframes ll-sube { 0% { opacity: 0; transform: translateY(16px); } 100% { opacity: 1; transform: none; } }
.ll .portada-extras { display: flex; flex-wrap: wrap; justify-content: center; }
.ll .portada-extras .enlace { padding: 4px 12px; border-radius: 4px; background: rgba(255, 253, 245, .94); box-shadow: 0 0 0 1.5px rgba(43, 49, 80, .3); }
.ll .is-empezar { min-width: 240px; touch-action: none; }
.ll .saltar-intro { position: absolute; left: 50%; bottom: calc(14px + var(--safe-b)); transform: translateX(-50%); padding: 4px 14px; border-radius: 4px; background: rgba(255, 253, 245, .94); white-space: nowrap; box-shadow: 0 0 0 1.5px rgba(43, 49, 80, .3); }
.ll .saltar { position: absolute; right: 12px; bottom: calc(12px + var(--safe-b)); padding: 4px 14px; border-radius: 4px; background: rgba(255, 253, 245, .94); box-shadow: 0 0 0 1.5px rgba(43, 49, 80, .3); }

/* ---------- la hoja de cada experimento ---------- */
.ll .tarjeta { position: absolute; left: 12px; right: 12px; bottom: calc(14px + var(--safe-b)); max-height: calc(100cqh - 170px); overflow: visible; padding: 30px 16px 16px 42px; transform: translateY(30px) rotate(.8deg); opacity: 0; transition: transform .38s cubic-bezier(.2, 1.3, .4, 1), opacity .25s; }
.ll .tarjeta.is-in { transform: rotate(.4deg); opacity: 1; }
.ll .tarjeta.is-out { transform: translateY(40px) rotate(1.6deg); opacity: 0; }
.ll .sello { position: absolute; right: 10px; top: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 112px; min-height: 56px; margin: 0; padding: 4px 6px; color: var(--sello); font: 700 22px/.95 var(--f-titulo); text-align: center;
  border: 3px solid currentColor; outline: 1.5px solid currentColor; outline-offset: 2px; border-radius: 6px; transform: rotate(-11deg); background: rgba(255, 253, 245, .7);
  -webkit-mask: radial-gradient(circle at 20% 30%, transparent 0 1.4px, #000 1.6px) 0 0 / 9px 7px, linear-gradient(#000, #000); -webkit-mask-composite: source-in; mask: radial-gradient(circle at 20% 30%, transparent 0 1.2px, #000 1.4px) 0 0 / 9px 7px; animation: ll-sello .42s .36s cubic-bezier(.2, 1.1, .3, 1) both; }
.ll .sello span { display: block; }
@keyframes ll-sello { 0% { opacity: 0; transform: rotate(-11deg) scale(2.4); } 70% { opacity: 1; transform: rotate(-11deg) scale(.92); } 100% { opacity: 1; transform: rotate(-11deg) scale(1); } }
.ll .tj-k { margin: 0 118px 0 0; font: 400 16.5px/1.15 var(--f-texto); color: var(--tinta-2); }
.ll .tj-t { margin: 0 118px 10px 0; font: 700 clamp(34px, 9.6cqw, 40px)/.98 var(--f-titulo); }
.ll .tj-t::after { content: ""; display: block; height: 5px; width: 70%; margin-top: 2px; border-radius: 3px; background: var(--exp); transform: rotate(-.8deg); }
.ll .tj-t:focus, .ll .tj-t:focus-visible { outline: none; box-shadow: none; }
.ll .tj-cuerpo { display: flex; flex-direction: column; gap: 9px; margin-bottom: 8px; overflow: auto; max-height: calc(100cqh - 420px); font: 400 19px/1.3 var(--f-texto); }
.ll .tj-cuerpo p { margin: 0; }
.ll .tj-formula { margin: 0 0 10px; font: 400 17px/1.1 var(--f-texto); color: var(--tinta-2); text-align: right; transform: rotate(-1deg); }
.ll .tj-seguir { touch-action: none; overflow: hidden; }
.ll .tj-avance { position: absolute !important; left: 16px; right: 16px; bottom: 6px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .75); transform-origin: left; transform: scaleX(0); }
.ll .tarjeta.is-auto .tj-avance { animation: ll-av var(--auto, 11s) linear both; }
@keyframes ll-av { 0% { transform: scaleX(0); } 100% { transform: scaleX(1); } }
.ll.rm .tj-avance { display: none; }

.ll .dato-grande { padding: 8px 12px 10px; text-align: center; background: color-mix(in srgb, var(--exp) 22%, var(--papel)); border: 2.5px dashed var(--tinta); border-radius: 6px; transform: rotate(-.6deg); }
.ll .dg-k { margin: 0; font: 400 19px/1.15 var(--f-texto); text-transform: capitalize; }
.ll .dg-v { margin: 0; font: 700 clamp(42px, 12cqw, 50px)/1 var(--f-titulo); }
.ll .dg-s { margin: 0; font: 400 17.5px/1.2 var(--f-texto); }
.ll .nota-lapiz { align-self: center; margin: 0; padding: 0 12px; font: 700 26px/1.1 var(--f-titulo); color: var(--sello); }
.ll .acciones { display: flex; flex-wrap: wrap; gap: 8px; }
.ll .acciones > * { flex: 1 1 140px; }
.ll .bitacora { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.ll .bitacora li { display: grid; grid-template-columns: 80px 1fr; gap: 8px; align-items: baseline; padding: 2px 0; border-bottom: 1.5px solid rgba(43, 49, 80, .18); }
.ll .bt-hora { color: var(--verde); }
.ll .mapita { line-height: 0; border-radius: 4px; overflow: hidden; box-shadow: 0 0 0 2px var(--tinta); transform: rotate(.4deg); }
.ll .mapita svg { width: 100%; height: auto; display: block; }
.ll .lugar-nombre { margin: 0; font: 700 30px/1 var(--f-titulo); }
.ll .lugar-dir { margin: 0; font: 400 17px/1.25 var(--f-texto); }
.ll .mensaje { margin: 0; padding: 10px 14px; background: var(--nota-rosa); transform: rotate(-1.2deg); box-shadow: 0 2px 0 rgba(43, 49, 80, .25), 0 6px 10px rgba(43, 49, 80, .12); }
.ll .mensaje p { font: 700 29px/1.08 var(--f-titulo); }
.ll .mensaje footer { margin-top: 4px; font: 400 19px/1.2 var(--f-texto); color: var(--tinta-2); }
.ll .anfitriones { font: 700 40px/1 var(--f-titulo); text-align: center; }
.ll .invita-nota { text-align: center; }

/* ---------- final ---------- */
.ll .cumple { position: absolute; left: 0; right: 0; top: 37cqh; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 12px; pointer-events: none !important; animation: ll-cumple .6s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes ll-cumple { 0% { opacity: 0; transform: translateY(16px) scale(.8); } 100% { opacity: 1; transform: none; } }
.ll .cumple-t { position: relative; margin: 0; padding: 4px 28px 8px; font: 700 clamp(42px, 12cqw, 52px)/1 var(--f-titulo); color: var(--tinta); transform: rotate(-2deg);
  background: linear-gradient(90deg, rgba(255, 255, 255, .35), transparent 40%), #F7EBC9; box-shadow: 0 2px 0 rgba(43, 49, 80, .28), 0 8px 14px rgba(43, 49, 80, .2);
  clip-path: polygon(0 6%, 4% 0, 10% 5%, 17% 0, 25% 4%, 33% 0, 42% 5%, 50% 0, 58% 4%, 67% 0, 75% 5%, 83% 0, 91% 4%, 97% 0, 100% 5%, 100% 95%, 96% 100%, 89% 95%, 81% 100%, 73% 96%, 65% 100%, 57% 95%, 49% 100%, 41% 96%, 33% 100%, 25% 95%, 17% 100%, 9% 96%, 3% 100%, 0 95%); }
.ll .cumple-t span { background: linear-gradient(transparent 62%, color-mix(in srgb, #FF7BB0 55%, transparent) 62% 88%, transparent 88%); }
.ll .cumple-k { margin: 0 0 4px; padding: 2px 12px; font: 400 18px/1.2 var(--f-texto); color: var(--tinta); background: rgba(255, 253, 245, .94); border-radius: 4px; box-shadow: 0 0 0 1.5px rgba(43, 49, 80, .3); }
.ll .cumple-s { margin: 6px 0 0; padding: 2px 12px; font: 400 18.5px/1.2 var(--f-texto); color: var(--tinta); background: rgba(255, 253, 245, .94); border-radius: 4px; box-shadow: 0 0 0 1.5px rgba(43, 49, 80, .3); }
.ll .cumple.is-arriba { top: 20cqh; }
.ll .cumple.is-arriba .cumple-s, .ll .cumple.is-arriba .cumple-k { display: none; }
.ll .fin { position: absolute; left: 12px; right: 12px; bottom: calc(12px + var(--safe-b)); max-height: 47cqh; overflow: auto; padding: 28px 14px 6px 42px; animation: ll-sube .5s ease-out both; }
.ll .fin .espiral { top: 2px; }
.ll .fin-t { margin: 0 0 2px; font: 700 clamp(38px, 11cqw, 46px)/.98 var(--f-titulo); color: var(--tinta); }
.ll .fin-t span { background: linear-gradient(transparent 60%, color-mix(in srgb, #FF7BB0 55%, transparent) 60% 90%, transparent 90%); }
.ll .fin-sub { margin: 0 0 8px; font: 400 18px/1.2 var(--f-texto); color: var(--tinta-2); }
.ll .fin-linea { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; font: 400 19px/1.2 var(--f-texto); }
.ll .fin-lugar { display: flex; flex-direction: column; gap: 5px; margin-bottom: 10px; }
.ll .fin-lugar .mapita svg { max-height: 86px; }
.ll .fin-lugar .lugar-nombre { font-size: 26px; }
.ll .fin-lugar .lugar-dir { font-size: 16px; }
.ll .fin-rsvp { margin: 2px 0 10px; }
.ll .fin-lugar .acciones > * { flex: 1 1 110px; }
@container marco (max-height: 780px) {
  .ll .fin { padding-top: 24px; max-height: 50cqh; }
  .ll .fin-t { font-size: 36px; }
  .ll .fin-sub { display: none; }
  .ll .fin-linea { font-size: 17px; }
  .ll .fin-lugar .lugar-nombre { font-size: 23px; }
  .ll .fin-lugar .lugar-dir { font-size: 14.5px; }
}
.ll .fin-enlaces { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 10px; margin-top: 4px; }
.ll .destello { position: absolute; inset: 0; z-index: 5; background: #fff; pointer-events: none; animation: ll-fl .75s ease-out both; }
@keyframes ll-fl { 0% { opacity: .85; } 100% { opacity: 0; } }
.ll.rm .destello { display: none; }

.ll .vitrina-t { position: absolute; left: 0; right: 0; top: 4cqh; margin: 0; text-align: center; font: 700 clamp(40px, 8cqw, 70px)/1 var(--f-titulo); color: #fff; -webkit-text-stroke: 6px var(--tinta); paint-order: stroke fill; }
.ll .vitrina-t small { display: block; margin-top: 4px; font-size: .55em; }
.ll .dbg-fps { position: absolute; left: 8px; bottom: 4px; margin: 0; padding: 2px 6px; background: rgba(0, 0, 0, .65); color: #fff; font: 700 11px/1.3 monospace; z-index: 50; pointer-events: none !important; }
@media (prefers-reduced-motion: reduce) { .ll .manita.is-on .manita-dedo, .ll .manita.is-on .manita-onda { animation: none; } .ll .sello, .ll .portada-hoja, .ll .portada-acciones, .ll .cumple, .ll .fin, .ll .regresiva span { animation-duration: .01s; } }
.ll.rm .manita.is-on .manita-dedo, .ll.rm .manita.is-on .manita-onda { animation: none; }
