/* ════════════════════════════════════════════════════════════════════════
   juegos.css — los juegos de la lección (js/juegos.js, fase 7)
   Viven dentro de la burbuja de reto (.crs-reto, en courses.css) y usan
   sus mismos tokens (--crs-*). Nada se arrastra: todo se toca.
   ═══════════════════════════════════════════════════════════════════════ */

.jg-q { margin: 0; font-size: 14.5px; line-height: 1.5; font-weight: 800; color: var(--crs-texto); }
.jg-bloque { display: flex; flex-direction: column; gap: 8px; }
.jg-fila { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.jg-ops-fila { flex-direction: row; flex-wrap: wrap; }
.jg-ops-fila .crs-reto-op { flex: 1 1 140px; text-align: center; font-weight: 800; }
.crs-reto-op.jg-elegida { border-color: var(--crs-marca); background: rgba(255, 138, 0, .16); opacity: 1; }
.jg-dijiste {
  align-self: flex-end; padding: 7px 13px; border-radius: 14px 14px 5px 14px;
  background: rgba(255, 138, 0, .16); border: 1px solid rgba(255, 138, 0, .35);
  font-size: 14px; font-weight: 800; color: var(--crs-texto);
}
.jg-btn {
  height: 40px; padding: 0 18px; border: 0; border-radius: var(--r-pill); cursor: pointer;
  background: var(--crs-marca); color: #2A1200; font-family: inherit; font-size: 14px; font-weight: 800;
}
.jg-link {
  border: 0; background: none; padding: 4px 2px; cursor: pointer;
  font-family: inherit; font-size: 13.5px; font-weight: 700; color: var(--crs-suave);
  text-decoration: underline; text-underline-offset: 3px;
}
.jg-link:hover { color: var(--crs-texto); }
.jg-num {
  display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 12px;
  border-radius: 12px; background: rgba(0, 0, 0, .28); border: 1.5px solid var(--crs-borde-alto);
}
.jg-num:focus-within { border-color: var(--crs-marca); }
.jg-num input {
  width: 110px; border: 0; outline: none; background: transparent; color: var(--crs-texto);
  font-family: inherit; font-size: 17px; font-weight: 900; font-variant-numeric: tabular-nums;
}
.jg-num-k { font-size: 13.5px; font-weight: 800; color: var(--crs-marca-luz); }
.jg-tiembla { animation: jg-no .38s ease both; }
@keyframes jg-no {
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}
:is(.jg-btn, .jg-link, .jg-tk-c, .jg-hm-op, .jg-hm-tab, .jg-bal-a, .jg-desl-b, .jg-fr-trozo):focus-visible {
  outline: 2px solid var(--crs-vio-luz); outline-offset: 2px;
}

/* ── el ticket (arma_ticket y precio) ── */
.jg-tk-cands { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.jg-tk-c {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 11px 13px; border-radius: var(--r-sm); cursor: pointer; text-align: left;
  background: rgba(255, 255, 255, .05); border: 1.5px solid var(--crs-borde);
  font-family: inherit; color: var(--crs-texto);
  transition: border-color var(--tr) ease, background var(--tr) ease, transform var(--tr-fast) ease;
}
.jg-tk-c:hover:not(:disabled) { border-color: var(--crs-vio-luz); }
.jg-tk-c:active:not(:disabled) { transform: scale(.98); }
.jg-tk-c[aria-pressed="true"] { border-color: var(--crs-marca); background: rgba(255, 138, 0, .14); }
.jg-tk-c.mal { border-color: var(--crs-rojo); background: rgba(240, 97, 109, .14); }
.jg-tk-c.falta { border-style: dashed; border-color: var(--crs-dorado); }
.jg-tk-c:disabled { cursor: default; }
.jg-tk-t { font-size: 13.5px; font-weight: 700; line-height: 1.35; }
.jg-tk-m { font-size: 13.5px; font-weight: 900; white-space: nowrap; font-variant-numeric: tabular-nums; }
.jg-tk-ticket {
  display: flex; flex-direction: column; padding: 8px 14px; border-radius: 12px;
  background: rgba(0, 0, 0, .28); border: 1px dashed var(--crs-borde-alto);
  font-variant-numeric: tabular-nums;
}
.jg-tk-r {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  padding: 5px 0; font-size: 13.5px; color: var(--crs-suave);
  animation: crs-reto-in .3s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.jg-tk-r b { font-weight: 900; color: var(--crs-texto); white-space: nowrap; }
.jg-tk-total { margin-top: 3px; padding-top: 8px; border-top: 1px dashed var(--crs-borde-alto); color: var(--crs-texto); font-weight: 800; }
.jg-tk-total b { color: var(--crs-marca-luz); font-size: 15px; }
.jg-tk-una, .jg-tk-una b { color: var(--crs-verde); font-weight: 800; }
.jg-gana b { color: var(--crs-verde); }
.jg-pierde b { color: var(--crs-rojo); }

/* ── gasto hormiga: las compras y el frasco ── */
.jg-hm { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 14px; align-items: start; }
.jg-hm-ops { display: flex; flex-direction: column; gap: 7px; }
.jg-hm-op {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 10px 13px; border-radius: var(--r-sm); cursor: pointer; text-align: left;
  background: rgba(255, 255, 255, .05); border: 1.5px solid var(--crs-borde);
  font-family: inherit; color: var(--crs-texto);
  transition: border-color var(--tr) ease, background var(--tr) ease;
}
.jg-hm-op:hover:not(:disabled) { border-color: var(--crs-vio-luz); }
.jg-hm-op[aria-pressed="true"] { border-color: var(--crs-marca); background: rgba(255, 138, 0, .14); }
.jg-hm-op:disabled { cursor: default; }
.jg-hm-t { font-size: 14px; font-weight: 800; }
.jg-hm-s { font-size: 12.5px; color: var(--crs-suave); }
.jg-hm-lado { display: flex; flex-direction: column; align-items: center; gap: 10px; position: sticky; top: 8px; }
.jg-hm-frasco { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.jg-hm-vidrio {
  position: relative; width: 120px; height: 150px; overflow: hidden;
  border: 3px solid rgba(255, 255, 255, .28); border-top-width: 6px; border-radius: 14px 14px 26px 26px;
  background: rgba(255, 255, 255, .04);
}
.jg-hm-liquido {
  position: absolute; left: 0; right: 0; bottom: 0; height: 0;
  background: repeating-linear-gradient(0deg, #F5B62B 0 8px, #D99A1C 8px 10px, #FFD36B 10px 11px);
  box-shadow: 0 -2px 10px rgba(245, 182, 43, .45);
  transition: height .8s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.jg-hm-moneda {
  position: absolute; left: 50%; top: -14px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #FFE7A3, #F5B62B 60%, #C88A12);
  animation: jg-cae .8s cubic-bezier(0.55, 0, 0.85, 0.4) both;
}
@keyframes jg-cae { to { transform: translateY(150px) rotate(220deg); opacity: .2; } }
.jg-hm-n { font-size: 20px; font-weight: 900; color: var(--crs-dorado); font-variant-numeric: tabular-nums; }
.jg-hm-tabs { display: flex; gap: 4px; padding: 3px; border-radius: 999px; background: rgba(0, 0, 0, .3); }
.jg-hm-tab {
  padding: 6px 11px; border: 0; border-radius: 999px; cursor: pointer; background: none; white-space: nowrap;
  font-family: inherit; font-size: 12px; font-weight: 800; color: var(--crs-suave);
}
.jg-hm-tab[aria-pressed="true"] { background: var(--crs-marca); color: #2A1200; }

/* ── la balanza ── */
.jg-bal { --ang: 0deg; position: relative; height: 210px; margin: 6px 0 2px; }
.jg-bal-poste {
  position: absolute; left: 50%; top: 34px; bottom: 0; width: 10px; margin-left: -5px;
  border-radius: 5px 5px 0 0; background: linear-gradient(180deg, #C98A3A, #8A5A22);
}
.jg-bal-poste::after {
  content: ''; position: absolute; left: 50%; bottom: 0; width: 110px; height: 12px; margin-left: -55px;
  border-radius: 8px 8px 4px 4px; background: #8A5A22;
}
.jg-bal-brazo {
  position: absolute; left: 18%; right: 18%; top: 30px; height: 8px; border-radius: 4px; z-index: 1;
  background: linear-gradient(180deg, #E0A24E, #A86E2C);
  transform: rotate(var(--ang)); transform-origin: 50% 50%;
  transition: transform .9s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.jg-bal-plato {
  position: absolute; top: 4px; width: 50%; min-height: 96px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px;
  padding: 26px 8px 10px; transform-origin: 50% 0;
  transform: rotate(calc(var(--ang) * -1));
  transition: transform .9s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-bottom: 5px solid #C98A3A; border-radius: 0 0 50% 50% / 0 0 22px 22px;
}
/* El centro de cada plato cuelga justo del extremo del brazo. */
/* Los hilos: del gancho al borde del plato. */
.jg-bal-plato::before {
  content: ''; position: absolute; left: 8%; right: 8%; top: 0; bottom: 5px; z-index: -1; pointer-events: none;
  background:
    linear-gradient(to bottom left, transparent calc(50% - 1px), rgba(255, 255, 255, .22) 50%, transparent calc(50% + 1px)) left / 50% 100% no-repeat,
    linear-gradient(to bottom right, transparent calc(50% - 1px), rgba(255, 255, 255, .22) 50%, transparent calc(50% + 1px)) right / 50% 100% no-repeat;
}
.jg-bal-izq { left: -25%; }
.jg-bal-der { right: -25%; }
.jg-bal-k { font-size: 11px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; color: var(--crs-suave); text-align: center; }
.jg-bal-pila { display: flex; flex-wrap: wrap-reverse; justify-content: center; gap: 3px; }
.jg-bal-ficha {
  padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; color: #2A1200;
  background: var(--crs-dorado); animation: crs-pop .4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.jg-bal-der .jg-bal-ficha { background: #F58A6D; }
.jg-bal-n { font-size: 16px; font-weight: 900; color: var(--crs-texto); font-variant-numeric: tabular-nums; }
.jg-bal.is-pareja .jg-bal-n { color: var(--crs-verde); }
.jg-bal-fichas { display: flex; flex-direction: column; gap: 8px; }
.jg-bal-mov {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 9px 12px; border-radius: var(--r-sm); background: rgba(255, 255, 255, .05); border: 1px solid var(--crs-borde);
  animation: crs-reto-in .35s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.jg-bal-mov-t { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.jg-bal-mov-t span { font-size: 13.5px; font-weight: 700; color: var(--crs-texto); }
.jg-bal-mov-t b { font-size: 13px; font-weight: 900; color: var(--crs-marca-luz); font-variant-numeric: tabular-nums; }
.jg-bal-mov-acc { display: flex; gap: 6px; }
.jg-bal-a {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--crs-borde-alto); background: rgba(0, 0, 0, .22);
  font-family: inherit; font-size: 12.5px; font-weight: 800; color: var(--crs-texto);
}
.jg-bal-a:hover { border-color: var(--crs-marca); }
.jg-bal-cuenta { text-align: center; font-size: 15px; font-weight: 900; color: var(--crs-texto); font-variant-numeric: tabular-nums; }

/* ── el deslizador (balanza para equilibrar y precio) ── */
.jg-desl { display: flex; align-items: center; gap: 10px; }
.jg-desl-b {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  border: 1.5px solid var(--crs-borde-alto); background: rgba(0, 0, 0, .22); color: var(--crs-texto); font-size: 16px;
}
.jg-desl-b:disabled { opacity: .35; cursor: default; }
.jg-desl-r { flex: 1; min-width: 0; accent-color: var(--crs-marca); height: 28px; cursor: pointer; }

/* ── ¿es fraude?: el mensaje ── */
.jg-fr-msg {
  align-self: flex-start; max-width: 560px; padding: 12px 14px 14px; border-radius: 6px 18px 18px 18px;
  background: rgba(255, 255, 255, .08); border: 1px solid var(--crs-borde-alto);
  animation: crs-reto-in .4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.jg-fr-de { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; font-size: 12px; font-weight: 900; color: var(--crs-suave); letter-spacing: .4px; }
.jg-fr-de i { font-size: 16px; color: var(--crs-vio-luz); }
.jg-fr-tx { margin: 0; font-size: 15px; line-height: 1.6; color: var(--crs-texto); }
.jg-fr-trozo {
  white-space: pre-wrap; border-radius: 6px; cursor: pointer;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
  transition: background var(--tr) ease, box-shadow var(--tr) ease;
}
.jg-fr-trozo[role="button"]:hover { background: rgba(255, 255, 255, .1); }
.jg-fr-trozo.es-pista { box-shadow: 0 2px 0 var(--crs-dorado); }
.jg-fr-trozo.es-senal { background: rgba(240, 97, 109, .16); box-shadow: 0 0 0 2px var(--crs-rojo); }
.jg-fr-trozo.is-quieto { cursor: default; }
.jg-fr-pide { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13.5px; font-weight: 800; color: var(--crs-marca-luz); }
.jg-fr-nota { margin: 0; font-size: 13px; color: var(--crs-suave); }
.jg-fr-porque {
  display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: var(--r-sm);
  background: rgba(240, 97, 109, .1); border-left: 3px solid var(--crs-rojo);
  font-size: 13.5px; line-height: 1.5; color: var(--crs-texto);
  animation: crs-reto-in .35s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.jg-fr-porque i { font-size: 18px; color: var(--crs-rojo); flex: none; margin-top: 1px; }

/* ── mueve el precio ── */
.jg-pr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.jg-pr-izq { display: flex; flex-direction: column; gap: 10px; }
.jg-pr-grande { font-size: 30px; font-weight: 900; color: var(--crs-marca-luz); text-align: center; font-variant-numeric: tabular-nums; }
.jg-pr-barras {
  position: relative; display: flex; align-items: stretch; gap: 6px; min-height: 180px; padding: 6px 4px 22px;
  border-radius: 12px; background: rgba(0, 0, 0, .22);
}
.jg-pr-barras::before { content: ''; position: absolute; left: 6px; right: 6px; top: calc(50% - 8px); border-top: 1px dashed rgba(255, 255, 255, .25); }
.jg-pr-col { position: relative; flex: 1; display: flex; flex-direction: column; }
.jg-pr-b {
  position: absolute; left: 12%; right: 12%; border-radius: 4px;
  transition: opacity var(--tr) ease, box-shadow var(--tr) ease; opacity: .55;
}
.jg-pr-col.is-gana .jg-pr-b { bottom: 50%; background: var(--crs-verde); border-radius: 4px 4px 0 0; }
.jg-pr-col.is-pierde .jg-pr-b { top: 50%; background: var(--crs-rojo); border-radius: 0 0 4px 4px; }
.jg-pr-col.is-on .jg-pr-b { opacity: 1; box-shadow: 0 0 12px rgba(255, 255, 255, .35); }
.jg-pr-x { position: absolute; left: 0; right: 0; bottom: -18px; text-align: center; font-size: 11px; font-weight: 800; color: var(--crs-tenue); }
.jg-pr-col.is-on .jg-pr-x { color: var(--crs-texto); }
.jg-pr-zona { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--crs-marca-luz); font-weight: 700; }

/* ══ TANDA 5 ══════════════════════════════════════════════════════════════ */
.jg-btn--sec { background: rgba(255, 255, 255, .1); color: var(--crs-texto); border: 1.5px solid var(--crs-borde-alto); }

/* ── billetes y monedas de juguete (nunca el diseño de los de verdad) ── */
.jg-bill {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 74px; height: 42px; padding: 0 12px; border-radius: 8px; cursor: pointer;
  border: 1.5px solid rgba(255, 255, 255, .22);
  background: linear-gradient(135deg, rgba(91, 227, 156, .26), rgba(91, 227, 156, .1));
  font-family: inherit; color: var(--crs-texto);
  transition: transform var(--tr-fast) ease, border-color var(--tr) ease, opacity var(--tr) ease;
}
.jg-bill-n { font-size: 15px; font-weight: 900; font-variant-numeric: tabular-nums; }
.jg-bill-x { font-size: 12px; font-weight: 800; color: var(--crs-suave); }
.jg-bill--moneda {
  min-width: 44px; width: 44px; height: 44px; padding: 0; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255, 231, 163, .5), rgba(245, 182, 43, .25));
}
.jg-bill:hover:not(:disabled) { border-color: var(--crs-marca); }
.jg-bill:active:not(:disabled) { transform: scale(.96); }
.jg-bill[aria-pressed="true"] { border-color: var(--crs-marca); box-shadow: 0 0 0 3px rgba(255, 138, 0, .3); }
.jg-bill:disabled { opacity: .4; cursor: default; }

/* ── sobres ── */
.jg-sb-queda { font-size: 15px; font-weight: 900; color: var(--crs-marca-luz); }
.jg-sb-queda.is-listo { color: var(--crs-verde); }
.jg-sb-cartera { display: flex; flex-wrap: wrap; gap: 8px; }
.jg-sb-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.jg-sb-fila { display: flex; flex-direction: column; gap: 4px; }
.jg-sb-sobre {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left;
  min-height: 96px; padding: 26px 14px 12px; border-radius: 12px; cursor: pointer;
  border: 1.5px dashed var(--crs-borde-alto); background: rgba(255, 255, 255, .04);
  font-family: inherit; color: var(--crs-texto);
  transition: border-color var(--tr) ease, background var(--tr) ease;
}
/* La solapa del sobre. */
.jg-sb-sobre::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 18px; pointer-events: none;
  background: linear-gradient(to bottom right, transparent 49%, rgba(255, 255, 255, .14) 50%, transparent 51%) left / 50% 100% no-repeat,
              linear-gradient(to bottom left, transparent 49%, rgba(255, 255, 255, .14) 50%, transparent 51%) right / 50% 100% no-repeat;
}
.jg-sb-sobre:hover { border-color: var(--crs-marca); }
.jg-sb-sobre.is-lleno { border-style: solid; border-color: rgba(255, 184, 92, .55); background: rgba(255, 138, 0, .1); }
.jg-sb-nom { font-size: 13.5px; font-weight: 800; line-height: 1.3; }
.jg-sb-n { font-size: 18px; font-weight: 900; color: var(--crs-marca-luz); font-variant-numeric: tabular-nums; }
.jg-sb-min { font-size: 12px; color: var(--crs-suave); }
.jg-sb-dev { align-self: flex-start; font-size: 12.5px; }
.jg-sb-semana { display: flex; flex-direction: column; gap: 6px; }
.jg-sb-ev {
  display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 2px 10px; align-items: baseline;
  padding: 9px 12px; border-radius: var(--r-sm); background: rgba(255, 255, 255, .05); border-left: 3px solid var(--crs-verde);
  font-size: 13.5px; color: var(--crs-texto); animation: crs-reto-in .35s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.jg-sb-ev b { font-weight: 900; }
.jg-sb-ev em { grid-column: 2; font-style: normal; font-size: 12.5px; color: var(--crs-verde); font-weight: 800; }
.jg-sb-ev.is-prestado { border-left-color: var(--crs-dorado); }
.jg-sb-ev.is-prestado em { color: var(--crs-dorado); }
.jg-sb-ev.is-falto { border-left-color: var(--crs-rojo); }
.jg-sb-ev.is-falto em { color: var(--crs-rojo); }

/* ── la tanda: una tira de semanas ── */
.jg-td-tira { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; }
.jg-td-s {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 7px 4px 8px; border-radius: 10px; background: rgba(255, 255, 255, .05); border: 1px solid var(--crs-borde);
}
.jg-td-k { font-size: 11px; font-weight: 800; color: var(--crs-tenue); }
.jg-td-moneda { width: 16px; height: 16px; border-radius: 50%; background: rgba(255, 255, 255, .1); transition: background var(--tr) ease, transform var(--tr) ease; }
.jg-td-s.is-pasada .jg-td-moneda { background: radial-gradient(circle at 35% 35%, #FFE7A3, #F5B62B 60%, #C88A12); }
.jg-td-s.is-tuya { border-color: rgba(255, 184, 92, .6); }
.jg-td-s.is-cobro { background: rgba(245, 182, 43, .22); box-shadow: 0 0 18px rgba(245, 182, 43, .35); animation: crs-pop .45s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.jg-td-s.is-cobro .jg-td-k { color: var(--crs-dorado); }
.jg-td-cuenta { display: flex; flex-direction: column; padding: 6px 14px; border-radius: 12px; background: rgba(0, 0, 0, .22); font-variant-numeric: tabular-nums; }

/* ── crece o te come ── */
.jg-cr-mes { font-size: 15px; font-weight: 900; color: var(--crs-texto); }
.jg-cr-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.jg-cr-col { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--crs-borde); }
.jg-cr-col.is-fin { border-color: rgba(91, 227, 156, .45); }
.jg-cr-nom { font-size: 13.5px; font-weight: 900; color: var(--crs-texto); }
.jg-cr-barra { height: 14px; border-radius: 999px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.jg-cr-barra i { display: block; height: 100%; width: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--crs-rojo), #F58A6D); transition: width .5s cubic-bezier(0.22, 1, 0.36, 1); }
.jg-cr-acc { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ── la caja ── */
.jg-cj-mano { display: flex; flex-wrap: wrap; gap: 5px; min-height: 30px; padding: 6px; border-radius: 10px; background: rgba(0, 0, 0, .22); }
.jg-cj-ficha { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 26px; padding: 0 8px; border-radius: 6px; background: rgba(91, 227, 156, .22); font-size: 12.5px; font-weight: 900; color: var(--crs-texto); animation: crs-pop .3s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.jg-cj-ficha.jg-bill--moneda { width: 28px; min-width: 28px; height: 28px; padding: 0; border-radius: 50%; }
.jg-cj-llevas { font-size: 14px; font-weight: 900; color: var(--crs-marca-luz); font-variant-numeric: tabular-nums; }
.jg-cj-k { font-size: 10.5px; font-weight: 900; letter-spacing: 1.2px; text-transform: uppercase; color: var(--crs-suave); }
.jg-cj-montones { display: flex; flex-wrap: wrap; gap: 8px; }
.jg-cj-monton { min-width: 96px; }
.jg-cj-monton.jg-bill--moneda { width: auto; height: 42px; padding: 0 14px; border-radius: 999px; }
.jg-cj-monton.is-contado { opacity: 1; border-color: var(--crs-verde); background: linear-gradient(135deg, rgba(91, 227, 156, .38), rgba(91, 227, 156, .16)); }
.jg-num.is-bien { border-color: var(--crs-verde); }

/* ── calendario de pagos ── */
.jg-cal-chips { display: flex; flex-wrap: wrap; gap: 8px; min-height: 44px; }
.jg-cal-chip {
  display: inline-flex; align-items: baseline; gap: 8px; padding: 8px 12px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--crs-borde-alto); background: rgba(240, 97, 109, .1); font-family: inherit; color: var(--crs-texto);
}
.jg-cal-chip span { font-size: 13px; font-weight: 800; }
.jg-cal-chip b { font-size: 13px; font-weight: 900; color: #FF9A9A; font-variant-numeric: tabular-nums; }
.jg-cal-chip em { font-style: normal; font-size: 11.5px; color: var(--crs-suave); }
.jg-cal-chip[aria-pressed="true"] { border-color: var(--crs-marca); box-shadow: 0 0 0 3px rgba(255, 138, 0, .3); }
.jg-cal-todos { font-size: 13px; font-weight: 800; color: var(--crs-verde); align-self: center; }
.jg-cal-nota { margin: 0; min-height: 20px; font-size: 13px; font-weight: 700; color: var(--crs-marca-luz); }
.jg-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.jg-cal-dia {
  display: flex; flex-direction: column; align-items: stretch; gap: 2px; min-height: 70px; padding: 5px 6px; border-radius: 8px; cursor: pointer; text-align: left;
  border: 1px solid var(--crs-borde); background: rgba(255, 255, 255, .04); font-family: inherit; color: var(--crs-texto);
  transition: border-color var(--tr) ease, background var(--tr) ease;
}
.jg-cal-k { font-size: 10.5px; font-weight: 900; color: var(--crs-tenue); }
.jg-cal-mov { display: flex; flex-direction: column; gap: 1px; flex: 1; }
.jg-cal-mov i { font-style: normal; font-size: 10.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.jg-cal-in { color: var(--crs-verde); }
.jg-cal-out { color: #FF9A9A; }
.jg-cal-movido { text-decoration: underline; text-underline-offset: 2px; }
.jg-cal-s { font-size: 11.5px; font-weight: 900; color: var(--crs-texto); font-variant-numeric: tabular-nums; }
.jg-cal-dia.is-rango { border-color: rgba(255, 184, 92, .7); background: rgba(255, 138, 0, .1); }
.jg-cal-dia.is-rojo { border-color: var(--crs-rojo); background: rgba(240, 97, 109, .2); }
.jg-cal-dia.is-rojo .jg-cal-s { color: #FF9A9A; }

/* ── repaso relámpago: el aro que se vacía ── */
.jg-rl-cab { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.jg-rl-aro { position: relative; width: 48px; height: 48px; flex: none; }
.jg-rl-aro svg { width: 48px; height: 48px; transform: rotate(-90deg); }
.jg-rl-fondo { fill: none; stroke: rgba(255, 255, 255, .1); stroke-width: 4; }
.jg-rl-resta { fill: none; stroke: var(--crs-verde); stroke-width: 4; stroke-linecap: round; transition: stroke-dashoffset .2s linear, stroke .3s ease; }
.jg-rl-aro.is-poco .jg-rl-resta { stroke: var(--crs-dorado); }
.jg-rl-aro.is-apagado .jg-rl-resta { stroke: rgba(255, 255, 255, .2); }
.jg-rl-n { position: absolute; inset: 0; display: grid; place-items: center; font-size: 15px; font-weight: 900; color: var(--crs-texto); font-variant-numeric: tabular-nums; }
.jg-rl-b {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--crs-borde-alto); background: rgba(0, 0, 0, .22); font-family: inherit; font-size: 12.5px; font-weight: 800; color: var(--crs-texto);
}
.jg-rl-b[aria-pressed="true"] { border-color: var(--crs-vio-luz); background: rgba(196, 166, 255, .14); }
.jg-rl-q { display: flex; flex-direction: column; gap: 10px; }
.jg-rl-tx { margin: 0; font-size: 16px; line-height: 1.5; font-weight: 800; color: var(--crs-texto); }
.crs-cierre-btn--rayo { display: inline-flex; align-items: center; gap: 6px; }

/* ── memorama con Pío ── */
.jg-mp-turno { min-height: 22px; font-size: 14px; font-weight: 900; color: var(--crs-marca-luz); }
.jg-mp-turno.is-pio { color: var(--crs-vio-luz); }
.jg-mp-tablero { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.jg-mp-carta {
  position: relative; min-height: 86px; padding: 10px; border-radius: 12px; cursor: pointer; text-align: center;
  border: 1.5px solid var(--crs-borde-alto); background: linear-gradient(135deg, rgba(168, 85, 247, .3), rgba(255, 138, 0, .16));
  font-family: inherit; color: transparent;
  animation: jg-reparte .32s cubic-bezier(0.22, 1, 0.36, 1) both; animation-delay: var(--d, 0ms);
  transition: background var(--tr) ease, border-color var(--tr) ease;
}
.jg-mp-carta::after { content: '?'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 22px; font-weight: 900; color: rgba(255, 255, 255, .5); }
.jg-mp-cara { display: block; font-size: 13px; line-height: 1.35; font-weight: 700; }
.jg-mp--a .jg-mp-cara { font-size: 14.5px; font-weight: 900; }
.jg-mp-carta.is-abierta, .jg-mp-carta.is-hallada { color: var(--crs-texto); background: rgba(255, 255, 255, .07); }
.jg-mp-carta.is-abierta::after, .jg-mp-carta.is-hallada::after { content: ''; }
.jg-mp-carta.is-abierta { border-color: var(--crs-marca); }
.jg-mp-carta.is-tuya { border-color: var(--crs-verde); background: rgba(91, 227, 156, .14); }
.jg-mp-carta.is-pio { border-color: var(--crs-vio-luz); background: rgba(196, 166, 255, .14); }
.jg-mp-carta:disabled { cursor: default; }
.jg-mp-tablero:not(.is-reparto) .jg-mp-carta { animation: none; }
@keyframes jg-reparte {
  from { opacity: 0; transform: translate(-40px, -30px) rotate(-12deg) scale(.7); }
  to   { opacity: 1; transform: none; }
}
.jg-mp-juez { display: flex; flex-direction: column; gap: 8px; }

@media (max-width: 760px) {
  .jg-hm { grid-template-columns: 1fr; }
  .jg-hm-lado { position: static; order: -1; flex-direction: row; justify-content: center; }
  .jg-hm-vidrio { width: 90px; height: 112px; }
  .jg-pr { grid-template-columns: 1fr; }
  .jg-bal { height: 190px; }
  .jg-bal-mov { flex-direction: column; align-items: stretch; }
  .jg-bal-mov-acc { justify-content: stretch; }
  .jg-bal-a { flex: 1; justify-content: center; }
  .jg-cr-cols { grid-template-columns: 1fr; }
  .jg-cal-dia { min-height: 58px; padding: 4px; }
  .jg-cal-mov i { font-size: 9.5px; }
  .jg-sb-ev { grid-template-columns: 1fr; }
  .jg-sb-ev em { grid-column: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .jg-tiembla, .jg-tk-r, .jg-bal-ficha, .jg-bal-mov, .jg-fr-msg, .jg-fr-porque, .jg-hm-moneda,
  .jg-sb-ev, .jg-td-s.is-cobro, .jg-cj-ficha, .jg-mp-carta { animation: none !important; }
  .jg-bal-brazo, .jg-bal-plato, .jg-hm-liquido, .jg-tk-c, .jg-hm-op, .jg-cr-barra i, .jg-rl-resta, .jg-td-moneda { transition: none; }
}
