/* ============================================================
   LA PARED · LA MESA DE JUEGO (PARED-04A: docs/album/PARED-04A.md). Solo la carga Pared.html.
   Un partido de noche entre dos compañeros del mismo equipo. Los materiales son los del Álbum y del Canje Misterioso (la tela
   azul de la tapa, el oro de imprenta, el cartón del dorso, Anton y Barlow); lo propio de La Pared es el fútbol:
     · el MARCADOR: los dos jugadores con la camiseta del club, la pelota del lado de quien tiene el turno (rueda con el pase y
       hace la pared con la devolución) y la pared de seis ladrillos que se levanta con cada pareja;
     · la CANCHA: la línea de mitad de cancha y el círculo central, apenas, debajo de las cartas, con la luz de las torres;
     · los avisos («¡Buena pared!», «No hubo pared») se encienden en el marcador, como la pantalla de un estadio, y nunca tapan
       las cartas;
     · el FINAL: «¡GOOOL!» en oro sobre la red del arco, la pelota que entra, los dos compañeros, las seis parejas y el premio.
   Todo el movimiento responde a una jugada; con prefers-reduced-motion (o html.rm8) queda el estado, sin el viaje.
   ============================================================ */
.pw-mesa {
    --m-tela: #11265a; --m-tela-2: #0b1b45; --m-fondo: #050c22;
    --m-oro: #dcb562; --m-oro-2: #f3dc94; --m-oro-3: #fff3c4; --m-oro-v: #a8823a; --m-oro-tinta: #241904;
    --m-tinta: #ebf0fc; --m-tinta-2: #b3c1e2; --m-tinta-3: #7b8fbd;
    --m-cielo: #9cc3ff; --m-pizarra: #8ea2cc;
    --m-hilo: rgba(220, 181, 98, .36); --m-linea: rgba(151, 177, 232, .16); --m-cal: rgba(235, 240, 252, .075);
    --m-carton: linear-gradient(162deg, #1b3471 0%, #0f2254 55%, #0a1a44 100%);
    --m-bola: url("/Content/assets/ball.svg?v=6");
    --m-ease: cubic-bezier(.45, .05, .2, 1);
    --alb-fig-r: 11px;
    position: fixed; inset: 0; z-index: 95; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
    color: var(--m-tinta); font-family: var(--body);
    background:
        radial-gradient(55% 34% at 4% -4%, rgba(255, 244, 214, .13), transparent 72%),
        radial-gradient(55% 34% at 96% -4%, rgba(255, 244, 214, .13), transparent 72%),
        radial-gradient(120% 60% at 50% 115%, rgba(2, 6, 23, .95), transparent 62%),
        linear-gradient(180deg, var(--m-tela) 0%, var(--m-tela-2) 44%, var(--m-fondo) 100%);
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 18px);
    opacity: 0; pointer-events: none; transition: opacity 200ms var(--ease-out);
}
.pw-mesa.on { opacity: 1; pointer-events: auto; }
.pw-mesa:focus { outline: none; }
@media (min-width: 1024px) { .pw-mesa { --alb-fig-r: 13px; } }

/* ---------------------------------------------------------------- el marcador */
.pw-marcador { position: sticky; top: 0; z-index: 5; padding-top: env(safe-area-inset-top, 0px);
    background: linear-gradient(180deg, #07112e, #091536);
    border-bottom: 1px solid var(--m-hilo); box-shadow: 0 12px 26px -18px #000; }
.pw-marcador__in { position: relative; max-width: 760px; margin: 0 auto; display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center;
    gap: 6px; padding: 8px 10px 9px; }
.pw-mesa__btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; padding: 0; color: var(--m-tinta); font-size: 1.15rem;
    background: rgba(255, 255, 255, .06); border: 1px solid var(--m-linea); cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
    transition: background var(--mo) var(--ease-out), transform 90ms var(--ease-out); }
.pw-mesa__btn:active { transform: scale(.94); }
@media (hover: hover) { .pw-mesa__btn:hover { background: rgba(255, 255, 255, .11); } }
body.est .pw-mesa__btn:focus-visible { outline: 2px solid var(--m-oro-2); outline-offset: 2px; }

/* los dos jugadores, la pelota entre ellos y la pared debajo */
.pw-duelo { display: grid; grid-template-columns: 56px minmax(0, 1fr) 56px; grid-template-rows: 40px 18px; column-gap: 2px; row-gap: 3px; align-items: center; justify-items: center; min-width: 0; }
.pw-jug { display: contents; }
.pw-jug--yo .pw-jug__av, .pw-jug--yo .pw-jug__n { grid-column: 1; }
.pw-jug--otro .pw-jug__av, .pw-jug--otro .pw-jug__n { grid-column: 3; }
.pw-jug__av { grid-row: 1; }
.pw-jug__n { grid-row: 2; }
.pw-jug__av { position: relative; display: block; width: 40px; height: 40px; border-radius: 50%; background: #0a1735;
    box-shadow: 0 0 0 2px rgba(235, 240, 252, .14); transition: box-shadow 320ms var(--ease-out), transform 320ms var(--ease-out); }
.pw-jug__n { max-width: 58px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .72rem; font-weight: 800; line-height: 1; color: var(--m-tinta-3);
    transition: color 320ms var(--ease-out); }
.pw-duelo[data-turno="yo"] .pw-jug--yo .pw-jug__av { box-shadow: 0 0 0 2.5px var(--m-oro-2), 0 0 18px -2px rgba(243, 220, 148, .65); transform: scale(1.06); }
.pw-duelo[data-turno="yo"] .pw-jug--yo .pw-jug__n { color: var(--m-oro-2); }
.pw-duelo[data-turno="otro"] .pw-jug--otro .pw-jug__av { box-shadow: 0 0 0 2.5px var(--m-cielo), 0 0 18px -2px rgba(156, 195, 255, .6); transform: scale(1.06); }
.pw-duelo[data-turno="otro"] .pw-jug--otro .pw-jug__n { color: var(--m-cielo); }
.pw-duelo[data-turno="fin"] .pw-jug__av { box-shadow: 0 0 0 2.5px var(--m-oro-2), 0 0 16px -2px rgba(243, 220, 148, .55); }
/* la camiseta del club para los dos: son compañeros del mismo equipo */
.pw-mesa .avph--kit .kit-body { fill: #1f4fb5; }
.pw-mesa .avph--kit { background: radial-gradient(circle at 50% 30%, #17306f, #0a1735 75%); }
.pw-mesa .avph--kit .avph__mono { color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, .45); }

/* la pelota: del lado de quien tiene el turno; rueda con el pase y va y vuelve con la devolución */
.pw-pase { grid-column: 2; grid-row: 1; justify-self: stretch; position: relative; height: 22px; margin: 0 2px; }
.pw-pase__linea { position: absolute; left: 4px; right: 4px; top: 50%; height: 2px; margin-top: -1px; border-radius: 2px;
    background: repeating-linear-gradient(90deg, rgba(235, 240, 252, .26) 0 5px, transparent 5px 10px); transition: opacity 320ms; }
.pw-duelo[data-fase="segunda"][data-turno="yo"] .pw-pase__linea { background: linear-gradient(270deg, rgba(243, 220, 148, .08), var(--m-oro-2)); }
.pw-duelo[data-fase="segunda"][data-turno="otro"] .pw-pase__linea { background: linear-gradient(90deg, rgba(156, 195, 255, .08), var(--m-cielo)); }
.pw-pase__bola { position: absolute; top: 50%; left: calc(50% - 10px); width: 20px; height: 20px; margin-top: -10px; transition: left 640ms var(--m-ease), opacity 300ms; }
.pw-pase__bola i { display: block; width: 100%; height: 100%; border-radius: 50%; background: var(--m-bola) center / contain no-repeat;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .65)); transition: transform 640ms var(--m-ease); }
.pw-duelo[data-turno="yo"] .pw-pase__bola { left: 0; }
.pw-duelo[data-turno="otro"] .pw-pase__bola { left: calc(100% - 20px); }
.pw-duelo[data-turno="otro"] .pw-pase__bola i { transform: rotate(540deg); }
.pw-duelo[data-turno="quieta"] .pw-pase__bola, .pw-duelo[data-turno=""] .pw-pase__bola { opacity: .35; }
.pw-duelo.is-pared-yo .pw-pase__bola { animation: pwUnoDosYo 760ms var(--m-ease); }
.pw-duelo.is-pared-otro .pw-pase__bola { animation: pwUnoDosOtro 760ms var(--m-ease); }
@keyframes pwUnoDosYo { 0% { left: 0; } 46% { left: calc(100% - 20px); } 100% { left: 0; } }
@keyframes pwUnoDosOtro { 0% { left: calc(100% - 20px); } 46% { left: 0; } 100% { left: calc(100% - 20px); } }

/* la pared del progreso: seis ladrillos en aparejo, de abajo hacia arriba */
.pw-prog { grid-column: 2; grid-row: 2; justify-self: stretch; display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; }
.pw-ladrillos { display: grid; grid-template-columns: repeat(7, 7px); grid-template-rows: 8px 8px; gap: 2px; }
.pw-ladrillos i { border-radius: 1.5px; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(220, 181, 98, .42); transition: background 300ms, box-shadow 300ms; }
.pw-ladrillos i:nth-child(1) { grid-area: 2 / 1 / 3 / 3; } .pw-ladrillos i:nth-child(2) { grid-area: 2 / 3 / 3 / 5; } .pw-ladrillos i:nth-child(3) { grid-area: 2 / 5 / 3 / 7; }
.pw-ladrillos i:nth-child(4) { grid-area: 1 / 2 / 2 / 4; } .pw-ladrillos i:nth-child(5) { grid-area: 1 / 4 / 2 / 6; } .pw-ladrillos i:nth-child(6) { grid-area: 1 / 6 / 2 / 8; }
.pw-ladrillos i.on { background: linear-gradient(180deg, var(--m-oro-3), var(--m-oro) 70%, var(--m-oro-v)); box-shadow: 0 0 7px rgba(243, 220, 148, .45); }
.pw-ladrillos i.is-nuevo { animation: pwLadrillo 620ms var(--ease-spring) both; }
@keyframes pwLadrillo { 0% { transform: translateY(-9px) scale(.5); opacity: 0; } 60% { transform: translateY(1px) scale(1.18); opacity: 1; } 100% { transform: none; } }
.pw-prog b { font-family: var(--disp); font-weight: 400; font-size: 1.02rem; line-height: 1; letter-spacing: .02em; color: var(--m-tinta); white-space: nowrap; }

/* el aviso de la jugada se enciende en el marcador */
.pw-flash { position: absolute; left: 0; right: 0; bottom: 0; top: env(safe-area-inset-top, 0px); z-index: 6; display: grid; place-items: center; overflow: hidden;
    pointer-events: none; opacity: 0; transform: scaleY(.55); transition: opacity 160ms var(--ease-out), transform 300ms var(--ease-spring); }
.pw-flash.on { opacity: 1; transform: none; }
.pw-flash span { position: relative; font-family: var(--disp); font-weight: 400; font-size: clamp(1.7rem, 8.2vw, 2.3rem); line-height: 1; letter-spacing: .03em; }
.pw-flash--par { color: var(--m-oro-tinta); background: linear-gradient(180deg, var(--m-oro-3) 0%, var(--m-oro-2) 30%, var(--m-oro) 70%, var(--m-oro-v) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 10px 30px -10px rgba(243, 220, 148, .7); }
.pw-flash--par::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .7) 47%, transparent 62%);
    background-size: 260% 100%; background-position: 130% 0; }
.pw-flash--par.on::after { animation: pwBarrido 900ms 120ms var(--ease-out) both; }
.pw-flash--falla { color: var(--m-tinta); background: linear-gradient(180deg, #23386d, #172a58); box-shadow: inset 0 -2px 0 rgba(142, 162, 204, .5); }
.pw-flash--falla span { font-size: clamp(1.35rem, 6.4vw, 1.8rem); color: #d8e2f8; }
@keyframes pwBarrido { from { background-position: 130% 0; } to { background-position: -40% 0; } }

/* ---------------------------------------------------------------- el relato */
.pw-mesa__in { max-width: 1120px; margin: 0 auto; padding: 12px 12px 0; display: flex; flex-direction: column; gap: 10px; }
.pw-turno { display: grid; justify-items: center; gap: 5px; text-align: center; min-height: 58px; }
.pw-relato__meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px; font-size: .72rem; font-weight: 800; color: var(--m-tinta-3); }
.pw-tag { padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 800; line-height: 1.25; }
.pw-tag--mio { color: var(--m-oro-tinta); background: linear-gradient(180deg, var(--m-oro-2), var(--m-oro)); box-shadow: 0 4px 12px -6px rgba(243, 220, 148, .8); }
.pw-tag--otro { color: #0a1a44; background: var(--m-cielo); }
.pw-tag--pausa, .pw-tag--cerrada { color: var(--m-tinta-2); background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px var(--m-linea); }
.pw-relato__vuelta { display: inline-flex; align-items: center; gap: 4px; color: var(--m-oro-2); }
.pw-turno__t { font-family: var(--disp); font-weight: 400; font-size: clamp(1.5rem, 6.8vw, 2.15rem); line-height: 1.02; letter-spacing: .01em; color: var(--m-tinta); text-wrap: balance; }
.pw-turno[data-k="mio"] .pw-turno__t { color: var(--m-oro-2); text-shadow: 0 0 22px rgba(243, 220, 148, .25); }
.pw-turno[data-k="cerrada"] .pw-turno__t { color: #dfe6f7; }
.pw-turno__s { max-width: 46ch; font-size: .9rem; line-height: 1.38; color: var(--m-tinta-2); text-wrap: pretty; }
.pw-turno__s b { color: var(--m-tinta); font-weight: 800; }
.pw-turno__vence { color: var(--m-tinta-3); white-space: nowrap; }
.pw-turno.is-cambia .pw-turno__t { animation: pwRelato 340ms var(--ease-out) both; }
@keyframes pwRelato { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.pw-turno__err { margin: 0 auto; max-width: 520px; padding: 8px 12px; border-radius: 12px; font-size: .84rem; font-weight: 700; text-align: center;
    color: #ffd8df; background: rgba(255, 93, 119, .12); border: 1px solid rgba(255, 93, 119, .36); }

/* la última jugada: las cartas en miniatura y «Ver dónde estaban» */
.pw-ult { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 520px; margin: 0 auto; padding: 7px 7px 7px 12px; border-radius: 16px;
    background: linear-gradient(160deg, rgba(23, 46, 104, .7), rgba(10, 24, 62, .7)); box-shadow: inset 0 0 0 1px var(--m-linea); }
.pw-ult__minis { display: flex; flex: 0 0 auto; padding-left: 6px; }
.pw-mini { position: relative; display: block; width: 30px; aspect-ratio: 3 / 4; margin-left: -6px; border-radius: 4px; overflow: hidden;
    box-shadow: 0 0 0 1px rgba(220, 181, 98, .5), -3px 0 6px -3px #000; }
.pw-mini > .fig { width: 100% !important; height: 100% !important; min-width: 0 !important; border-radius: 4px !important; pointer-events: none; }
.pw-mini .fig__plate, .pw-mini .fig__serie, .pw-mini .fig__pos, .pw-mini .fig__crest, .pw-mini .fig__dup, .pw-mini .fig__new, .pw-mini .fig__ph-n { display: none !important; }
/* PARED-06G: en La Pared el frente visible es solo la figurita; el escudo institucional no se estampa encima
   (la identidad del club vive en el dorso de las cartas). Cubre el tablero (1.0 y 2.0) y las parejas del final. */
.pw-tablero .fig__crest, .pw-fin__pares .fig__crest { display: none !important; }
.pw-ult__tx { display: grid; gap: 1px; flex: 1 1 auto; min-width: 0; }
.pw-ult__k { font-size: .66rem; font-weight: 800; letter-spacing: .03em; color: var(--m-tinta-3); }
.pw-ult__tx b { font-size: .92rem; font-weight: 800; color: var(--m-tinta); }
.pw-ult__d { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .74rem; color: var(--m-tinta-2); }
.pw-ult__ver { flex: 0 0 auto; min-height: 44px; padding: 0 14px; border-radius: 999px; font: 800 .78rem/1 var(--body); color: var(--m-tinta); white-space: nowrap; cursor: pointer;
    background: rgba(255, 255, 255, .07); border: 1px solid rgba(220, 181, 98, .45); -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.pw-ult__ver:active { transform: scale(.96); }
body.est .pw-ult__ver:focus-visible { outline: 2px solid var(--m-oro-2); outline-offset: 2px; }

/* ---------------------------------------------------------------- la cancha */
.pw-cancha { position: relative; padding: 8px 0 6px; }
/* la línea de mitad de cancha y el círculo central, en cal muy gastada, debajo de las cartas */
.pw-cancha::before { content: ""; position: absolute; left: -12px; right: -12px; top: 0; bottom: 0; z-index: 0; pointer-events: none;
    background:
        radial-gradient(circle at 50% 50%, transparent 0 63px, var(--m-cal) 63px 65px, transparent 65px),
        radial-gradient(circle at 50% 50%, var(--m-cal) 0 3px, transparent 3.5px),
        linear-gradient(180deg, transparent calc(50% - 1px), var(--m-cal) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
        repeating-linear-gradient(180deg, rgba(255, 255, 255, .016) 0 56px, transparent 56px 112px); }
@media (min-width: 640px) { .pw-cancha::before { left: 0; right: 0; border-radius: 22px; box-shadow: inset 0 0 0 2px var(--m-cal); } }

.pw-tablero { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 8px; width: 100%; max-width: 440px; margin: 0 auto; }
@media (min-width: 640px) { .pw-tablero { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 640px; gap: 18px 14px; padding: 10px; } }
@media (min-width: 1024px) { .pw-tablero { grid-template-columns: repeat(6, minmax(0, 1fr)); max-width: 1100px; gap: 22px 16px; padding: 14px 18px; } }

/* ---------------------------------------------------------------- la carta */
.pw-carta { position: relative; isolation: isolate; display: block; width: 100%; aspect-ratio: 3 / 4; padding: 0; border: 0; background: none; color: inherit; font: inherit;
    border-radius: var(--alb-fig-r); container-type: inline-size; cursor: default; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
    transition: transform 240ms var(--ease-out); }
/* la sombra en el pasto: se aleja cuando la carta se levanta */
.pw-carta::after { content: ""; position: absolute; left: 9%; right: 9%; bottom: -8px; height: 16px; z-index: -1; border-radius: 50%; pointer-events: none;
    background: radial-gradient(closest-side, rgba(0, 0, 0, .62), transparent); transition: transform 240ms var(--ease-out), opacity 240ms; }
.pw-tablero .pw-carta .alb-card3d { width: 100% !important; height: 100%; display: block; aspect-ratio: auto; cursor: inherit; perspective: 900px; }
.pw-tablero .pw-carta .alb-card3d__inner { display: block; height: 100%; transition: transform 520ms var(--ease-spring); }
.pw-tablero .alb-card3d__back, .pw-tablero .alb-card3d__front { border-radius: var(--alb-fig-r); box-shadow: 0 12px 20px -12px rgba(0, 0, 0, .9); }
/* PARED-06J · Safari/WebKit: cada cara con su transform 3D EXPLÍCITO y separación en Z. Con las caras coplanares (el dorso
   sin transform propio), WebKit pintaba el dorso aplanado SOBRE el frente revelado (el escudo grande y «LA PARED» espejados
   tapando la foto y el nombre) e ignoraba su backface-visibility. Con rotateY explícito + translateZ(1px), cada cara queda
   orientada dentro del contexto 3D y el culling funciona. 1px con perspectiva de 900px agranda ×1,001: imperceptible; en
   Chrome no cambia nada (verificado en el repro de tools/Pared06J con WebKit 18.2 real y Chrome). */
.pw-tablero .alb-card3d__back { transform: rotateY(0deg) translateZ(1px); }
.pw-tablero .alb-card3d__front { transform: rotateY(180deg) translateZ(1px); }
/* el dorso: el cartón azul del Canje con su filete de oro y el escudo con cinta; abajo, el nombre del juego */
.pw-tablero .alb-card3d__back { background: var(--m-carton) !important; border: 0 !important;
    box-shadow: inset 0 0 0 1.5px var(--m-oro), inset 0 0 0 4px rgba(11, 27, 69, .92), inset 0 0 0 5px rgba(220, 181, 98, .3), 0 12px 20px -12px rgba(0, 0, 0, .9); }
.pw-tablero .alb-back__pat { opacity: .5 !important; }
.pw-tablero .alb-back__frame { border-color: transparent !important; box-shadow: none !important; }
.pw-tablero .alb-back__crest { position: relative; z-index: 1; width: 54%; height: auto; aspect-ratio: 1; margin-top: -10%; }
.pw-tablero .alb-card3d__back::after { content: "La Pared"; position: absolute; left: 0; right: 0; bottom: 9%; z-index: 1; text-align: center;
    font: 400 clamp(8px, 8.4cqw, 13px)/1 var(--disp); letter-spacing: .14em; text-transform: uppercase; color: var(--m-oro-2); opacity: .85; text-shadow: 0 1px 0 rgba(0, 0, 0, .5); }
.pw-tablero .alb-card3d__front .alb-card3d__sheen, .pw-tablero .alb-stamp { display: none; }

/* la figurita en carta chica. La pieza del Álbum ya resuelve las de menos de 90 px (dos renglones con …); entre 91 y 179 px
   la ventana deja a la placa lugar para dos renglones de nombre y el número: nunca cortado a media línea */
@container (min-width: 91px) and (max-width: 179px) {
    html:root .pw-tablero .fig:not(.fig--empty) > * { --b-win: 62%; }
    html:root .pw-tablero .fig:not(.fig--empty) .fig__name { display: -webkit-box !important; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
        overflow: hidden; text-overflow: ellipsis; white-space: normal; flex: 0 0 auto; min-height: 0; font-size: max(9px, 9.2cqw); padding-right: 0; }
    html:root .pw-tablero .fig:not(.fig--empty):not(.fig--edicion) .fig__nro { font-size: max(9px, 8.6cqw); }
}

/* se puede jugar: las tapadas se ofrecen al tacto (filete encendido); esperando: quietas y en penumbra */
.pw-tablero[data-jugable="1"] .pw-carta.is-oculta { cursor: pointer; }
.pw-tablero[data-jugable="1"] .pw-carta.is-oculta .alb-card3d__back {
    box-shadow: inset 0 0 0 1.5px var(--m-oro-2), inset 0 0 0 4px rgba(11, 27, 69, .92), inset 0 0 0 5px rgba(243, 220, 148, .45), 0 0 18px -6px rgba(243, 220, 148, .55), 0 12px 20px -12px rgba(0, 0, 0, .9); }
@media (hover: hover) { .pw-tablero[data-jugable="1"] .pw-carta.is-oculta:hover { transform: translateY(-4px); } }
.pw-tablero[data-jugable="1"] .pw-carta.is-oculta:active { transform: scale(.95); }
.pw-tablero[data-jugable="0"] .pw-carta.is-oculta .alb-card3d__back { filter: brightness(.78) saturate(.75); }
body.est .pw-carta:focus-visible { outline: 2px solid var(--m-oro-2); outline-offset: 4px; }

/* el toque: la carta elegida sube mientras viaja la jugada */
.pw-carta.is-eligiendo { transform: translateY(-8px); }
.pw-carta.is-eligiendo .alb-card3d__back { box-shadow: 0 0 0 2.5px var(--m-oro-3), 0 0 26px -2px rgba(243, 220, 148, .7), 0 18px 30px -16px #000 !important; }
/* el giro: se levanta mientras da la vuelta y apoya al terminar */
.pw-carta.is-girando { transform: translateY(-10px) scale(1.04); z-index: 2; }
.pw-carta.is-girando::after, .pw-carta.is-eligiendo::after, .pw-carta.is-abierta::after { transform: scale(.82); opacity: .45; }

/* EL PASE: la carta abierta queda en el aire, señalada, con quién la dio */
.pw-carta.is-abierta { transform: translateY(-7px); z-index: 2; }
.pw-carta.is-abierta .alb-card3d__front { box-shadow: 0 0 0 2.5px #fff, 0 0 0 5px rgba(243, 220, 148, .5), 0 0 30px -4px rgba(235, 240, 252, .45), 0 18px 28px -14px #000; }
.pw-carta__chip { position: absolute; left: 50%; top: -11px; z-index: 6; display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px 3px 4px; border-radius: 999px;
    transform: translateX(-50%); white-space: nowrap; pointer-events: none; font: 800 .66rem/1.2 var(--body); color: #0b1b45; background: #fff;
    box-shadow: 0 6px 12px -6px rgba(0, 0, 0, .7); animation: pwChip 360ms var(--ease-spring) both; }
@keyframes pwChip { from { opacity: 0; transform: translate(-50%, -8px) scale(.7); } to { opacity: 1; transform: translate(-50%, 0); } }
.pw-bolita { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: var(--m-bola) center / contain no-repeat; flex: 0 0 auto; }

/* LA DEVOLUCIÓN: un instante con las dos cartas a la vista antes de la resolución */
.pw-carta.is-suspenso .alb-card3d__front { box-shadow: 0 0 0 3px rgba(255, 255, 255, .95), 0 0 34px -2px rgba(255, 255, 255, .45), 0 18px 28px -14px #000; }
.pw-carta.is-suspenso { transform: translateY(-5px) scale(1.03); }

/* EL RESULTADO: pareja → filete de oro, la medalla y un barrido de luz; sin pareja → filete pizarra, sin castigo */
.pw-carta.is-par .alb-card3d__front { box-shadow: 0 0 0 2px var(--m-oro-2), 0 0 0 4px rgba(11, 27, 69, .9), 0 0 20px -3px rgba(243, 220, 148, .55), 0 12px 20px -12px #000; }
.pw-carta__ok { position: absolute; right: -6px; top: -6px; z-index: 6; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; pointer-events: none;
    font-size: .95rem; color: var(--m-oro-tinta); background: linear-gradient(180deg, var(--m-oro-3), var(--m-oro) 70%); box-shadow: 0 0 0 2px var(--m-tela-2), 0 4px 10px -4px #000;
    animation: pwMedalla 460ms var(--ease-spring) both; }
@keyframes pwMedalla { from { opacity: 0; transform: scale(.3) rotate(-30deg); } to { opacity: 1; transform: none; } }
.pw-tablero.sin-giro .pw-carta__ok, .pw-tablero.sin-giro .pw-carta__chip { animation: none; }
.pw-carta__luz { position: absolute; inset: 0; z-index: 5; border-radius: var(--alb-fig-r); pointer-events: none; opacity: 0;
    background: linear-gradient(112deg, transparent 32%, rgba(255, 246, 214, .78) 48%, rgba(243, 220, 148, .35) 54%, transparent 66%); background-size: 280% 100%; background-position: 130% 0; }
.pw-carta.is-nueva-par { animation: pwPar 720ms var(--ease-spring); }
.pw-carta.is-nueva-par .pw-carta__luz { animation: pwBrillo 820ms 80ms var(--ease-out) both; }
@keyframes pwPar { 0% { transform: none; } 38% { transform: translateY(-8px) scale(1.07); } 100% { transform: none; } }
@keyframes pwBrillo { 0% { opacity: 1; background-position: 130% 0; } 100% { opacity: 1; background-position: -50% 0; } }
.pw-carta.is-falla .alb-card3d__front { box-shadow: 0 0 0 2.5px var(--m-pizarra), 0 0 0 5px rgba(142, 162, 204, .18), 0 12px 20px -12px #000; }
.pw-carta.is-falla .fig { filter: saturate(.8); }

/* la entrada a la mesa: las cartas se reparten una vez; cuando pasa a ser tu turno, una ola de luz recorre las tapadas */
.pw-tablero.is-reparte .pw-carta { animation: pwReparte 460ms var(--ease-out) both; animation-delay: calc(var(--i) * 30ms); }
@keyframes pwReparte { from { opacity: 0; transform: translateY(16px) scale(.94); } to { opacity: 1; transform: none; } }
.pw-tablero.is-ola .pw-carta.is-oculta .pw-carta__luz { animation: pwBrillo 700ms var(--ease-out) both; animation-delay: calc(var(--i) * 40ms); }
.pw-tablero.sin-giro .alb-card3d__inner { transition: none !important; }

/* ---------------------------------------------------------------- el final */
.pw-mesa.is-final .pw-cancha, .pw-mesa.is-final #pwMesaUlt { display: none; }
#pwMesaFin { width: 100%; }
.pw-fin { position: relative; width: 100%; max-width: 620px; margin: 0 auto; display: grid; justify-items: center; gap: 14px; text-align: center; }
/* la red del arco, de noche, con la luz de las torres detrás del grito */
.pw-fin__hero { position: relative; isolation: isolate; width: 100%; padding: 30px 14px 22px; border-radius: 24px; overflow: hidden;
    background: radial-gradient(70% 80% at 50% 38%, rgba(255, 236, 180, .2), transparent 72%), linear-gradient(170deg, #17336f 0%, #0d1f4f 60%, #081638 100%);
    box-shadow: inset 0 0 0 1px var(--m-hilo), inset 0 1px 0 rgba(255, 255, 255, .08), 0 28px 60px -30px #000; }
.pw-fin__red { position: absolute; inset: -2px; z-index: -1; opacity: .5;
    background:
        repeating-linear-gradient(45deg, rgba(235, 240, 252, .11) 0 1px, transparent 1px 15px),
        repeating-linear-gradient(-45deg, rgba(235, 240, 252, .11) 0 1px, transparent 1px 15px);
    -webkit-mask-image: radial-gradient(90% 90% at 50% 40%, #000 30%, transparent 85%); mask-image: radial-gradient(90% 90% at 50% 40%, #000 30%, transparent 85%); }
.pw-fin__gol { position: relative; display: block; font-family: var(--disp); font-weight: 400; font-size: clamp(3.6rem, 19vw, 5.6rem); line-height: .86; letter-spacing: .02em;
    background: linear-gradient(180deg, var(--m-oro-3) 0%, var(--m-oro-2) 34%, var(--m-oro) 62%, var(--m-oro-v) 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .35)) drop-shadow(0 0 24px rgba(243, 220, 148, .35)); }
.pw-fin__t { display: block; margin-top: 8px; font-family: var(--disp); font-weight: 400; font-size: clamp(1.3rem, 6.2vw, 1.75rem); line-height: 1; color: #fff; letter-spacing: .01em; }
.pw-fin__bola { position: absolute; left: 50%; top: 18px; width: 30px; height: 30px; margin-left: 70px; border-radius: 50%; opacity: 0;
    background: var(--m-bola) center / contain no-repeat; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .6)); }
.pw-fin__chispas i { position: absolute; left: 50%; top: 44%; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: var(--m-oro-2); opacity: 0; }
.pw-fin__chispas i:nth-child(1) { --a: 0deg; } .pw-fin__chispas i:nth-child(2) { --a: 45deg; } .pw-fin__chispas i:nth-child(3) { --a: 90deg; } .pw-fin__chispas i:nth-child(4) { --a: 135deg; }
.pw-fin__chispas i:nth-child(5) { --a: 180deg; } .pw-fin__chispas i:nth-child(6) { --a: 225deg; } .pw-fin__chispas i:nth-child(7) { --a: 270deg; } .pw-fin__chispas i:nth-child(8) { --a: 315deg; }

/* los dos compañeros, unidos por la pared */
.pw-fin__duo { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 2px; }
.pw-fin__av { display: block; width: 58px; height: 58px; border-radius: 50%; box-shadow: 0 0 0 2.5px var(--m-oro-2), 0 0 22px -4px rgba(243, 220, 148, .6); }
.pw-fin__lazo { position: relative; width: 72px; height: 28px; border-top: 2px dashed rgba(243, 220, 148, .7); border-radius: 50% 50% 0 0 / 100% 100% 0 0; margin-top: 18px; }
.pw-fin__lazo .pw-bolita { position: absolute; left: 50%; top: -9px; width: 18px; height: 18px; margin-left: -9px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .6)); }
.pw-fin__con { margin-top: -6px; font-size: 1.02rem; font-weight: 800; color: var(--m-tinta); }

/* las estrellas y los números del partido */
.pw-fin__marca { display: grid; justify-items: center; gap: 8px; }
.pw-fin__est { display: flex; gap: 6px; font-size: 2rem; line-height: 1; }
.pw-fin__est i { font-style: normal; color: rgba(235, 240, 252, .16); }
.pw-fin__est i.on { color: var(--m-oro-2); text-shadow: 0 0 16px rgba(243, 220, 148, .55); }
.pw-fin__datos { display: flex; gap: 8px; margin: 0; }
.pw-fin__datos div { min-width: 108px; padding: 8px 14px; border-radius: 14px; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px var(--m-linea); }
.pw-fin__datos dt { font-size: .7rem; font-weight: 800; color: var(--m-tinta-3); letter-spacing: .03em; }
.pw-fin__datos dd { margin: 2px 0 0; font-family: var(--disp); font-size: 1.45rem; line-height: 1.05; color: var(--m-tinta); }

/* las seis parejas: cada figurita con su gemela asomando detrás */
.pw-fin__pares { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 14px; width: 100%; max-width: 360px; }
@media (min-width: 640px) { .pw-fin__pares { grid-template-columns: repeat(6, minmax(0, 1fr)); max-width: 620px; gap: 14px; } }
.pw-par { position: relative; aspect-ratio: 3 / 4; }
.pw-par__gemela { position: absolute; inset: 0; border-radius: 8px; transform: rotate(-6deg) translate(-3px, -3px); background: var(--m-carton);
    box-shadow: inset 0 0 0 1.5px var(--m-oro), 0 8px 14px -8px #000; }
.pw-par__fig { position: relative; display: block; width: 100%; height: 100%; border-radius: 8px; overflow: hidden; container-type: inline-size;
    box-shadow: 0 0 0 1.5px var(--m-oro-2), 0 10px 18px -10px #000; }
.pw-par__fig > .fig { width: 100% !important; height: 100% !important; min-width: 0 !important; border-radius: 8px !important; pointer-events: none; }

/* el premio: el mini sobre del Álbum (o lo que corresponde) y su texto */
.pw-premio { width: 100%; max-width: 520px; display: grid; grid-template-columns: 64px minmax(0, 1fr); column-gap: 14px; row-gap: 12px; align-items: center; padding: 14px; border-radius: 18px;
    text-align: left; background: linear-gradient(160deg, rgba(27, 52, 113, .85), rgba(11, 27, 69, .9)); box-shadow: inset 0 0 0 1px var(--m-hilo), 0 18px 40px -26px #000; }
.pw-premio__tx { display: grid; gap: 4px; min-width: 0; }
.pw-premio__t { font-family: var(--disp); font-weight: 400; font-size: 1.28rem; line-height: 1.05; letter-spacing: .01em; color: var(--m-tinta); }
.pw-premio[data-premio="acreditado"] .pw-premio__t { color: var(--m-oro-2); }
.pw-premio__s { margin: 0; font-size: .86rem; line-height: 1.38; color: var(--m-tinta-2); }
.pw-premio__otro { margin: 2px 0 0; font-size: .78rem; color: var(--m-tinta-3); }
.pw-premio__cta { grid-column: 1 / -1; min-height: 50px; text-decoration: none; font-size: 1rem; gap: 8px; }
/* el mini sobre: la tela azul, el foil dorado, el sello del escudo */
.pw-sobre { position: relative; display: block; width: 64px; aspect-ratio: 3 / 4; border-radius: 9px; overflow: hidden;
    background: linear-gradient(168deg, #1d3a7d, #0b1a3e); box-shadow: inset 0 0 0 1px rgba(220, 181, 98, .55), 0 10px 20px -10px #000; }
.pw-sobre__foil { position: absolute; left: 0; right: 0; top: 0; height: 24%; background: linear-gradient(180deg, var(--m-oro-3), var(--m-oro) 80%); box-shadow: inset 0 -1.5px 0 rgba(0, 0, 0, .2); }
.pw-sobre__band { position: absolute; left: 0; right: 0; top: 29%; text-align: center; font: 400 .5rem/1 var(--disp); letter-spacing: .12em; text-transform: uppercase; color: var(--m-oro-2); }
.pw-sobre__sello { position: absolute; left: 50%; top: 62%; width: 46%; aspect-ratio: 1; transform: translate(-50%, -50%); }
.pw-sobre__sello img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .5)); }
.pw-sobre__estado { position: absolute; right: 3px; bottom: 3px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: .72rem;
    color: var(--m-oro-tinta); background: var(--m-oro-2); box-shadow: 0 0 0 1.5px #0b1a3e; }
.pw-sobre--listo { box-shadow: inset 0 0 0 1px rgba(220, 181, 98, .7), 0 0 22px -4px rgba(243, 220, 148, .6), 0 10px 20px -10px #000; }
.pw-sobre--pendiente { opacity: .78; box-shadow: inset 0 0 0 1px rgba(156, 195, 255, .55), 0 10px 20px -10px #000; }
.pw-sobre--pendiente .pw-sobre__estado { color: #0a1a44; background: var(--m-cielo); }
.pw-premio__tope, .pw-premio__info { display: grid; place-items: center; width: 64px; aspect-ratio: 1; border-radius: 16px; background: rgba(255, 255, 255, .05);
    box-shadow: inset 0 0 0 1px var(--m-linea); color: var(--m-tinta-2); }
.pw-premio__tope b { font-family: var(--disp); font-weight: 400; font-size: 1.35rem; line-height: 1; color: var(--m-tinta); }
.pw-premio__tope span { margin-top: -10px; font-size: .62rem; font-weight: 800; color: var(--m-tinta-3); }
.pw-premio__info .bi { font-size: 1.6rem; }
.pw-fin__acc { display: flex; justify-content: center; padding-bottom: 6px; }
.pw-fin__acc .btn8 { min-height: 46px; min-width: 200px; }

/* la llegada del final (solo al completar, no al volver a mirarla) */
@media (prefers-reduced-motion: no-preference) {
    html:not(.rm8) .pw-fin.is-llega .pw-fin__bola { animation: pwRemate 720ms cubic-bezier(.2, .7, .3, 1) both; }
    html:not(.rm8) .pw-fin.is-llega .pw-fin__red { animation: pwRed 700ms 560ms var(--ease-out) both; }
    html:not(.rm8) .pw-fin.is-llega .pw-fin__gol { animation: pwGol 640ms 520ms var(--ease-spring) both; }
    html:not(.rm8) .pw-fin.is-llega .pw-fin__t { animation: pwSube 420ms 760ms var(--ease-out) both; }
    html:not(.rm8) .pw-fin.is-llega .pw-fin__chispas i { animation: pwChispa 900ms 560ms var(--ease-out) both; }
    html:not(.rm8) .pw-fin.is-llega .pw-fin__duo, html:not(.rm8) .pw-fin.is-llega .pw-fin__con, html:not(.rm8) .pw-fin.is-llega .pw-fin__marca { animation: pwSube 460ms 900ms var(--ease-out) both; }
    html:not(.rm8) .pw-fin.is-llega .pw-par { animation: pwSube 420ms var(--ease-out) both; animation-delay: calc(1050ms + var(--i) * 70ms); }
    html:not(.rm8) .pw-fin.is-llega .pw-premio { animation: pwSube 460ms 1500ms var(--ease-out) both; }
}
@keyframes pwRemate { 0% { opacity: 0; transform: translate(-190px, 150px) scale(1.7) rotate(-220deg); } 12% { opacity: 1; } 78% { opacity: 1; transform: translate(0, 0) scale(.9) rotate(0); } 100% { opacity: 0; transform: translate(4px, -2px) scale(.7); } }
@keyframes pwRed { 0% { transform: none; opacity: .5; } 35% { transform: scale(1.06) translateY(-3px); opacity: .95; } 100% { transform: none; opacity: .5; } }
@keyframes pwGol { 0% { opacity: 0; transform: scale(.45); } 60% { opacity: 1; transform: scale(1.08); } 100% { transform: none; } }
@keyframes pwSube { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes pwChispa { 0% { opacity: 0; transform: rotate(var(--a)) translateY(0) scale(.6); } 25% { opacity: 1; } 100% { opacity: 0; transform: rotate(var(--a)) translateY(-92px) scale(1); } }

/* ---------------------------------------------------------------- movimiento reducido: el estado, sin el viaje */
@media (prefers-reduced-motion: reduce) {
    .pw-mesa, .pw-carta, .pw-carta::after, .pw-pase__bola, .pw-pase__bola i, .pw-jug__av, .pw-flash { transition: none !important; }
    .pw-carta.is-nueva-par, .pw-carta.is-nueva-par .pw-carta__luz, .pw-tablero.is-reparte .pw-carta, .pw-tablero.is-ola .pw-carta__luz,
    .pw-ladrillos i.is-nuevo, .pw-carta__ok, .pw-carta__chip, .pw-turno.is-cambia .pw-turno__t, .pw-flash--par.on::after,
    .pw-duelo.is-pared-yo .pw-pase__bola, .pw-duelo.is-pared-otro .pw-pase__bola { animation: none !important; }
    .pw-carta.is-girando, .pw-carta.is-suspenso { transform: none; }
}
html.rm8 .pw-carta, html.rm8 .pw-pase__bola, html.rm8 .pw-pase__bola i { transition: none !important; }
html.rm8 .pw-carta.is-nueva-par, html.rm8 .pw-carta.is-nueva-par .pw-carta__luz, html.rm8 .pw-tablero.is-reparte .pw-carta, html.rm8 .pw-ladrillos i.is-nuevo,
html.rm8 .pw-carta__ok, html.rm8 .pw-carta__chip, html.rm8 .pw-turno.is-cambia .pw-turno__t { animation: none !important; }

/* las iniciales sobre la camiseta: chicas, para que se lea la camiseta */
.pw-mesa .avph--kit .avph__mono { font-size: .8rem !important; letter-spacing: .02em; }
.pw-fin__av .avph--kit .avph__mono { font-size: 1.05rem !important; }
@media (min-width: 1024px) { .pw-turno__s { max-width: 62ch; } }
/* teléfonos angostos (320): el marcador se compacta para que «N de 6» no toque el nombre del compañero */
@media (max-width: 359px) {
    .pw-marcador__in { gap: 4px; padding: 7px 8px 8px; }
    .pw-duelo { grid-template-columns: 48px minmax(0, 1fr) 48px; }
    .pw-jug__n { max-width: 48px; font-size: .68rem; }
    .pw-ladrillos { grid-template-columns: repeat(7, 5px); grid-template-rows: 7px 7px; }
    .pw-prog { gap: 6px; }
    .pw-prog b { font-size: .9rem; }
}
/* en escritorio el nombre de la figurita no pasa de 14 px: siempre entra en dos renglones */
@container (min-width: 150px) and (max-width: 179px) {
    html:root .pw-tablero .fig:not(.fig--empty) .fig__name { font-size: 14px; }
}

/* ================================================================ PARED-05 · el pulido de la mesa */
/* la acción, en el marcador, cuando el relato sale de la pantalla (el turno y qué hacer siempre a la vista) */
.pw-marcador__accion { display: block; max-height: 0; overflow: hidden; padding: 0 12px; text-align: center; font: 400 .98rem/1 var(--disp); letter-spacing: .02em; white-space: nowrap; text-overflow: ellipsis;
    color: var(--m-tinta-2); transition: max-height 220ms var(--ease-out), padding 220ms var(--ease-out); }
.pw-marcador__accion[data-k="mio"] { color: var(--m-oro-2); }
.pw-mesa.is-compacta .pw-marcador__accion { max-height: 26px; padding: 0 12px 8px; }
/* el vencimiento va con las etiquetas: el subtítulo queda corto */
.pw-relato__meta .pw-turno__vence { font-weight: 700; color: var(--m-tinta-3); }
/* el recordatorio, más fino */
.pw-ult { padding: 6px 6px 6px 10px; gap: 10px; }
.pw-mini { width: 26px; }
.pw-ult__tx b { font-size: .88rem; }
.pw-ult__ver { font-size: .74rem; padding: 0 12px; }
/* la ficha de oro que vuela de la pareja a su ladrillo */
.pw-vuelo { position: fixed; z-index: 97; width: 18px; height: 12px; border-radius: 2.5px; pointer-events: none;
    background: linear-gradient(180deg, var(--m-oro-3, #fff3c4), var(--m-oro, #dcb562) 70%, #a8823a); box-shadow: 0 0 14px rgba(243, 220, 148, .8), 0 0 0 1px rgba(255, 255, 255, .5); }
/* los papelitos de oro del gol */
.pw-fin__papeles { position: absolute; inset: 0; z-index: 2; overflow: hidden; pointer-events: none; }
.pw-fin__papeles i { position: absolute; top: -14px; left: var(--x); width: 7px; height: 11px; border-radius: 1.5px; opacity: 0;
    background: linear-gradient(180deg, var(--m-oro-3), var(--m-oro)); }
.pw-fin__papeles i:nth-child(3n) { width: 9px; height: 6px; background: #fff; }
.pw-fin__papeles i:nth-child(4n) { background: linear-gradient(180deg, #9cc3ff, #3d7bff); }
@media (prefers-reduced-motion: no-preference) {
    html:not(.rm8) .pw-fin.is-llega .pw-fin__papeles i { animation: pwPapel 1.9s calc(600ms + var(--d)) cubic-bezier(.25, .6, .4, 1) both; }
}
@keyframes pwPapel { 0% { opacity: 0; transform: translateY(0) rotate(0); } 10% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; transform: translateY(250px) translateX(14px) rotate(var(--r)); } }
/* el mini sobre: un poco más grande y con el brillo del foil cuando está listo para abrir */
.pw-sobre { width: 70px; }
.pw-premio { grid-template-columns: 70px minmax(0, 1fr); }
.pw-sobre--listo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255, 250, 225, .7) 48%, transparent 64%); background-size: 260% 100%; background-position: 130% 0; }
@media (prefers-reduced-motion: no-preference) {
    html:not(.rm8) .pw-sobre--listo::after { animation: pwFoil 3.2s 1.6s ease-in-out infinite; }
}
@keyframes pwFoil { 0%, 62% { background-position: 130% 0; } 100% { background-position: -40% 0; } }
@media (prefers-reduced-motion: reduce) { .pw-marcador__accion { transition: none; } }

/* ================================================================ PARED-06D · la mesa de los desafíos (docs/album/PARED-06D.md)
   Lo que firmaron, siempre a la vista: la cancha (8, 12 o 16 cartas), una pared con un ladrillo por pareja y, debajo del
   marcador, la APUESTA (la cancha y el nivel, y los intentos como pelotas: las usadas se apagan, la que está en juego lleva un aro
   de oro). En el teléfono las canchas Corta y Larga van en cuatro columnas (dos o cuatro filas: el largo de la cancha) y la
   Clásica, como siempre, en tres; en escritorio la cancha se acuesta (dos filas de 4, 6 u 8). Los finales: la victoria es el gol
   de siempre con lo que dice el resultado; la derrota no festeja (la pelota pegó en el palo) y no muestra sobre. */

/* recién firmado el desafío, «Jugar» va en la planilla junto a «¡Desafío acordado!» (la hoja de la planilla es de 06C) */
.pl-acordado__jugar { justify-self: center; width: 100%; max-width: 320px; min-height: 50px; margin: -4px 0 10px; font-size: 1.05rem; gap: 8px; }
@media (prefers-reduced-motion: no-preference) {
    html:not(.rm8) .pl[data-sello="anim"] .pl-acordado__jugar { animation: pwSube 420ms 260ms var(--ease-out) both; }
}

/* la pared: tantas columnas como pide la cantidad de parejas (la posición de cada ladrillo la pone pared-tablero.js) */
.pw-ladrillos { grid-template-columns: repeat(var(--cols, 7), 7px); }

/* ---------------------------------------------------------------- la apuesta, debajo del marcador */
.pw-apuesta { position: relative; max-width: 760px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "tag cuenta" "bolas bolas";
    align-items: center; gap: 6px 10px; padding: 7px 14px 9px; border-top: 1px solid var(--m-linea); }
.pw-apuesta[hidden] { display: none; }
.pw-apuesta__tag { grid-area: tag; display: inline-flex; align-items: center; gap: 7px; min-width: 0; font-size: .74rem; font-weight: 800; line-height: 1.2; color: var(--m-oro-2); white-space: nowrap; }
.pw-apuesta__tag > span:last-child { overflow: hidden; text-overflow: ellipsis; }
/* la cancha dibujada, más baja que en la planilla: la franja no crece con la Larga */
.pw-apuesta .pl-mini--tag { grid-template-columns: repeat(4, 4px); grid-auto-rows: 3.5px; padding: 2px; }
.pw-apuesta__cuenta { grid-area: cuenta; font-size: .74rem; font-weight: 800; line-height: 1.2; color: var(--m-tinta-2); white-space: nowrap; }
.pw-apuesta__cuenta b { margin: 0 1px; font-family: var(--disp); font-weight: 400; font-size: 1.14rem; line-height: 1; color: #fff; vertical-align: -1px; }
.pw-bolas { grid-area: bolas; display: flex; flex-wrap: nowrap; justify-content: center; gap: 4px; min-width: 0; }
.pw-bolas i { flex: 0 0 auto; width: 13px; height: 13px; border-radius: 50%; background: var(--m-bola) center / contain no-repeat; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .6));
    transition: opacity 320ms var(--ease-out), filter 320ms var(--ease-out), box-shadow 320ms var(--ease-out); }
.pw-bolas--muchas { gap: 2.5px; }
.pw-bolas--muchas i { width: 10px; height: 10px; }
.pw-bolas i.off { opacity: .2; filter: grayscale(1); }
/* la pelota en juego: la del intento que se está jugando */
.pw-bolas i.is-juego { box-shadow: 0 0 0 1.5px var(--m-tela-2), 0 0 0 3px var(--m-oro-2), 0 0 10px rgba(243, 220, 148, .65); }
/* sin margen: cada intento tiene que ser pareja; ya imposible: la apuesta se apaga y se sigue por los puntos */
.pw-apuesta[data-estado="justo"] .pw-apuesta__cuenta, .pw-apuesta[data-estado="justo"] .pw-apuesta__cuenta b { color: var(--m-oro-2); }
.pw-apuesta[data-estado="imposible"] .pw-apuesta__tag { color: var(--m-tinta-3); }
.pw-apuesta[data-estado="imposible"] .pw-apuesta__tag .pl-mini { opacity: .55; }
.pw-apuesta[data-estado="imposible"] .pw-bolas i:not(.off) { filter: grayscale(.7) brightness(.85); }
.pw-apuesta[data-estado="imposible"] .pw-bolas i.is-juego { box-shadow: 0 0 0 1.5px var(--m-tela-2), 0 0 0 3px var(--m-pizarra); }
@media (prefers-reduced-motion: no-preference) {
    html:not(.rm8) .pw-bolas i.is-gasta { animation: pwGasta 640ms var(--m-ease) both; }
}
@keyframes pwGasta { 0% { opacity: 1; filter: none; transform: none; } 38% { opacity: 1; filter: none; transform: translateY(-7px) rotate(-220deg) scale(1.3); } 100% { opacity: .2; filter: grayscale(1); transform: none; } }
@media (min-width: 640px) {
    .pw-apuesta { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "tag bolas cuenta"; gap: 8px 16px; padding: 7px 18px 9px; }
    .pw-bolas i { width: 15px; height: 15px; }
    .pw-bolas--muchas i { width: 12px; height: 12px; }
}
@media (max-width: 359px) {
    .pw-apuesta { padding: 6px 10px 8px; gap: 5px 8px; }
    .pw-ladrillos { grid-template-columns: repeat(var(--cols, 7), 5px); }
    .pw-ladrillos[data-n="8"] { grid-template-columns: repeat(var(--cols, 9), 4px); }
}

/* ---------------------------------------------------------------- el relato: lo que falta, o que ya no se puede */
.pw-falta { padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 800; line-height: 1.25; color: var(--m-tinta); background: rgba(255, 255, 255, .06);
    box-shadow: inset 0 0 0 1px rgba(220, 181, 98, .42); }
.pw-falta--justo { color: var(--m-oro-2); box-shadow: inset 0 0 0 1.5px var(--m-oro-2); }
.pw-tag--pts { color: var(--m-oro-2); background: rgba(243, 220, 148, .1); box-shadow: inset 0 0 0 1px rgba(243, 220, 148, .4); }
.pw-imposible { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 480px; margin: 4px auto 0; padding: 9px 12px; border-radius: 14px; text-align: left;
    font-size: .84rem; line-height: 1.38; color: var(--m-tinta-2); background: rgba(142, 162, 204, .1); box-shadow: inset 0 0 0 1px rgba(142, 162, 204, .34); }
.pw-imposible b { display: block; color: var(--m-tinta); font-weight: 800; }
.pw-imposible .pw-bolita { width: 22px; height: 22px; filter: grayscale(.6) drop-shadow(0 2px 3px rgba(0, 0, 0, .5)); }
@media (prefers-reduced-motion: no-preference) {
    html:not(.rm8) .pw-imposible.is-llega { animation: pwSube 460ms var(--ease-out) both; }
}

/* ---------------------------------------------------------------- las canchas */
.pw-tablero[data-cartas="8"], .pw-tablero[data-cartas="16"] { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 7px; max-width: 420px; }
@media (max-width: 359px) {
    .pw-mesa[data-cartas="8"] .pw-mesa__in, .pw-mesa[data-cartas="16"] .pw-mesa__in { padding-left: 8px; padding-right: 8px; }
    .pw-mesa[data-cartas="8"] .pw-cancha::before, .pw-mesa[data-cartas="16"] .pw-cancha::before { left: -8px; right: -8px; }
    .pw-tablero[data-cartas="8"], .pw-tablero[data-cartas="16"] { gap: 9px 6px; }
}
@media (min-width: 640px) { .pw-tablero[data-cartas="8"], .pw-tablero[data-cartas="16"] { gap: 18px 14px; max-width: 600px; } }
@media (min-width: 1024px) {
    .pw-tablero[data-cartas="8"] { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 640px; gap: 20px 16px; }
    .pw-tablero[data-cartas="16"] { grid-template-columns: repeat(8, minmax(0, 1fr)); max-width: 1100px; gap: 20px 14px; padding: 14px 18px; }
}

/* ---------------------------------------------------------------- el final de un desafío */
.pw-fin__apuesta { position: relative; width: 100%; max-width: 520px; display: grid; justify-items: center; gap: 10px; padding: 14px 12px 14px; border-radius: 16px; text-align: center;
    background: radial-gradient(70% 90% at 50% 100%, rgba(243, 220, 148, .1), transparent 70%), rgba(4, 12, 34, .42); box-shadow: inset 0 0 0 1px rgba(220, 181, 98, .3); }
.pw-fin__tag { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px 4px 6px; border-radius: 999px; font-size: .78rem; font-weight: 800; color: var(--m-oro-2);
    background: rgba(243, 220, 148, .1); box-shadow: inset 0 0 0 1px rgba(243, 220, 148, .32); }
.pw-fin__frase { margin: 0; max-width: 24ch; font-family: var(--disp); font-weight: 400; font-size: clamp(1.25rem, 5.8vw, 1.5rem); line-height: 1.08; color: #fff; text-wrap: balance; }
.pw-fin__frase small { display: block; margin-top: 5px; font-family: var(--body); font-size: .78rem; font-weight: 700; color: var(--m-tinta-3); }
.pw-bolas--fin { grid-area: auto; flex-wrap: wrap; max-width: 300px; }
/* en la victoria las pelotas jugadas quedan encendidas y las que sobraron llevan el aro de oro; en la derrota, todas usadas */
.pw-bolas i.is-sobra { box-shadow: 0 0 0 1.5px var(--m-tela-2), 0 0 0 3px var(--m-oro-2), 0 0 10px rgba(243, 220, 148, .6); }
/* las parejas del final: 4 por fila en la Corta y la Larga (4 u 8), 3 en la Clásica */
.pw-fin__pares[data-n="4"], .pw-fin__pares[data-n="8"] { display: flex; flex-wrap: wrap; justify-content: center; max-width: 420px; gap: 14px 10px; }
.pw-fin__pares[data-n="4"] .pw-par, .pw-fin__pares[data-n="8"] .pw-par { flex: 0 0 calc((100% - 30px) / 4); }
/* el sello «Cumplido»: el mismo de la planilla firmada, ahora con el desafío cumplido */
.pw-fin__sello { position: absolute; top: -13px; right: -4px; z-index: 2; pointer-events: none; transform: rotate(-12deg); }
.pw-fin__sello span { display: block; padding: 5px 10px 4px; border-radius: 6px; font-family: var(--disp); font-weight: 400; font-size: 1.05rem; letter-spacing: .08em; line-height: 1;
    text-transform: uppercase; color: var(--m-oro-2); border: 2px solid var(--m-oro-2); background: rgba(9, 26, 66, .7);
    box-shadow: 0 0 0 2px rgba(9, 26, 66, .9), 0 0 0 3.5px rgba(243, 220, 148, .55); }
.pw-fin--v2 > .pw-fin__datos { margin-top: -2px; }

/* los puntos: el total de quien mira y de dónde sale (lo de la dupla, igual para los dos, y el bono del día, de cada uno) */
.pw-puntos { width: 100%; max-width: 520px; padding: 14px 16px 13px; border-radius: 18px; text-align: left;
    background: linear-gradient(160deg, rgba(27, 52, 113, .85), rgba(11, 27, 69, .9)); box-shadow: inset 0 0 0 1px var(--m-hilo), 0 18px 40px -26px #000; }
.pw-puntos__hd { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 9px; border-bottom: 1px solid rgba(220, 181, 98, .3); }
.pw-puntos__k { font-family: var(--disp); font-weight: 400; font-size: 1.3rem; line-height: 1; color: var(--m-tinta); }
.pw-puntos__total { font-size: .9rem; font-weight: 800; color: var(--m-oro-2); white-space: nowrap; }
.pw-puntos__total b { font-family: var(--disp); font-weight: 400; font-size: 2.2rem; line-height: .9; color: var(--m-oro-2); }
.pw-puntos__d { list-style: none; margin: 9px 0 0; padding: 0; display: grid; gap: 6px; }
.pw-puntos__d li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-left: 12px; font-size: .86rem; line-height: 1.3; color: var(--m-tinta-2); }
.pw-puntos__d li b { flex: 0 0 auto; font-weight: 800; color: var(--m-tinta); font-variant-numeric: tabular-nums; }
.pw-puntos__d li.pw-puntos__sub { padding-left: 0; font-weight: 800; color: var(--m-tinta); }
.pw-puntos__d li + li.pw-puntos__sub { margin-top: 5px; padding-top: 8px; border-top: 1px dashed rgba(151, 177, 232, .2); }
.pw-puntos__d small { display: block; margin-top: 1px; font-size: .72rem; font-weight: 700; color: var(--m-tinta-3); }
.pw-puntos__bono b { color: var(--m-oro-2) !important; }
.pw-puntos__nota b { color: var(--m-tinta-3) !important; }

/* los botones del final: uno al lado del otro si entran; si no, uno debajo del otro */
.pw-fin__acc { flex-wrap: wrap; gap: 10px; width: 100%; max-width: 520px; }
.pw-fin--v2 .pw-fin__acc .btn8 { flex: 1 1 200px; min-width: 0; gap: 8px; }

/* LA DERROTA: de noche y sin oro. El arco, la pelota que pegó en el palo y quedó afuera; ni papelitos ni sobre */
.pw-fin__hero--palo { padding: 24px 16px 22px;
    background: radial-gradient(70% 80% at 50% 26%, rgba(156, 195, 255, .12), transparent 72%), linear-gradient(170deg, #142a5c 0%, #0c1c45 60%, #081433 100%); }
.pw-fin__hero--palo .pw-fin__red { opacity: .22; }
.pw-fin__arco { position: relative; display: block; width: 132px; height: 60px; margin: 2px auto 16px; border: 5px solid #e6ecf9; border-bottom: 0; border-radius: 4px 4px 0 0;
    background:
        repeating-linear-gradient(45deg, rgba(235, 240, 252, .14) 0 1px, transparent 1px 9px),
        repeating-linear-gradient(-45deg, rgba(235, 240, 252, .14) 0 1px, transparent 1px 9px);
    box-shadow: 0 6px 14px -8px #000; }
/* el pasto: la línea de cal del arco, más ancha que los palos */
.pw-fin__arco::after { content: ""; position: absolute; left: -46px; right: -26px; bottom: -2px; height: 2px; border-radius: 2px; background: rgba(235, 240, 252, .3); }
/* el golpe en el palo izquierdo: dos rayitas */
.pw-fin__palo { position: absolute; left: -17px; top: 8px; width: 10px; height: 18px; }
.pw-fin__palo::before, .pw-fin__palo::after { content: ""; position: absolute; right: 0; height: 2px; border-radius: 2px; background: rgba(235, 240, 252, .55); }
.pw-fin__palo::before { top: 2px; width: 9px; transform: rotate(-24deg); }
.pw-fin__palo::after { top: 12px; width: 9px; transform: rotate(24deg); }
.pw-fin__pelota { position: absolute; left: -42px; bottom: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--m-bola) center / contain no-repeat;
    filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .6)); }
.pw-fin__no { display: block; font-family: var(--disp); font-weight: 400; font-size: clamp(1.85rem, 8.6vw, 2.5rem); line-height: .98; letter-spacing: .01em; color: #fff; text-wrap: balance; }
.pw-fin__t2 { display: block; max-width: 36ch; margin: 9px auto 0; font-size: .9rem; line-height: 1.38; color: var(--m-tinta-2); text-wrap: balance; }
.pw-fin--derrota .pw-fin__av { box-shadow: 0 0 0 2.5px rgba(179, 193, 226, .75), 0 0 18px -6px rgba(156, 195, 255, .4); }
.pw-fin--derrota .pw-fin__lazo { border-top-color: rgba(179, 193, 226, .6); }
.pw-fin--derrota .pw-fin__apuesta { background: rgba(4, 12, 34, .42); box-shadow: inset 0 0 0 1px rgba(142, 162, 204, .3); }
.pw-fin--derrota .pw-fin__tag { color: var(--m-tinta-2); background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(142, 162, 204, .32); }
.pw-fin--derrota .pw-puntos { box-shadow: inset 0 0 0 1px rgba(142, 162, 204, .3), 0 18px 40px -26px #000; }
.pw-fin--derrota .pw-puntos__total, .pw-fin--derrota .pw-puntos__total b { color: #fff; }
.pw-fin--derrota .pw-par__fig { box-shadow: 0 0 0 1.5px rgba(179, 193, 226, .7), 0 10px 18px -10px #000; }
.pw-fin__sin { margin: -2px 0 0; max-width: 40ch; font-size: .84rem; line-height: 1.4; color: var(--m-tinta-2); }

/* las llegadas (solo al terminar en vivo, nunca al volver a mirarlo) */
@media (prefers-reduced-motion: no-preference) {
    html:not(.rm8) .pw-fin.is-llega .pw-fin__apuesta, html:not(.rm8) .pw-fin--v2.is-llega > .pw-fin__datos { animation: pwSube 460ms 1000ms var(--ease-out) both; }
    html:not(.rm8) .pw-fin.is-llega .pw-fin__sello { animation: pwSello 520ms 1350ms cubic-bezier(.2, 1.6, .4, 1) both; }
    html:not(.rm8) .pw-fin.is-llega .pw-puntos { animation: pwSube 460ms 1250ms var(--ease-out) both; }
    html:not(.rm8) .pw-fin--derrota.is-llega .pw-fin__pelota { animation: pwPalo 1100ms cubic-bezier(.3, .6, .4, 1) both; }
    html:not(.rm8) .pw-fin--derrota.is-llega .pw-fin__palo { animation: pwGolpe 500ms 380ms var(--ease-out) both; }
    html:not(.rm8) .pw-fin--derrota.is-llega .pw-fin__no { animation: pwSube 460ms 700ms var(--ease-out) both; }
    html:not(.rm8) .pw-fin--derrota.is-llega .pw-fin__t2 { animation: pwSube 420ms 860ms var(--ease-out) both; }
    html:not(.rm8) .pw-fin--derrota.is-llega .pw-puntos { animation-delay: 1150ms; }
    html:not(.rm8) .pw-fin--derrota.is-llega .pw-fin__apuesta, html:not(.rm8) .pw-fin--derrota.is-llega > .pw-fin__datos { animation-delay: 950ms; }
}
@keyframes pwSello { 0% { opacity: 0; transform: rotate(-26deg) scale(1.9); } 60% { opacity: 1; } 100% { opacity: 1; transform: rotate(-12deg) scale(1); } }
/* la pelota llega desde la izquierda, pega en el palo (a media altura) y cae afuera, con un pique */
@keyframes pwPalo {
    0% { opacity: 0; transform: translate(-70px, -46px) rotate(-200deg); }
    12% { opacity: 1; }
    38% { transform: translate(22px, -30px) rotate(0deg); }
    66% { transform: translate(0, 0) rotate(120deg); }
    80% { transform: translate(-3px, -8px) rotate(150deg); }
    100% { opacity: 1; transform: none; }
}
@keyframes pwGolpe { 0% { opacity: 0; transform: scale(.4); } 40% { opacity: 1; transform: scale(1.15); } 100% { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
    .pw-bolas i { transition: none !important; }
}

/* ================================================================ PARED-06L · animaciones premium (referencias en docs/album/PARED-06L.md)
   Principio (restraint, GameAnalytics/juice): sumar donde el momento estaba PLANO, no en cada toque. Todo transform/opacity. */
/* 1. La carta del pase, esperando su pareja: respira en oro (tensión suave, nunca molesta; patrón «highlight before resolution») */
html:not(.rm8) .pw-tablero[data-jugable] .pw-carta.is-abierta .alb-card3d__front { animation: pwEspera 2.3s 600ms ease-in-out infinite alternate; }
@keyframes pwEspera {
    from { box-shadow: 0 0 0 2.5px #fff, 0 0 0 5px rgba(243, 220, 148, .5), 0 0 30px -4px rgba(235, 240, 252, .45), 0 18px 28px -14px #000; }
    to { box-shadow: 0 0 0 2.5px #fff, 0 0 0 6px rgba(243, 220, 148, .78), 0 0 40px -2px rgba(243, 220, 148, .5), 0 18px 28px -14px #000; }
}
/* 2. Pareja encontrada: además del salto (pwPar) y el barrido de luz, un ANILLO de oro que se expande desde la carta
      (celebración breve que no tapa nada) y las dos se buscan (nudge mutuo via pwPar ya existente) */
.pw-carta.is-nueva-par::before { content: ""; position: absolute; inset: -4px; z-index: 3; border-radius: calc(var(--alb-fig-r) + 4px);
    pointer-events: none; border: 2.5px solid rgba(243, 220, 148, .9); opacity: 0; }
html:not(.rm8) .pw-carta.is-nueva-par::before { animation: pwAnillo 760ms 60ms var(--ease-out) both; }
@keyframes pwAnillo { 0% { opacity: .95; transform: scale(.94); } 70% { opacity: .35; } 100% { opacity: 0; transform: scale(1.18); } }
/* 3. No hubo pared: un cabeceo corto y sobrio antes del giro de vuelta (sin castigo visual) */
html:not(.rm8) .pw-carta.is-falla { animation: pwNiega 340ms ease-in-out 1; }
@keyframes pwNiega { 0% { transform: rotate(0); } 28% { transform: rotate(-1.4deg) translateX(-2px); } 62% { transform: rotate(1.2deg) translateX(2px); } 100% { transform: rotate(0); } }
/* 4. Último intento del desafío: la pelota en juego late y la apuesta se enciende (tensión sin bloquear nada) */
.pw-apuesta[data-ultimo="1"] { box-shadow: inset 0 0 0 1px rgba(243, 220, 148, .55); }
html:not(.rm8) .pw-apuesta[data-ultimo="1"] .pw-bolas i.is-juego { animation: pwLate 1.1s ease-in-out infinite; }
@keyframes pwLate { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.22); filter: brightness(1.25); } }
/* 5. El premio escalado (PARED-06H): 2 o 3 mini sobres en abanico detrás del primero (la pila envuelve al sobre,
      que recorta su propio contenido con overflow) */
.pw-premio__pila { position: relative; display: inline-block; }
.pw-premio__pila::before, .pw-premio__pila[data-n="3"]::after {
    content: ""; position: absolute; inset: 0; z-index: 0; border-radius: 9px;
    background: linear-gradient(165deg, #2a4c9c, #142c6a 60%, #0d1f4e); box-shadow: inset 0 0 0 1px rgba(233, 197, 108, .45), 0 6px 12px -6px #000; }
.pw-premio__pila[data-n="1"]::before { content: none; }
.pw-premio__pila[data-n="2"]::before { transform: rotate(-7deg) translate(-7px, 3px); }
.pw-premio__pila[data-n="3"]::before { transform: rotate(-8deg) translate(-8px, 3px); }
.pw-premio__pila[data-n="3"]::after { transform: rotate(7deg) translate(8px, 4px); }
.pw-premio__pila .pw-sobre { position: relative; z-index: 1; }
/* 6. El cambio a «tu turno» en el marcador: la camiseta llega con un pulso suave (la ola de las cartas ya existe) */
.pw-jug__av { transition: transform 320ms var(--ease-spring), box-shadow 320ms var(--m-ease); }
