/* ¡Última! (el jodete) · estilos propios. Todo cuelga de .jd (la pantalla) o de .pg-jodete (la página). */

/* ---------- Página ---------- */
.pg-jodete .hero-juego .portada { min-height: 420px; }
.pg-jodete .hero-juego .portada .arte { place-items: start center; padding-top: 8px; }
.pg-jodete .hero-juego .portada .arte svg { width: 100%; max-width: 520px; height: auto; }
.pg-jodete .hero-juego .portada::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 38%, rgba(27, 25, 22, .85) 62%); pointer-events: none; }
.pg-jodete .hero-juego .portada > *:not(.arte) { z-index: 1; }
@media (min-width: 820px) {
  .pg-jodete .hero-juego .portada { min-height: 360px; }
  .pg-jodete .hero-juego .portada .arte { place-items: center end; padding: 0 3% 0 0; }
  .pg-jodete .hero-juego .portada .arte svg { width: 56%; max-width: 600px; }
  .pg-jodete .hero-juego .portada::after { background: linear-gradient(90deg, rgba(27, 25, 22, .9) 30%, transparent 62%); }
}
.pg-jodete .cartas-reglas { list-style: none; padding: 0; margin: 10px 0 4px; display: grid; gap: 10px; }
.pg-jodete .cartas-reglas li { display: flex; gap: 12px; align-items: flex-start; }
.pg-jodete .cartas-reglas .carta { --carta: 44px; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .2)); }
.pg-jodete .cartas-reglas b { display: block; }
.pg-jodete .medallas-lista { padding-left: 18px; margin: 8px 0; }
.pg-jodete .nota-ranking { margin: 10px 4px 0; }
.pg-jodete .otros-juegos a[aria-current="page"] { box-shadow: inset 0 0 0 2px var(--kraft); }
.pg-jodete .otros-juegos a[aria-current="page"] small::after { content: ' · estás acá'; color: var(--kraft-osc); font-weight: 700; }

/* ---------- Pantalla del juego ---------- */
.jd {
  --c-mano: 72px; --c-pozo: 98px; --c-mazo: 72px;
  --rojo: #c2412d;
  color: var(--blanco);
  overflow: hidden;
  -webkit-user-select: none; user-select: none;
  background:
    radial-gradient(ellipse 80% 55% at 50% 42%, rgba(255, 210, 150, .07), transparent 65%),
    radial-gradient(ellipse 130% 95% at 50% 48%, transparent 52%, rgba(0, 0, 0, .55) 100%),
    repeating-linear-gradient(90deg, rgba(255, 240, 220, .022) 0 2px, transparent 2px 9px, rgba(0, 0, 0, .06) 9px 11px, transparent 11px 26px),
    linear-gradient(180deg, #35261b 0%, #2a1d14 55%, #1f150e 100%);
}
@media (min-width: 700px) and (min-height: 640px) { .jd { --c-mano: 88px; --c-pozo: 124px; --c-mazo: 92px; } }
@media (max-width: 699px) and (max-height: 700px) { .jd { --c-mano: 62px; --c-pozo: 82px; --c-mazo: 60px; } }
.jd-mesa { position: absolute; inset: 0; margin: 0 auto; max-width: 1040px; display: flex; flex-direction: column; }

/* Rivales */
.jd-arriba { flex: none; padding: 10px 8px 0; }
.jd-rivales { display: flex; justify-content: center; gap: 6px; }
.jd-rival {
  position: relative; flex: 0 1 100px; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 4px 7px; border-radius: 16px; background: rgba(12, 9, 6, .42); border: 1px solid rgba(255, 253, 248, .07);
  transition: background .2s ease, box-shadow .2s ease, transform .2s ease;
}
.jd-rival.activo { background: rgba(135, 206, 235, .13); box-shadow: 0 0 0 2px var(--celeste), 0 0 20px rgba(135, 206, 235, .3); transform: translateY(2px); }
.jd-rival.expuesto { box-shadow: 0 0 0 2px var(--rojo), 0 0 18px rgba(194, 65, 45, .45); }
.jd-rival-av { position: relative; margin-bottom: 3px; }
.jd-rival-av .avatar { width: 42px; height: 42px; font-size: 23px; }
.jd-rival-nom { font-size: 12px; font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #efe6d8; line-height: 1.2; }
.jd-rival-cartas { display: flex; align-items: center; gap: 6px; height: 22px; }
.jd-rival-cartas b { font-family: var(--titulo); font-size: 21px; font-weight: 900; line-height: 1; color: var(--celeste); }
.jd-minis { display: flex; align-items: center; }
.jd-piensa { position: absolute; right: -9px; bottom: -3px; display: flex; gap: 2px; background: var(--negro); border-radius: 999px; padding: 4px 5px; box-shadow: 0 0 0 1.5px var(--celeste); }
.jd-piensa i { width: 4px; height: 4px; border-radius: 50%; background: var(--celeste); animation: jd-punto 1s ease-in-out infinite; }
.jd-piensa i:nth-child(2) { animation-delay: .15s; }
.jd-piensa i:nth-child(3) { animation-delay: .3s; }
@keyframes jd-punto { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-2px); } }
.jd-puntos { display: inline-flex; gap: 3px; align-items: center; }
.jd-puntos i { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid rgba(179, 139, 93, .85); }
.jd-puntos i.si { background: var(--kraft); border-color: var(--kraft); box-shadow: 0 0 6px rgba(179, 139, 93, .6); }
.jd-tag {
  position: absolute; top: -9px; left: 50%; transform: translateX(-50%); z-index: 2;
  font-family: var(--titulo); font-weight: 900; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; line-height: 1;
  background: var(--celeste); color: var(--negro); padding: 3px 8px 2px; border-radius: 999px; white-space: nowrap;
}
.jd-tag.rojo { background: var(--rojo); color: #fff; animation: latir 1s ease-in-out infinite; }

/* Dorso de las cartas (CSS, para no repetir ids del SVG) */
.jd-dorso { position: absolute; inset: 0; border-radius: 9% / 6%; background: #111; box-shadow: 0 3px 8px rgba(0, 0, 0, .35); overflow: hidden; display: block; }
.jd-dorso::before { content: ''; position: absolute; inset: 6%; border-radius: 7% / 5%; background: repeating-linear-gradient(45deg, #B38B5D 0 5px, #9d7a50 5px 7px); box-shadow: inset 0 0 0 1px rgba(255, 253, 248, .45); }
.jd-dorso::after { content: ''; position: absolute; left: 50%; top: 50%; width: 48%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: #111 url(/comun/marca/monograma-blanco.svg) center / 56% no-repeat; box-shadow: 0 0 0 2px var(--celeste); }
.jd-dorso.mini { position: relative; display: inline-block; width: 13px; height: 19px; margin-left: -8px; border-radius: 2px; box-shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 0 0 .5px rgba(255, 253, 248, .25); transform-origin: 50% 120%; }
.jd-dorso.mini:first-child { margin-left: 0; }
.jd-dorso.mini::before { inset: 1.5px; border-radius: 1px; background: repeating-linear-gradient(45deg, #B38B5D 0 2px, #9d7a50 2px 3px); box-shadow: none; }
.jd-dorso.mini::after { display: none; }

/* Centro: tapete, mazo, pozo y sentido */
.jd-centro { flex: 1; min-height: 0; display: grid; place-items: center; padding: 8px 10px 4px; }
.jd-tapete { position: relative; width: min(100%, 540px); height: 100%; max-height: 360px; min-height: 190px; display: grid; place-items: center; }
.jd-tapete::before {
  content: ''; position: absolute; inset: 5% 3%; border-radius: 50%;
  background: radial-gradient(ellipse at 50% 38%, #433022 0%, #2e2017 58%, #23180f 100%);
  box-shadow: inset 0 0 0 2px rgba(179, 139, 93, .28), inset 0 0 0 7px rgba(0, 0, 0, .18), inset 0 0 44px rgba(0, 0, 0, .55), 0 12px 34px rgba(0, 0, 0, .35);
  transition: box-shadow .3s ease;
}
.jd-tapete.pendiente::before { box-shadow: inset 0 0 0 2px rgba(194, 65, 45, .7), inset 0 0 0 7px rgba(194, 65, 45, .12), inset 0 0 44px rgba(0, 0, 0, .55), 0 12px 34px rgba(0, 0, 0, .35); }
.jd-ronda { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; transition: transform .6s cubic-bezier(.3, 1.4, .5, 1); z-index: 0; }
.jd-ronda-linea { fill: none; stroke: var(--celeste); stroke-width: 2; stroke-dasharray: 2 10; stroke-linecap: round; opacity: .6; animation: jd-fluye 1.4s linear infinite; vector-effect: non-scaling-stroke; }
.jd-ronda-flechas path { fill: none; stroke: var(--celeste); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; opacity: .95; }
@keyframes jd-fluye { to { stroke-dashoffset: -24; } }
.jd-tapete.anti .jd-ronda { transform: scaleX(-1); }
.jd-tapete.gira .jd-ronda-flechas { animation: jd-brilla .8s ease; }
@keyframes jd-brilla { 0%, 100% { opacity: .95; } 40% { opacity: 1; filter: drop-shadow(0 0 6px #87CEEB); } }
.jd-marca { position: absolute; top: 12%; left: 50%; transform: translateX(-50%); z-index: 1; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: rgba(214, 200, 180, .7); white-space: nowrap; }
.jd-pilas { position: relative; z-index: 1; display: flex; align-items: center; gap: clamp(22px, 7vw, 54px); margin-top: -4px; }
.jd-mazo { position: relative; width: var(--c-mazo); aspect-ratio: 2 / 3; border: 0; padding: 0; background: none; border-radius: 10px; cursor: default; color: inherit; touch-action: manipulation; }
.jd-mazo-pila { position: absolute; inset: 0; }
.jd-mazo .d2 { transform: translate(-3px, -3px); }
.jd-mazo .d3 { transform: translate(-6px, -6px); }
.jd-mazo.activo { cursor: pointer; }
.jd-mazo.activo .d1 { box-shadow: 0 0 0 3px var(--celeste), 0 0 24px rgba(135, 206, 235, .65); animation: jd-llama 1.3s ease-in-out infinite; }
.jd-mazo.activo:active .d1 { transform: scale(.96); }
@keyframes jd-llama { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.jd-mazo.vacio .jd-mazo-pila { opacity: .25; }
.jd-mazo-n { position: absolute; top: -10px; right: -10px; z-index: 2; min-width: 26px; text-align: center; font-family: var(--texto); font-size: 12px; font-weight: 800; color: var(--celeste); background: var(--negro); border: 1.5px solid rgba(135, 206, 235, .5); border-radius: 999px; padding: 2px 6px; }
.jd-mazo:focus-visible { outline: 3px solid var(--celeste); outline-offset: 4px; }
.jd-pozo-lugar { position: relative; width: var(--c-pozo); aspect-ratio: 2 / 3; }
.jd-pozo { position: absolute; inset: 0; }
.jd-pozo-carta { position: absolute; inset: 0; transform: translateX(var(--x)) rotate(var(--r)); }
.jd-pozo-carta .carta { --carta: var(--c-pozo); }
.jd-pozo-carta:not(.tope) .carta { filter: brightness(.8) drop-shadow(0 3px 6px rgba(0, 0, 0, .3)); }
.jd-pozo-carta.tope .carta { filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .45)); }
.jd-da-vuelta .carta { animation: dar-vuelta .38s ease both; }
.jd-pend {
  position: absolute; top: -18px; right: -24px; z-index: 3; width: 56px; height: 56px; border-radius: 50%;
  background: var(--rojo); color: #fff; display: grid; place-items: center; align-content: center; gap: 1px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .45), 0 0 0 3px var(--blanco); animation: latir 1.1s ease-in-out infinite;
}
.jd-pend b { font-family: var(--titulo); font-weight: 900; font-size: 32px; line-height: 1; margin-top: 3px; }
.jd-palo {
  position: absolute; bottom: 7%; left: 50%; transform: translateX(-50%); z-index: 2;
  display: flex; align-items: center; gap: 8px; padding: 4px 16px 4px 4px; border-radius: 999px;
  background: rgba(12, 9, 6, .7); border: 1.5px solid var(--c, #87CEEB); box-shadow: 0 4px 14px rgba(0, 0, 0, .35); white-space: nowrap;
}
.jd-palo-ic { width: 30px; height: 30px; border-radius: 50%; background: var(--blanco); display: grid; place-items: center; flex: none; }
.jd-palo-ic svg { width: 24px; height: 24px; }
.jd-palo small { display: block; font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: #d6c8b4; font-weight: 700; line-height: 1.1; }
.jd-palo b { display: block; font-family: var(--titulo); font-weight: 800; text-transform: uppercase; font-size: 20px; line-height: 1; letter-spacing: .02em; }
.jd-palo-duda { font-family: var(--titulo); font-weight: 900; font-size: 20px; color: var(--negro); }
.jd-palo.elegido { background: var(--c); border-color: var(--blanco); }
.jd-palo.elegido small { color: rgba(255, 255, 255, .9); }
.jd-palo.pop { animation: jd-pop .55s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes jd-pop { 0% { scale: .6; } 60% { scale: 1.15; } 100% { scale: 1; } }

/* Abajo: turno, botones y mi mano */
.jd-abajo { flex: none; position: relative; }
.jd-turno { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 2px 12px 8px; min-height: 92px; }
.jd-msg { margin: 0; font-size: 14px; font-weight: 600; text-align: center; color: #efe6d8; line-height: 1.3; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 8px; min-height: 28px; }
.jd-msg b { color: var(--celeste); }
.jd-tetoca { font-family: var(--titulo); font-weight: 900; text-transform: uppercase; font-size: 20px; letter-spacing: .03em; background: var(--celeste); color: var(--negro); padding: 3px 10px 1px; border-radius: 8px; line-height: 1.1; }
.jd-no { color: #ffb4a6; font-weight: 700; }
.jd-acciones { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.jd-acciones:empty { display: none; }
.jd-acciones .btn { min-height: 48px; }
.jd-btn-ultima { font-family: var(--titulo); font-weight: 900; font-size: 26px; text-transform: uppercase; letter-spacing: .03em; padding: 0 28px; box-shadow: 0 0 0 4px rgba(135, 206, 235, .25), 0 8px 20px rgba(0, 0, 0, .35); animation: latir 1.2s ease-in-out infinite; }
.jd-btn-ultima.urgente { background: var(--blanco); border-color: var(--blanco); animation: sacudir .45s ease 2, latir 1s ease-in-out .9s infinite; }
.jd-btn-agarre { gap: 8px; padding: 0 18px 0 6px; animation: latir 1s ease-in-out infinite; box-shadow: 0 8px 20px rgba(0, 0, 0, .35); }
.jd-btn-agarre span { overflow: hidden; text-overflow: ellipsis; }
.jd-yo { position: relative; padding-bottom: env(safe-area-inset-bottom); }
.jd-yo::before { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%); z-index: -1; background: linear-gradient(180deg, rgba(0, 0, 0, .16), rgba(0, 0, 0, .46)); border-top: 1px solid rgba(255, 253, 248, .08); transition: box-shadow .25s ease; }
.jd-abajo { z-index: 0; }
.jd-yo.activo::before { box-shadow: inset 0 3px 0 var(--celeste), 0 -14px 34px rgba(135, 206, 235, .14); }
.jd-yo.expuesto::before { box-shadow: inset 0 3px 0 var(--rojo); }
.jd-yo-cab { display: flex; align-items: center; gap: 8px; padding: 9px 14px 0; min-height: 40px; }
.jd-yo-nom { font-weight: 800; font-size: 13px; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jd-yo-n { margin-left: auto; font-size: 12px; font-weight: 700; color: #d6c8b4; }
.jd-yo-cab .jd-tag { position: static; transform: none; }
.jd-mano { position: relative; overflow-x: auto; overflow-y: hidden; height: calc(var(--c-mano) * 1.5 + 48px); scrollbar-width: none; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.jd-mano::-webkit-scrollbar { display: none; }
.jd-mano.desliza { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%); }
.jd-abanico { position: relative; height: 100%; min-width: 100%; }
.jd-abanico .carta { --carta: var(--c-mano); position: absolute; bottom: 14px; transform: translateY(var(--y, 0px)) rotate(var(--rot, 0deg)); transform-origin: 50% 100%; }
.jd .jd-abanico .carta.jugable { transform: translateY(calc(var(--y, 0px) - 16px)) rotate(var(--rot, 0deg)); filter: drop-shadow(0 0 0 #87CEEB) drop-shadow(0 0 5px rgba(135, 206, 235, .95)) drop-shadow(0 8px 12px rgba(0, 0, 0, .4)); }
.jd .jd-abanico .carta.jugable:hover, .jd .jd-abanico .carta.jugable:focus-visible { transform: translateY(calc(var(--y, 0px) - 28px)) rotate(var(--rot, 0deg)); }
.jd .jd-abanico .carta.jugable:active { transform: translateY(calc(var(--y, 0px) - 22px)) rotate(var(--rot, 0deg)) scale(.97); }
.jd .jd-abanico .carta.apagada { filter: grayscale(.5) brightness(.6) drop-shadow(0 3px 6px rgba(0, 0, 0, .25)); }
.jd .jd-abanico .carta.jd-robada { filter: drop-shadow(0 0 0 #fff) drop-shadow(0 0 3px #fff) drop-shadow(0 0 10px rgba(135, 206, 235, 1)) drop-shadow(0 8px 12px rgba(0, 0, 0, .4)); }
.jd-abanico .carta.jd-entra { animation: jd-entra .42s cubic-bezier(.2, .8, .3, 1.1) both; animation-delay: var(--d, 0ms); }
@keyframes jd-entra { from { translate: 0 -260px; scale: .5; opacity: 0; } to { translate: 0 0; scale: 1; opacity: 1; } }
.jd-abanico .carta.jd-nueva { animation: jd-nueva .5s cubic-bezier(.2, .8, .3, 1.1) both; }
@keyframes jd-nueva { from { translate: 0 -80px; opacity: 0; } to { translate: 0 0; opacity: 1; } }
.jd-abanico .jd-tapada { position: absolute; }
/* "Esa no va": se sacude sin perder su lugar en el abanico (la de base.css pisa el giro de la carta). */
.jd-abanico .carta.sacudir { animation: jd-sacudir .4s ease; }
@keyframes jd-sacudir { 0%, 100% { translate: 0 0; } 20%, 60% { translate: -6px 0; } 40%, 80% { translate: 6px 0; } }
/* Lo que hace cada especial, escrito en la carta de la mano (para la primera vez, sin leer las reglas). */
.jd-abanico .carta[data-n="2"]::after, .jd-abanico .carta[data-p="comodin"]::after,
.jd-abanico .carta[data-n="10"]::after, .jd-abanico .carta[data-n="11"]::after, .jd-abanico .carta[data-n="12"]::after {
  position: absolute; left: 6%; bottom: 3.5%; z-index: 1; pointer-events: none;
  font-family: var(--texto); font-weight: 800; font-size: max(9px, calc(var(--carta) * .12)); line-height: 1; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap;
  background: var(--negro); color: var(--celeste); padding: .32em .5em .26em; border-radius: 999px; box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
}
.jd-abanico .carta[data-n="2"]::after { content: '+2'; }
.jd-abanico .carta[data-p="comodin"]::after { content: '+5'; }
.jd-abanico .carta[data-n="10"]::after { content: 'Palo'; }
.jd-abanico .carta[data-n="11"]::after { content: 'Saltea'; }
.jd-abanico .carta[data-n="12"]::after { content: 'Vuelta'; }
.jd.jd-dos .jd-abanico .carta[data-n="12"]::after { content: 'Saltea'; }
/* Abanico apretado: las palabras se cortarían ("PAL…"); quedan el +2 y el +5, que entran. La de más a la derecha se ve entera. */
.jd-mano.apretada .jd-abanico .carta:is([data-n="10"], [data-n="11"], [data-n="12"]):not(:last-child)::after { display: none; }

/* Vuelos y globos */
.jd-vuelos { position: absolute; inset: 0; pointer-events: none; z-index: 40; }
.jd-vuela { position: absolute; left: 0; top: 0; will-change: transform; }
.jd-vuela > .carta { --carta: 100%; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .45)); }
.jd-globo {
  position: absolute; z-index: 45; transform: translate(-50%, 0);
  padding: 7px 14px 5px; border-radius: 14px; background: var(--blanco); color: var(--negro);
  font-family: var(--titulo); font-weight: 900; font-size: 24px; line-height: 1; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .45); animation: jd-globo 1.5s cubic-bezier(.2, .9, .3, 1.2) both;
}
.jd-globo::after { content: ''; position: absolute; left: 50%; width: 12px; height: 12px; background: inherit; transform: translateX(-50%) rotate(45deg); border-radius: 2px; }
.jd-globo.abajo::after { top: -5px; }
.jd-globo.arriba { transform: translate(-50%, -100%); }
.jd-globo.arriba::after { bottom: -5px; }
.jd-globo.kraft { background: var(--kraft); color: #fff; }
.jd-globo.rojo { background: var(--rojo); color: #fff; }
.jd-globo.celeste { background: var(--celeste); color: var(--negro); }
@keyframes jd-globo { 0% { opacity: 0; scale: .4; } 12% { opacity: 1; scale: 1.12; } 22% { scale: 1; } 78% { opacity: 1; translate: 0 0; } 100% { opacity: 0; translate: 0 -12px; } }

/* Capas: elegir palo y fin de mano */
/* Por encima de los globos y las cartas que vuelan, y de borde a borde aunque la mesa sea más angosta (compu). */
.jd-capa { position: absolute; inset: 0 calc(50% - 50vw); z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(12, 9, 6, .6); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: aparecer .2s ease both; }
.jd-caja { width: 100%; max-width: 420px; max-height: 100%; overflow: auto; background: var(--papel); color: var(--tinta); border-radius: 24px; padding: 20px 18px 18px; box-shadow: 0 24px 60px rgba(0, 0, 0, .45); animation: subir .28s cubic-bezier(.2, .9, .3, 1.2) both; text-align: center; }
.jd-caja .etiqueta { justify-content: center; }
.jd-caja .titulo { font-size: 40px; margin: 6px 0 16px; }
.jd-palos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.jd-palo-btn {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px 12px; min-height: 124px;
  border-radius: 18px; border: 2px solid rgba(17, 17, 17, .1); background: var(--blanco); color: var(--tinta); cursor: pointer;
  box-shadow: 0 4px 0 rgba(17, 17, 17, .12); transition: transform .12s ease, box-shadow .12s ease; touch-action: manipulation;
}
.jd-palo-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 rgba(17, 17, 17, .12); }
.jd-palo-btn:active { transform: translateY(2px); box-shadow: none; }
.jd-palo-btn:focus-visible { outline: 3px solid var(--celeste-osc); outline-offset: 2px; }
.jd-palo-btn .ic { width: 60px; height: 60px; display: block; }
.jd-palo-btn .ic svg { width: 100%; height: 100%; }
.jd-palo-btn b { font-family: var(--titulo); font-weight: 900; text-transform: uppercase; font-size: 26px; line-height: 1; }
.jd-palo-btn small { font-size: 12px; color: var(--gris); font-weight: 600; }
.jd-palo-btn.mejor { border-color: var(--c); box-shadow: 0 4px 0 var(--c); }
.jd-palo-btn.mejor::after { content: 'El que más tenés'; position: absolute; top: -9px; left: 50%; transform: translateX(-50%); background: var(--negro); color: var(--celeste); font-size: 10px; font-weight: 800; letter-spacing: .04em; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.jd-fin-lista { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 6px; text-align: left; }
.jd-fin-lista li { display: flex; align-items: center; gap: 8px; background: var(--blanco); border-radius: 14px; padding: 8px 10px; min-height: 48px; }
.jd-fin-lista li.gano { outline: 3px solid var(--kraft); }
.jd-fin-lista .nom { flex: 1; min-width: 0; font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jd-fin-lista .nom small { color: var(--gris); font-weight: 500; }
.jd-fin-lista .jd-puntos i { border-color: var(--kraft-osc); }
.jd-fin-lista .jd-puntos i.si { background: var(--kraft-osc); border-color: var(--kraft-osc); box-shadow: none; }
.jd-fin-cartas { display: flex; align-items: center; min-width: 54px; justify-content: flex-end; }
.jd-fin-cartas .carta.micro { --carta: 22px; margin-left: -9px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .25)); }
.jd-fin-cartas .carta.micro:first-child { margin-left: 0; }
.jd-fin-cartas em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--gris); margin-left: 6px; white-space: nowrap; }
.jd-fin-nota { margin: 0; }

/* Pantallas bajas (celus chicos, 360 × 640): todo un poco más justo para que la mesa no se pise con los rivales ni con el turno. */
@media (max-height: 700px) {
  .jd-arriba { padding-top: 6px; }
  .jd-rival { padding: 6px 4px 5px; gap: 1px; }
  .jd-rival-av { margin-bottom: 1px; }
  .jd-rival-av .avatar { width: 34px; height: 34px; font-size: 19px; }
  .jd-rival-cartas { height: 20px; }
  .jd-centro { padding: 2px 10px 0; }
  .jd-tapete { min-height: 150px; }
  .jd-marca { top: 4%; font-size: 9px; }
  .jd-palo { bottom: 0; padding: 3px 12px 3px 3px; gap: 6px; }
  .jd-palo-ic { width: 24px; height: 24px; }
  .jd-palo-ic svg { width: 19px; height: 19px; }
  .jd-palo-duda { font-size: 16px; }
  .jd-palo small { font-size: 8px; }
  .jd-palo b { font-size: 16px; }
  .jd-pend { width: 46px; height: 46px; top: -12px; right: -18px; }
  .jd-pend b { font-size: 26px; }
  .jd-turno { min-height: 78px; padding-bottom: 6px; gap: 6px; }
  .jd-msg { font-size: 13px; }
  .jd-tetoca { font-size: 18px; }
  .jd-yo-cab { padding-top: 6px; min-height: 34px; }
  .jd-mano { height: calc(var(--c-mano) * 1.5 + 44px); }
}

/* Compu y pantallas grandes */
@media (min-width: 900px) {
  .jd-arriba { padding-top: 14px; }
  .jd-rival { flex-basis: 136px; padding: 11px 8px 9px; }
  .jd-rival-av .avatar { width: 52px; height: 52px; font-size: 28px; }
  .jd-rival-nom { font-size: 14px; }
  .jd-dorso.mini { width: 15px; height: 22px; margin-left: -8px; }
  .jd-tapete { width: min(100%, 680px); max-height: 400px; }
  .jd-marca { font-size: 11px; }
  .jd-msg { font-size: 16px; }
  .jd-tetoca { font-size: 22px; }
  .jd-palo b { font-size: 22px; }
  .jd-yo-nom, .jd-yo-n { font-size: 14px; }
  .jd-caja { max-width: 460px; }
}
