/* Pato Verde, the full-screen tamagotchi (home, since 2026-10-22). Its own look on purpose: a game,
   not the old site (chunky outlines, candy colors, rounded font, buttons that sink when pressed).
   The scene behind everything is PatoEscena (it carries its own styles). */

:root {
  --tinta: #1b1b1b;
  --crema: #fffaf0;
  --amarillo: #ffd23f;
  --rosa: #ff7eb6;
  --celeste: #5ec8ff;
  --verde: #4fd27a;
  --violeta: #a77bff;
  --sombra: 0 5px 0 var(--tinta);
  /* room the duck has to leave: buttons + chat at the bottom, HUD + bubble on top */
  --pie: calc(clamp(64px, 19vw, 84px) + 176px + env(safe-area-inset-bottom));
  --techo: 310px;
  --pato-w: min(88vw, calc((100dvh - var(--pie) - var(--techo)) * .9));
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; height: 100%; overflow: hidden; background: var(--tinta); }

body {
  font-family: "Fredoka", ui-rounded, "Segoe UI Rounded", system-ui, sans-serif;
  color: var(--tinta);
  -webkit-tap-highlight-color: transparent;
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; }

/* One format for every screen (owner, 2026-10-23: "total todo el mundo usa celu"): on a computer the game
   is a phone-wide column in the middle. The old desktop rules are switched off with "@media not all" and the
   phone ones forced with "@media all". No transform here, so fixed children still use the window's coordinates. */
.j { position: fixed; top: 0; bottom: 0; left: max(0px, calc(50% - 230px)); right: max(0px, calc(50% - 230px)); overflow: hidden; }
@media (min-width: 461px) {
  body { background: radial-gradient(circle at 50% 30%, #2f3b33, #121512 70%); }
  .j { border-left: 3px solid var(--tinta); border-right: 3px solid var(--tinta); box-shadow: 0 0 60px rgba(0, 0, 0, .6); }
}
.j-escena { position: absolute; inset: 0; }
/* the duck stands just above the buttons and as big as the free space allows */
.j-escena .pve-capa-pato { width: var(--pato-w); bottom: var(--pie); left: calc(50% - var(--pato-w) / 2); transform: none; } /* centered with left, not transform: the poke and knockout use rotate/scale */

/* ---- HUD ---- */
.j-hud {
  position: absolute; z-index: 5; top: max(10px, env(safe-area-inset-top)); left: 10px; right: 10px;
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none;
}
.j-hud > * { pointer-events: auto; }
.j-fila { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; }
.j-marca {
  margin: 0; padding: 4px 14px; font-size: 1.25rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: #fff; background: #1f9a4b; border: 3px solid var(--tinta); border-radius: 999px; box-shadow: 0 3px 0 var(--tinta);
  -webkit-text-stroke: 1px var(--tinta); paint-order: stroke fill;
}
.j-chip {
  padding: 4px 11px; font-size: .9rem; font-weight: 600; background: var(--crema);
  border: 3px solid var(--tinta); border-radius: 999px; box-shadow: 0 3px 0 var(--tinta);
}

.j-medidores { display: flex; gap: 8px; width: min(100%, 560px); }
.j-medidor {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; padding: 5px 8px 5px 5px;
  background: rgba(255, 250, 240, .92); border: 3px solid var(--tinta); border-radius: 16px; box-shadow: 0 3px 0 var(--tinta);
}
.j-icono {
  flex-shrink: 0; display: grid; place-items: center; width: 34px; height: 34px; font-size: 1.15rem;
  background: #fff; border: 2.5px solid var(--tinta); border-radius: 50%;
}
.j-medidor-cuerpo { flex: 1; min-width: 0; }
.j-barra { height: 14px; background: #e9e2d0; border: 2.5px solid var(--tinta); border-radius: 999px; overflow: hidden; }
.j-barra i {
  display: block; height: 100%; border-radius: 999px; transition: width .6s cubic-bezier(.3, 1.6, .5, 1);
  background: linear-gradient(#7ff0a0, #2fbf62); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45);
}
.j-medidor[data-barra="limpieza"] .j-barra i { background: linear-gradient(#9fe3ff, #36a9ef); }
.j-medidor[data-barra="felicidad"] .j-barra i { background: linear-gradient(#ffe68a, #ffb800); }
.j-medidor.baja .j-barra i { background: linear-gradient(#ff9a9a, #e53935); animation: j-alarma .8s ease-in-out infinite; }
.j-medidor.baja .j-icono { animation: j-sacude .5s ease-in-out infinite; }
.j-dura { display: block; margin-top: 2px; font-size: .72rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.j-medidor.baja .j-dura { color: #c62828; }
@keyframes j-alarma { 50% { opacity: .55; } }
@keyframes j-sacude { 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }

.j-ultimo {
  margin: 0; padding: 2px 10px; font-size: .78rem; font-weight: 500; color: #fff;
  background: rgba(27, 27, 27, .55); border-radius: 999px; text-align: center;
}

/* ---- speech bubble, above the duck's head ---- */
.j-globo {
  position: absolute; z-index: 4; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--pie) + var(--pato-w) / .9 * .93);
  width: min(88vw, 420px); padding: 10px 16px; text-align: center;
  background: #fff; border: 3px solid var(--tinta); border-radius: 22px; box-shadow: var(--sombra);
}
.j-globo::after {
  content: ""; position: absolute; left: 50%; bottom: -16px; margin-left: -12px;
  border: 12px solid transparent; border-top: 14px solid var(--tinta); border-bottom: 0;
}
.j-globo p { margin: 0; font-size: clamp(1rem, 2.4vh, 1.25rem); font-weight: 500; line-height: 1.3; }
.j-globo.cambia { animation: j-pop .35s cubic-bezier(.3, 1.6, .5, 1); }
.j-globo.pensando p::after { content: ""; display: inline-block; width: 1.2em; text-align: left; animation: j-puntos 1s steps(4) infinite; }
@keyframes j-pop { 0% { transform: translateX(-50%) scale(.85); } 100% { transform: translateX(-50%) scale(1); } }
@keyframes j-puntos { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }

/* ---- bottom: care buttons + chat ---- */
.j-pie {
  position: absolute; z-index: 6; left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 0 10px max(10px, env(safe-area-inset-bottom));
}
.j-acciones { display: flex; gap: clamp(10px, 4vw, 22px); }
.j-accion {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: clamp(64px, 19vw, 84px); height: clamp(64px, 19vw, 84px); padding: 0;
  border: 4px solid var(--tinta); border-radius: 50%; box-shadow: 0 6px 0 var(--tinta);
  transition: transform .08s, box-shadow .08s;
}
.j-accion span { font-size: clamp(1.6rem, 6vw, 2.2rem); line-height: 1; }
.j-accion small { font-size: clamp(.68rem, 2.4vw, .82rem); font-weight: 700; margin-top: 2px; }
.j-comer { background: var(--amarillo); }
.j-banar { background: var(--celeste); }
.j-mimo { background: var(--rosa); }
.j-accion:hover { filter: brightness(1.06); }
.j-accion:active { transform: translateY(6px); box-shadow: 0 0 0 var(--tinta); }
.j-accion:disabled { filter: grayscale(.6); }
.j-accion:focus-visible, .j-chat-barra button:focus-visible { outline: 4px solid #fff; outline-offset: 3px; }

.j-chat { width: min(100%, 520px); }
.j-chat-barra {
  display: flex; gap: 6px; padding: 5px; background: #fff;
  border: 3px solid var(--tinta); border-radius: 999px; box-shadow: 0 4px 0 var(--tinta);
}
.j-chat-barra input { flex: 1; min-width: 0; padding: 8px 12px; font-size: 1rem; border: 0; outline: none; background: none; }
.j-chat-barra button {
  flex-shrink: 0; width: 44px; height: 44px; font-size: 1.2rem; color: #fff; background: var(--violeta);
  border: 3px solid var(--tinta); border-radius: 50%; box-shadow: 0 3px 0 var(--tinta);
}
.j-chat-barra button:active { transform: translateY(3px); box-shadow: none; }
.j-chat-barra button:disabled { filter: grayscale(.6); }

/* the conversation: opens above the bar while you're chatting */
.j-chat-log {
  position: relative; margin-bottom: 8px; padding: 10px 10px 8px; max-height: min(38dvh, 320px); overflow-y: auto;
  background: rgba(255, 250, 240, .95); border: 3px solid var(--tinta); border-radius: 20px; box-shadow: 0 4px 0 var(--tinta);
}
.j-chat-log ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.j-chat-log li { max-width: 82%; padding: 7px 12px; font-size: .95rem; line-height: 1.3; border: 2px solid var(--tinta); }
.j-chat-log li.vos { align-self: flex-end; background: var(--violeta); color: #fff; border-radius: 16px 16px 4px 16px; }
.j-chat-log li.pato { align-self: flex-start; background: #e9f9ee; border-radius: 16px 16px 16px 4px; }
.j-chat-log li.pato::before { content: "🦆 "; }
.j-chat-log li.escribiendo { opacity: .7; }
.j-chat-cerrar {
  position: sticky; top: 0; float: right; margin: -4px -2px 0 6px; width: 30px; height: 30px; font-size: 1rem; line-height: 1;
  background: #fff; border: 2.5px solid var(--tinta); border-radius: 50%;
}

/* floating emoji when you do something */
.j-flota { position: fixed; z-index: 30; font-size: 3rem; pointer-events: none; animation: j-flota 1.2s ease-out forwards; }
@keyframes j-flota { from { transform: translate(-50%, 0) scale(.5); opacity: 1; } to { transform: translate(-50%, -160px) scale(1.4); opacity: 0; } }

@media all {
  :root { --techo: 300px; }
  .j-marca { font-size: 1rem; padding: 3px 10px; }
  .j-chip { font-size: .8rem; padding: 3px 9px; }
  .j-medidores { gap: 5px; }
  .j-medidor { position: relative; flex-direction: column; align-items: stretch; gap: 3px; padding: 10px 6px 4px; margin-top: 10px; border-radius: 12px; }
  .j-icono { position: absolute; left: 50%; top: -16px; width: 26px; height: 26px; margin-left: -13px; font-size: .9rem; }
  .j-dura { font-size: .66rem; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .j *, .j-flota { animation: none !important; transition: none !important; }
}
.j-chat-aviso { margin: 0 0 8px; font-size: .72rem; color: #666; }

/* ---- what other people tell the duck: bubbles floating around it ---- */
.j-voces { position: absolute; z-index: 3; inset: 0; pointer-events: none; }
.j-voz {
  position: absolute; max-width: min(40vw, 230px); padding: 7px 11px; font-size: .86rem; line-height: 1.25;
  background: #fff; border: 2.5px solid var(--tinta); border-radius: 16px; box-shadow: 0 3px 0 var(--tinta);
  animation: j-voz-entra .4s cubic-bezier(.3, 1.6, .5, 1), j-voz-flota 4s ease-in-out infinite alternate;
  transition: opacity .5s, transform .5s;
}
.j-voz small { display: block; font-size: .68rem; font-weight: 600; color: #888; }
.j-voz q { font-weight: 500; }
.j-voz.izq { left: 3%; border-bottom-left-radius: 4px; }
.j-voz.der { right: 3%; border-bottom-right-radius: 4px; }
.j-voz.resp { background: #e9f9ee; }
.j-voz.nueva { background: var(--amarillo); }
.j-voz.sale { opacity: 0; transform: translateY(-20px) scale(.9); }
@keyframes j-voz-entra { from { opacity: 0; transform: scale(.6); } }
@keyframes j-voz-flota { to { translate: 0 -8px; } }

/* your own message flying to the duck */
.j-vuela {
  position: fixed; z-index: 30; max-width: 70vw; padding: 7px 12px; font-size: .95rem; color: #fff; pointer-events: none;
  background: var(--violeta); border: 2.5px solid var(--tinta); border-radius: 16px;
  transition: transform .8s cubic-bezier(.5, 0, .3, 1), opacity .8s;
}
@media (prefers-reduced-motion: reduce) { .j-voz, .j-vuela { animation: none !important; transition: none !important; } }

/* ---- shared goal: clicks toward the next gift ---- */
.j-meta {
  display: flex; align-items: center; gap: 8px; width: min(100%, 460px); padding: 5px 6px 5px 8px;
  background: rgba(255, 250, 240, .94); border: 3px solid var(--tinta); border-radius: 999px; box-shadow: 0 3px 0 var(--tinta);
}
.j-meta-emoji { font-size: 1.4rem; animation: j-sacude 1.6s ease-in-out infinite; }
.j-meta-cuerpo { flex: 1; min-width: 0; }
.j-meta-cuerpo small { display: block; font-size: .74rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.j-meta .j-barra { height: 10px; margin-top: 2px; }
.j-meta .j-barra i { background: linear-gradient(#ffb3d9, #ff5d8f); }
.j-meta-boton {
  flex-shrink: 0; padding: 5px 12px; font-weight: 700; font-size: .85rem; background: var(--amarillo);
  border: 2.5px solid var(--tinta); border-radius: 999px; box-shadow: 0 3px 0 var(--tinta);
}
.j-meta-boton:active { transform: translateY(3px); box-shadow: none; }
.j-meta-boton:disabled { filter: grayscale(.5); }

/* party when a goal is reached */
.j-fiesta { position: fixed; inset: 0; z-index: 40; pointer-events: none; overflow: hidden; }
.j-fiesta i { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 2px; animation: j-confeti 2.6s ease-in forwards; }
@keyframes j-confeti { to { transform: translateY(110vh) rotate(720deg); } }
.j-fiesta-cartel {
  position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%); width: min(86vw, 380px); padding: 14px 18px; text-align: center;
  background: var(--amarillo); border: 4px solid var(--tinta); border-radius: 24px; box-shadow: 0 6px 0 var(--tinta);
  font-size: 1.15rem; font-weight: 700;
}
.j-fiesta-cartel span { display: block; font-size: 3rem; }

/* suggested questions above the chat */
.j-sugerencias { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 8px; padding-bottom: 4px; scrollbar-width: none; }
.j-sugerencias::-webkit-scrollbar { display: none; }
.j-sugerencias button {
  flex-shrink: 0; padding: 5px 11px; font-size: .82rem; font-weight: 600; background: #fff;
  border: 2.5px solid var(--tinta); border-radius: 999px; box-shadow: 0 3px 0 var(--tinta);
}
.j-sugerencias button:active { transform: translateY(3px); box-shadow: none; }

/* while chatting, the conversation takes the buttons' place so the duck stays visible */
@media all { .j-pie.charlando .j-acciones { display: none; } }
.j-pie.charlando .j-chat-log { max-height: min(30dvh, 280px); }

/* ---- the shared chat room (replaces the private log) ---- */
.j-chat-log { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.j-chat-titulo {
  display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 6px 12px;
  background: var(--violeta); color: #fff; border-bottom: 3px solid var(--tinta);
}
.j-chat-titulo strong { font-size: .95rem; }
.j-chat-titulo .j-chat-cerrar { position: static; float: none; margin: 0; color: var(--tinta); }
#chatLista { flex: 1; overflow-y: auto; padding: 10px; gap: 10px; }
.j-par { display: flex; flex-direction: column; gap: 4px; }
.j-msg {
  max-width: 85%; padding: 6px 11px 7px; font-size: .92rem; line-height: 1.3; border: 2px solid var(--tinta);
  align-self: flex-start; background: #fff; border-radius: 14px 14px 14px 4px;
}
.j-msg small { display: block; font-size: .68rem; font-weight: 700; color: #7a6aa8; }
.j-par.mio > .j-msg:first-child { align-self: flex-end; background: var(--violeta); color: #fff; border-radius: 14px 14px 4px 14px; }
.j-par.mio > .j-msg:first-child small { color: #efe6ff; }
.j-msg.pato { margin-left: 14px; background: #e9f9ee; }
.j-msg.pato small { color: #2f8a4f; }
.j-par.nuevo { animation: j-voz-entra .4s cubic-bezier(.3, 1.6, .5, 1); }
.j-msg.escribiendo::after { content: ""; animation: j-puntos 1s steps(4) infinite; }
.j-chat-vacio { margin: 10px; font-size: .9rem; color: #666; }
.j-chat-aviso { margin: 0; padding: 6px 12px; font-size: .72rem; color: #555; border-top: 2px dashed #d8cfb8; }

/* phones: one line with the latest message; tap to open the room */
.j-chat-peek {
  display: block; width: 100%; margin-bottom: 8px; padding: 6px 12px; text-align: left; font-size: .85rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: rgba(255, 250, 240, .95); border: 2.5px solid var(--tinta); border-radius: 999px; box-shadow: 0 3px 0 var(--tinta);
}
.j-chat-peek:empty { display: none; }
@media all {
  .j-pie:not(.charlando) .j-chat-log { display: none; }
  .j-pie.charlando .j-chat-peek, .j-pie.charlando .j-sugerencias { display: none; }
  .j-pie.charlando .j-chat-log { height: min(46dvh, 420px); max-height: none; }
}

/* desktop: the room is always open on the right, like a stream chat */
@media not all {
  .j-chat-peek, .j-chat-cerrar { display: none; }
  .j-chat { position: fixed; z-index: 6; right: 16px; top: 16px; bottom: 16px; width: 340px; display: flex; flex-direction: column; }
  .j-chat .j-chat-log { flex: 1; min-height: 0; max-height: none; margin-bottom: 8px; }
  .j-pie { right: 372px; }
  .j-hud { right: 372px; }
  .j-globo { margin-left: -186px; }
  .j-voces { right: 356px; }
  .j-escena .pve-capa-pato { margin-left: -186px; }
}
@media not all { :root { --pie: calc(84px + 40px); } }
.j-chat-log li.j-par { max-width: none; padding: 0; border: 0; background: none; border-radius: 0; }

/* ================= the world around the duck (mundo.js) ================= */

/* ---- time of day, by the visitor's clock (data-hora on .j) ---- */
.j[data-hora="manana"] .pve-hora { opacity: 1; background: linear-gradient(rgba(255, 214, 160, .35), transparent 60%); }
.j[data-hora="atardecer"] .pve-hora { opacity: 1; background: linear-gradient(rgba(255, 110, 60, .45), rgba(255, 170, 110, .25) 55%, rgba(80, 30, 60, .15)); }
.j[data-hora="noche"] .pve-hora {
  opacity: 1;
  background:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff 50%, transparent 52%), radial-gradient(1.5px 1.5px at 28% 8%, #fff 50%, transparent 52%),
    radial-gradient(2px 2px at 44% 22%, #fff 50%, transparent 52%), radial-gradient(1.5px 1.5px at 63% 12%, #fff 50%, transparent 52%),
    radial-gradient(1px 1px at 78% 28%, #fff 50%, transparent 52%), radial-gradient(2px 2px at 90% 6%, #fff 50%, transparent 52%),
    radial-gradient(1px 1px at 6% 40%, #fff 50%, transparent 52%), radial-gradient(1.5px 1.5px at 35% 38%, #fff 50%, transparent 52%),
    radial-gradient(1px 1px at 55% 33%, #fff 50%, transparent 52%), radial-gradient(1.5px 1.5px at 85% 44%, #fff 50%, transparent 52%),
    linear-gradient(rgba(8, 12, 45, .82), rgba(20, 22, 70, .6) 65%, rgba(0, 0, 20, .45));
}
.j[data-hora="noche"] .pve-luna {
  position: absolute; right: 9%; top: 13%; width: clamp(46px, 12cqmin, 90px); aspect-ratio: 1; border-radius: 50%;
  box-shadow: inset -14px -6px 0 0 #fff7d6; filter: drop-shadow(0 0 14px rgba(255, 247, 214, .6));
}
.j[data-hora="noche"] .pve-sol { display: none; }
.j[data-hora="noche"] .pve-capa-pato { filter: brightness(.82) saturate(.85); }
.j[data-hora="manana"] .pve-mate { display: inline; }
.j[data-dormido="1"] .pve-dormido { display: inline; }
.j[data-dormido="1"] .pve-pato { animation: pve-respira 4s ease-in-out infinite !important; }
.j[data-dormido="1"] .pve-capa-pato { cursor: pointer; }

/* the dream bubble */
.j-sueno {
  position: absolute; z-index: 4; left: calc(50% + var(--pato-w) * .18); bottom: calc(var(--pie) + var(--pato-w) / .9 * .82);
  padding: 8px 14px; font-size: 1.5rem; letter-spacing: .15em; background: #fff; border: 3px solid var(--tinta);
  border-radius: 40px 40px 40px 10px; box-shadow: 0 4px 0 var(--tinta); animation: j-voz-flota 3s ease-in-out infinite alternate;
}
.j-sueno::after { content: "💭"; position: absolute; left: -18px; bottom: -22px; font-size: 1.2rem; }
@media not all { .j-sueno { left: calc(50% - 186px + var(--pato-w) * .18); } }

/* ---- Avellana, the squirrel ---- */
.j-ardilla {
  position: absolute; z-index: 3; bottom: calc(var(--pie) - 4px); width: calc(var(--pato-w) * .3); max-width: 130px; aspect-ratio: 1.2;
  transition-property: left; transition-timing-function: linear; cursor: pointer;
}
.j-ardilla svg { display: block; width: 100%; height: 100%; overflow: visible; }
.j-ardilla.izq svg { transform: scaleX(-1); }
.j-ardilla .a-corre, .j-ardilla .a-duerme, .j-ardilla .a-nuez { display: none; }
.j-ardilla[data-estado="corre"] .a-sentada, .j-ardilla[data-estado="duerme"] .a-sentada { display: none; }
.j-ardilla[data-estado="corre"] .a-corre { display: inline; }
.j-ardilla[data-estado="duerme"] .a-duerme { display: inline; }
.j-ardilla[data-estado="come"] .a-nuez { display: inline; }
.j-ardilla[data-estado="corre"] svg { animation: a-galope .28s ease-in-out infinite; }
.j-ardilla[data-estado="come"] .a-cabeza { animation: a-mastica .22s ease-in-out infinite; }
.j-ardilla[data-estado="mira"] .a-cola { transform-origin: 46px 86px; animation: a-cola 1.8s ease-in-out infinite; }
.j-ardilla[data-estado="duerme"] svg { animation: pve-respira 3s ease-in-out infinite; }
.j-ardilla[data-estado="escondida"] { animation: a-espia 6s ease-in-out infinite; }
@keyframes a-galope { 50% { translate: 0 -6%; } }
@keyframes a-mastica { 50% { transform: translateY(.8px); } }
@keyframes a-cola { 0%, 70%, 100% { transform: rotate(0); } 78% { transform: rotate(-9deg); } 86% { transform: rotate(5deg); } }
@keyframes a-espia { 0%, 60%, 100% { translate: 0 0; } 70%, 85% { translate: 40% 0; } }
.j[data-hora="noche"] .j-ardilla { filter: brightness(.75); }

/* ---- random events ---- */
.j-evento { position: absolute; z-index: 7; inset: 0; pointer-events: none; overflow: hidden; }
.j-evento-cartel {
  margin: 0; padding: 3px 14px; white-space: nowrap;
  font-weight: 700; font-size: .9rem; background: #ff5a5a; color: #fff; border: 3px solid var(--tinta); border-radius: 999px;
  box-shadow: 0 3px 0 var(--tinta); animation: j-alarma 1s ease-in-out infinite;
}
.j-meteoro { position: absolute; font-size: 5rem; right: -10%; top: -10%; animation: j-meteoro 1.3s ease-in forwards; }
@keyframes j-meteoro { to { right: 62%; top: 72%; transform: scale(1.4) rotate(-20deg); } }
.j-crater { position: absolute; left: 22%; bottom: calc(var(--pie) - 12px); width: 110px; height: 22px; border-radius: 50%; background: radial-gradient(#1b1b1b, #5a3a1a 60%, transparent 70%); }
.j-temblor .j-escena, .j[data-evento="terremoto"] .j-escena { animation: j-terremoto .18s linear infinite; }
@keyframes j-terremoto { 25% { transform: translate(4px, -3px); } 50% { transform: translate(-3px, 2px); } 75% { transform: translate(3px, 3px); } }
.j-cae { position: absolute; top: -8%; font-size: 2rem; animation: j-cae linear forwards; }
@keyframes j-cae { to { top: 110%; transform: rotate(540deg); } }
.j-ovni { position: absolute; top: 14%; left: -15%; font-size: 4rem; animation: j-ovni 7s ease-in-out infinite; }
.j-ovni::after { content: ""; position: absolute; left: 25%; top: 85%; width: 50%; height: 260px; background: linear-gradient(rgba(180, 255, 180, .55), transparent); clip-path: polygon(30% 0, 70% 0, 100% 100%, 0 100%); }
@keyframes j-ovni { 0% { left: -15%; } 45%, 55% { left: 40%; } 100% { left: 110%; } }
.j-paloma { position: absolute; left: -10%; font-size: 2.2rem; animation: j-paloma 5s linear infinite; }
@keyframes j-paloma { 0% { left: -10%; transform: translateY(0); } 50% { transform: translateY(-20px); } 100% { left: 110%; transform: translateY(0); } }
.j[data-evento="sinwifi"] .j-escena { animation: j-glitch .9s steps(2) infinite; }
@keyframes j-glitch { 0% { filter: hue-rotate(0) contrast(1); transform: translateX(0); } 30% { filter: hue-rotate(90deg) contrast(1.6); transform: translateX(-6px); } 60% { filter: grayscale(1); transform: translateX(5px); } 100% { filter: none; } }
.j[data-evento="eclipse"] .j-evento { background: radial-gradient(circle at 80% 18%, #000 0 40px, rgba(255, 220, 150, .5) 42px, transparent 70px), rgba(0, 0, 20, .55); }

/* ---- the bottle that arrived for you ---- */
.j-botella-llega {
  position: absolute; z-index: 5; left: 8%; bottom: calc(var(--pie) + 6px); font-size: 2.6rem; padding: 0; background: none; border: 0;
  animation: j-botella 2.4s ease-in-out infinite; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .3));
}
.j-botella-llega::after { content: "¡Te llegó una botella!"; position: absolute; left: 70%; top: -12px; white-space: nowrap; font-size: .75rem; font-weight: 700; background: #fff; border: 2px solid var(--tinta); border-radius: 999px; padding: 2px 8px; }
@keyframes j-botella { 50% { transform: rotate(-12deg) translateY(-6px); } }

/* ---- left toolbar ---- */
.j-herramientas { position: absolute; z-index: 6; left: max(8px, env(safe-area-inset-left)); top: 44%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 8px; }
.j-herramientas button {
  display: flex; flex-direction: column; align-items: center; width: 52px; padding: 5px 0 3px; background: var(--crema);
  border: 3px solid var(--tinta); border-radius: 14px; box-shadow: 0 3px 0 var(--tinta);
}
.j-herramientas span { font-size: 1.25rem; line-height: 1; }
.j-herramientas small { font-size: .62rem; font-weight: 700; margin-top: 2px; }
.j-herramientas button:active { transform: translateY(3px); box-shadow: none; }
.j-mas { background: var(--crema); }
.j-mas span { font-weight: 700; }
/* On mobile the tools leave the left edge: the "+" opens them as a menu right above it. */
@media all {
  .j-herramientas { display: none; position: fixed; z-index: 9; top: auto; left: auto; transform: none; gap: 10px; align-items: flex-end; }
  .j-herramientas.abierto { display: flex; animation: j-sube .15s ease-out; }
  .j-herramientas button { flex-direction: row; gap: 8px; width: auto; padding: 8px 14px; border-radius: 999px; }
  .j-herramientas small { font-size: .85rem; margin: 0; }
}
@keyframes j-sube { from { opacity: 0; transform: translateY(8px); } }

/* ---- the rotating line ---- */
.j-ticker {
  margin: 0; max-width: min(100%, 560px); padding: 3px 12px; font-size: .78rem; font-weight: 600; text-align: center;
  background: rgba(255, 250, 240, .9); border: 2px solid var(--tinta); border-radius: 999px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.j-ticker.entra { animation: j-voz-entra .4s ease-out; }

/* ---- modal ---- */
.j-modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .5); }
.j-modal-caja {
  position: relative; width: min(100%, 440px); max-height: 88dvh; overflow-y: auto; padding: 18px 18px 20px; background: var(--crema);
  border: 4px solid var(--tinta); border-radius: 24px; box-shadow: 0 6px 0 var(--tinta); animation: j-voz-entra .3s ease-out;
}
.j-modal-caja h2 { margin: 0 34px 10px 0; font-size: 1.3rem; }
.j-modal-cerrar { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; font-size: 1.4rem; line-height: 1; background: #fff; border: 3px solid var(--tinta); border-radius: 50%; }
.j-modal textarea { width: 100%; padding: 10px 12px; font: inherit; border: 3px solid var(--tinta); border-radius: 14px; resize: vertical; }
.j-nota { margin: 8px 0; font-size: .88rem; color: #555; }
.j-grande { margin: 6px 0 12px; font-size: 1.2rem; font-weight: 700; }
.j-error { color: #c62828; font-size: .88rem; }
.j-form-pie { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; }
.j-boton {
  display: inline-block; padding: 9px 18px; font-weight: 700; font-size: 1rem; color: var(--tinta); text-decoration: none;
  background: var(--verde); border: 3px solid var(--tinta); border-radius: 999px; box-shadow: 0 4px 0 var(--tinta);
}
.j-boton:active { transform: translateY(4px); box-shadow: none; }
.j-boton:disabled { filter: grayscale(.6); }
.j-papel {
  margin: 8px 0; padding: 16px 18px; background: #fffdf3; border: 2px solid #c9b98a; border-radius: 4px; font-size: 1rem; line-height: 1.45;
  transform: rotate(-1deg); box-shadow: 3px 4px 0 rgba(0, 0, 0, .12); font-style: italic;
}
.j-papel p { margin: 0 0 8px; }
.j-para { font-weight: 700; font-style: normal; }
.j-votos { display: flex; flex-direction: column; gap: 10px; }
.j-voto {
  position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center; padding: 12px 16px;
  font-size: 1.05rem; font-weight: 700; background: #fff; border: 3px solid var(--tinta); border-radius: 16px; box-shadow: 0 4px 0 var(--tinta);
}
.j-voto i { position: absolute; left: 0; top: 0; bottom: 0; background: #ffe68a; transition: width .6s; }
.j-voto span, .j-voto small { position: relative; }
.j-voto.elegido { background: #e9f9ee; }
.j-voto:not(:disabled):active { transform: translateY(4px); box-shadow: none; }
.j-postal { display: block; width: 100%; margin: 6px 0 12px; border: 3px solid var(--tinta); border-radius: 12px; background: #eee; aspect-ratio: 1080 / 1350; }

@media (prefers-reduced-motion: reduce) {
  .j-ardilla, .j-ardilla *, .j-evento *, .j-sueno, .j-botella-llega { animation: none !important; }
}

/* long lines (theories, dreams) shouldn't grow the bubble into the HUD */
/* Long answers: smaller type and, if it still doesn't fit, the bubble scrolls instead of spilling over. */
.j-globo p { max-height: 48dvh; overflow-y: auto; overscroll-behavior: contain; } /* scrolls only if huge: normally it slides down over the duck (juego.js, acomodarGlobo) */
.j-globo.largo p { font-size: clamp(.86rem, 2vh, 1.02rem); line-height: 1.25; }
/* Poking the duck: a squash and a "cuac" that floats up. */
.pve-capa-pato { cursor: pointer; -webkit-tap-highlight-color: transparent; }
/* the duck layer is the SVG itself and is centered with transform, so these use scale/rotate/translate */
/* knocked out: it falls on its back, stars go around its head, then it gets back up */
.j-escena .pve-capa-pato { transition: translate .7s cubic-bezier(.5, -0.5, .4, 1.6), rotate .7s cubic-bezier(.5, -0.5, .4, 1.6), scale .7s; }
.j[data-caido="1"] .pve-capa-pato { translate: 0 20%; rotate: -80deg; scale: .75; transform-origin: 50% 55%; transition-duration: .55s; }
.j[data-caido="1"] .pve-capa-pato { cursor: default; }
.j-estrellas { position: absolute; z-index: 5; width: 0; height: 0; pointer-events: none; }
.j-estrellas span { position: absolute; left: -.6em; top: -.6em; font-size: 1.5rem; animation: j-orbita 1.1s linear infinite; }
.j-estrellas span:nth-child(2) { animation-delay: -.37s; }
.j-estrellas span:nth-child(3) { animation-delay: -.73s; }
@keyframes j-orbita {
  0% { transform: translate(-34px, 0) scale(.9); z-index: 2; }
  25% { transform: translate(0, 12px) scale(1.15); }
  50% { transform: translate(34px, 0) scale(.9); }
  75% { transform: translate(0, -12px) scale(.6); opacity: .6; }
  100% { transform: translate(-34px, 0) scale(.9); }
}
/* the hit (mundo.js, golpe): animated from JS so it also shows with "reduce animations" on */
.j-cuac { position: absolute; z-index: 5; font-weight: 700; font-size: clamp(1rem, 4vw, 1.4rem); color: #fff; -webkit-text-stroke: 1px var(--tinta); pointer-events: none; opacity: 0; }
.j-impacto { position: absolute; z-index: 6; margin: -.6em 0 0 -.6em; font-size: 2.6rem; line-height: 1; pointer-events: none; opacity: 0; }
@media (prefers-reduced-motion: reduce) { .j-estrellas span { animation: none; } .j-escena .pve-capa-pato { transition: none; } }
@media (prefers-reduced-motion: reduce) { .j-cae { top: var(--y, 40%); } .j-meteoro { right: 62%; top: 72%; } }

/* ================= phones and tablets: a lighter screen (owner, 2026-10-23) =================
   Top: the three meters across the width (with "para cuánto le alcanza") and "¡Preguntale al pato!", which opens
   the room. Bottom: 7 buttons in a honeycomb, 3 big ones to look after it and 4 smaller ones set between them
   (gift, poll, postcard and "+" for the rest). The duck and its bubbles in between. The rotating line becomes
   something the duck says (mundo.js). Desktop doesn't change. */
.j-acciones2, .j-preguntar, .j-solo-angosto { display: none; }
.j-info { margin: 0; padding: 0 0 0 4px; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: .95rem; }
.j-chica span { font-size: 1.35rem; }
.j-chica small { font-size: .66rem; }
.j-b-regalo { background: var(--verde); }
.j-b-voto { background: var(--violeta); color: #fff; }
.j-b-foto { background: #ffa94d; }
@media all {
  :root {
    --boton: clamp(62px, 18vw, 76px); --chico: clamp(52px, 14.5vw, 62px); --paso: clamp(76px, 22vw, 92px);
    --pie: calc(var(--boton) + var(--chico) + 10px + env(safe-area-inset-bottom));
    --techo: 250px;
    --pato-w: min(74vw, calc((100dvh - var(--pie) - var(--techo)) * .9));
  }
  .j-fila, .j-ultimo, .j-ticker { display: none; }
  .j-hud { gap: 7px; }
  .j-medidores { width: 100%; }
  .j-dura { font-size: .7rem; }
  /* the usual "AI button": a moving gradient, a glow that breathes and a sparkle that turns */
  .j-preguntar {
    position: relative; display: block; width: min(100%, 360px); padding: 10px 14px; font-size: 1.08rem; font-weight: 700; color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .35); border: 3px solid var(--tinta); border-radius: 999px;
    background: linear-gradient(110deg, #7b5cff, #ff5fa2, #ffb347, #39d0ff, #7b5cff); background-size: 300% 100%;
    box-shadow: 0 4px 0 var(--tinta), 0 0 18px rgba(255, 95, 162, .55);
    animation: j-ia-fondo 4s linear infinite, j-ia-brillo 2.2s ease-in-out infinite;
  }
  .j-preguntar::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    background: linear-gradient(100deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%); background-size: 250% 100%;
    animation: j-ia-reflejo 3s ease-in-out infinite;
  }
  .j-chispa { display: inline-block; animation: j-ia-chispa 1.8s ease-in-out infinite; }
  .j-preguntar:active { transform: translateY(4px); box-shadow: 0 0 0 var(--tinta), 0 0 12px rgba(255, 95, 162, .5); }
  @keyframes j-ia-fondo { to { background-position: 300% 0; } }
  @keyframes j-ia-brillo { 50% { box-shadow: 0 4px 0 var(--tinta), 0 0 30px rgba(123, 92, 255, .9); transform: scale(1.025); } }
  @keyframes j-ia-reflejo { 0%, 40% { background-position: 150% 0; } 100% { background-position: -100% 0; } }
  @keyframes j-ia-chispa { 50% { transform: rotate(25deg) scale(1.3); } }
  @media (prefers-reduced-motion: reduce) { .j-preguntar, .j-preguntar::after, .j-chispa { animation: none; } }
  .j-punto { position: absolute; top: -5px; right: 6px; width: 14px; height: 14px; background: #ff5a5a; border: 2px solid var(--tinta); border-radius: 50%; }

  .j-meta:not(.abierto) { display: none; }
  .j-meta.abierto { animation: j-sube .15s ease-out; }

  /* honeycomb: same distance between centers in both rows, so the 4 fall in the gaps of the 3 */
  .j-pie { gap: 0; padding-bottom: max(16px, calc(env(safe-area-inset-bottom) + 8px)); }
  .j-acciones { gap: calc(var(--paso) - var(--boton)); }
  .j-acciones .j-accion { width: var(--boton); height: var(--boton); }
  .j-acciones2 { display: flex; gap: calc(var(--paso) - var(--chico)); margin-top: -12px; }
  .j-acciones2 .j-accion { width: var(--chico); height: var(--chico); border-width: 3px; box-shadow: 0 4px 0 var(--tinta); }
  .j-acciones2 .j-accion:active { transform: translateY(4px); }
  .j-acciones2 .j-accion[aria-expanded="true"] { filter: brightness(1.12); outline: 3px solid #fff; }
  .j-pie.charlando .j-acciones2 { display: none; }
  .j-solo-angosto { display: flex; }
  .j-herramientas .j-en-fila { display: none; }

  .j-pie:not(.charlando) .j-chat { display: none; }
  /* for now only the box to type in: with the keyboard open the history was unreadable */
  .j-pie.charlando .j-chat-log, .j-pie.charlando .j-sugerencias { display: none; }
  .j-chat-peek { display: none !important; }
}

/* ---- the bizarre events (mundo.js, RARO) ---- */
.j-cae.lento { font-size: 2.4rem; }
.j-cae.lento::before { content: "🪂"; position: absolute; left: 50%; top: -1em; transform: translateX(-50%); font-size: .9em; }
.j-desfile { position: absolute; bottom: calc(var(--pie) + 2%); left: -12%; font-size: 2.4rem; animation: j-desfile 6s linear infinite; }
@keyframes j-desfile { 0% { left: -12%; transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-10px) rotate(6deg); } 100% { left: 110%; transform: translateY(0) rotate(-6deg); } }
.j-fijo.ojo { position: absolute; left: 50%; top: 16%; font-size: 7rem; transform: translateX(-50%); animation: j-parpadeo 4s infinite; filter: drop-shadow(0 0 20px rgba(255, 0, 0, .5)); }
@keyframes j-parpadeo { 0%, 92%, 100% { transform: translateX(-50%) scaleY(1); } 95% { transform: translateX(-50%) scaleY(.1); } }
.j-fijo.lunas { position: absolute; top: calc(24% + var(--i) * 2%); left: calc(6% + var(--i) * 13%); font-size: 2.4rem; animation: j-flota-luna 3s ease-in-out infinite; animation-delay: calc(var(--i) * -.4s); }
@keyframes j-flota-luna { 50% { translate: 0 -8px; } }
.j[data-evento="gravedad"] .j-escena { transform: rotate(180deg); transition: transform 1.2s cubic-bezier(.5, -0.4, .5, 1.4); }
.j-escena { transition: transform 1.2s ease; }
.j[data-evento="cine"] .j-escena { filter: grayscale(1) sepia(.35) contrast(1.2); animation: j-cine .12s steps(2) infinite; }
@keyframes j-cine { 50% { opacity: .93; } }
@media (prefers-reduced-motion: reduce) { .j-desfile, .j-fijo, .j[data-evento="cine"] .j-escena { animation: none; } .j-desfile { left: 40%; } }

/* the gift goal inside its modal */
.j-modal .j-meta { width: 100%; margin-top: 10px; }
.j-modal .j-meta-cuerpo small { white-space: normal; }

/* ---- the duck's art (mundo.js, P.cuadro): a scribble in a gilded frame with a museum plaque ---- */
.j-cuadro { margin: 6px 0 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.j-cuadro-marco {
  width: min(100%, 300px); padding: 14px; border-radius: 4px;
  background: linear-gradient(135deg, #b8860b, #ffe08a 25%, #a0700a 50%, #ffd966 75%, #8a5a00);
  box-shadow: inset 0 0 0 3px #5c3d00, inset 0 0 0 9px rgba(255, 255, 255, .25), 0 10px 22px rgba(0, 0, 0, .35);
}
.j-cuadro-marco svg { display: block; width: 100%; height: auto; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .25), 0 0 0 3px #3d2a00; }
.j-cuadro-placa {
  padding: 6px 14px; text-align: center; font-size: .76rem; color: #3d2a00; line-height: 1.35;
  background: linear-gradient(#f3e3b0, #d9be72); border: 2px solid #8a6a20; border-radius: 3px;
}
.j-cuadro-placa strong { display: block; font-size: .95rem; }

/* ---- dragged and thrown off the screen (mundo.js, tirar): it walks back in, waddling ---- */
.j-escena .pve-capa-pato { touch-action: none; user-select: none; -webkit-user-select: none; }
.pve-capa-pato.j-camina { animation: j-camina .38s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes j-camina { 0%, 100% { rotate: -6deg; } 50% { rotate: 6deg; } }
@media (prefers-reduced-motion: reduce) { .pve-capa-pato.j-camina { animation: none; } }

/* ---- caring takes a gesture: the pointer becomes the bread, the sponge or the hand (juego.js) ---- */
.j-herr {
  position: fixed; z-index: 40; pointer-events: none; font-size: 3.4rem; line-height: 1;
  translate: -50% -50%; filter: drop-shadow(0 4px 0 rgba(0,0,0,.25)); transition: scale .2s;
}
.j-herr::after { /* progress */
  content: ""; position: absolute; left: 10%; right: 10%; bottom: -10px; height: 7px; border-radius: 4px;
  background: linear-gradient(90deg, #3bb36b calc(var(--p, 0) * 100%), rgba(255,255,255,.85) 0); border: 2px solid var(--tinta);
}
.j-herr-limpiar { animation: j-frota .25s ease-in-out infinite alternate; }
@keyframes j-frota { to { rotate: 14deg; } }
.j-con-herr .j-escena, .j-con-herr .j-escena * { cursor: none !important; touch-action: none; }
.j-accion.j-activa { outline: 4px dashed var(--tinta); outline-offset: 3px; }
.j-chispa { position: fixed; z-index: 39; pointer-events: none; font-size: 1.4rem; font-weight: 700; color: #0d3a1f; translate: -50% -50%; animation: j-chispa .9s ease-out forwards; }
@keyframes j-chispa { to { translate: -50% -260%; opacity: 0; scale: 1.4; } }
.j-burbuja {
  position: fixed; z-index: 39; pointer-events: none; width: var(--t); height: var(--t); translate: -50% -50%; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #fff 0 14%, rgba(255,255,255,.15) 16%, rgba(160,220,255,.35) 60%, rgba(255,170,240,.55) 100%);
  border: 1.5px solid rgba(255,255,255,.9); box-shadow: inset -2px -3px 6px rgba(120,180,255,.5);
  animation: j-burbuja var(--d, 1.3s) ease-out forwards;
}
@keyframes j-burbuja {
  0% { transform: translate(0, 0) scale(.3); opacity: 1; }
  50% { transform: translate(calc(var(--dx) * .5 + 10px), calc(var(--dy) * .5)) scale(1); }
  85% { transform: translate(calc(var(--dx) - 10px), calc(var(--dy) * .9)) scale(1.05); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(1.6); opacity: 0; }
}
.j-espuma { /* foam that stays stuck on the duck until it's clean */
  position: fixed; z-index: 38; pointer-events: none; width: var(--t); height: calc(var(--t) * .75); translate: -50% -50%;
  background: radial-gradient(circle at 30% 40%, #fff 0 30%, transparent 32%), radial-gradient(circle at 68% 38%, #fff 0 28%, transparent 30%),
              radial-gradient(circle at 50% 70%, #f4fbff 0 34%, transparent 36%);
  filter: drop-shadow(0 1px 0 rgba(90,150,200,.6)); animation: j-espuma .25s ease-out;
}
@keyframes j-espuma { from { scale: .2; } }
.j-estalla {
  position: fixed; z-index: 39; pointer-events: none; font-size: 1.8rem; font-weight: 800; color: #c98a3c; translate: -50% -50%;
  animation: j-estalla 1.1s cubic-bezier(.2, .7, .3, 1) forwards;
}
@keyframes j-estalla { to { transform: translate(var(--dx), var(--dy)) scale(var(--s)) rotate(var(--g)); opacity: 0; } }
.j-nam {
  position: fixed; z-index: 41; pointer-events: none; translate: -50% -50%; font-size: 2rem; font-weight: 800; color: #fff;
  -webkit-text-stroke: 2px var(--tinta); paint-order: stroke; animation: j-nam .9s ease-out forwards;
}
@keyframes j-nam { 0% { scale: .4; } 25% { scale: 1.3; rotate: -8deg; } 100% { translate: -50% -180%; opacity: 0; rotate: 6deg; } }

/* the guide: where to do it and how, with the tool's ghost doing the move */
.j-guia { position: fixed; z-index: 37; pointer-events: none; transition: opacity .3s; }
.j-guia.oculta { opacity: 0; }
.j-guia-texto {
  position: absolute; left: 50%; bottom: calc(100% + 14px); translate: -50% 0; white-space: nowrap;
  font-size: 1.7rem; font-weight: 800; color: #ffd23f; -webkit-text-stroke: 2.5px var(--tinta); paint-order: stroke;
  animation: j-late .8s ease-in-out infinite alternate;
}
@keyframes j-late { to { scale: 1.15; rotate: -4deg; } }
.j-guia-fantasma { position: absolute; font-size: 3rem; line-height: 1; translate: -50% -50%; opacity: .7; filter: drop-shadow(0 0 6px #fff); }
.j-guia-blanco { position: absolute; display: none; }
/* bread: a pulsing target on the beak and the bread flying into it */
.j-guia-comer .j-guia-blanco { display: block; inset: -6px; border: 5px dashed #ffd23f; border-radius: 50%; animation: j-blanco 1s ease-in-out infinite; }
@keyframes j-blanco { 50% { scale: 1.25; border-color: #fff; } }
.j-guia-comer .j-guia-fantasma { animation: j-al-pico 1.6s ease-in-out infinite; }
@keyframes j-al-pico { 0% { left: 160%; top: 260%; opacity: 0; } 20% { opacity: .8; } 70%, 85% { left: 50%; top: 50%; opacity: .8; scale: 1; } 100% { left: 50%; top: 50%; opacity: 0; scale: .5; } }
/* sponge: zigzag all over the body */
.j-guia-limpiar .j-guia-fantasma { animation: j-zigzag 2.4s ease-in-out infinite; }
@keyframes j-zigzag {
  0%, 100% { left: 15%; top: 12%; } 16% { left: 85%; top: 25%; } 33% { left: 15%; top: 42%; }
  50% { left: 85%; top: 58%; } 66% { left: 15%; top: 74%; } 83% { left: 85%; top: 88%; }
}
/* hand: left and right over the head */
.j-guia-mimar .j-guia-fantasma { top: 45%; animation: j-caricia 1.2s ease-in-out infinite alternate; }
@keyframes j-caricia { from { left: 12%; rotate: -15deg; } to { left: 88%; rotate: 15deg; } }
@media (prefers-reduced-motion: reduce) {
  .j-herr-limpiar, .j-chispa, .j-guia-texto, .j-guia-blanco { animation: none; }
  .j-guia-fantasma { animation: none !important; left: 50%; top: 50%; }
}

/* idle props: the yawn, the notes, the idea bulb (mundo.js, QUIETO) */
.j-utileria { position: absolute; z-index: 4; pointer-events: none; font-size: 2rem; translate: -50% 0; }
