.jungle-hunt-panel {
    margin-top: 12px;
    padding: 14px;
    border: 1px solid #727b43;
    border-radius: 12px;
    background: radial-gradient(ellipse at top left, #254234 0%, #101d18 72%);
    color: #f3edda;
}
.jungle-hunt-panel[hidden] { display: none; }
.jungle-hunt-heading { display: flex; align-items: center; gap: 12px; }
.jungle-hunt-heading strong { display: block; color: #eed59a; font-size: 1rem; }
.jungle-hunt-heading small { color: #c3cebd; }
.jungle-hunt-die { font-size: 2.9rem; line-height: 1; color: #ead19a; }
.jungle-hunt-rule { margin: 12px 0; font-size: .85rem; line-height: 1.45; }
.jungle-hunt-panel button { width: 100%; }
.jungle-hunt-note { display: block; margin-top: 8px; color: #bdc9b5; font-size: .76rem; line-height: 1.4; }
.jungle-hunt-result { margin: 10px 0 0; padding-top: 9px; border-top: 1px solid #607344; font-size: .82rem; line-height: 1.45; }
.jungle-hunt-dialog { width: min(1000px, 96vw); max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; }
.jungle-hunt-dialog .choice-modal-head, .jungle-hunt-dialog > .jungle-hunt-rule, .jungle-hunt-footer { flex-shrink: 0; }
.jungle-hunt-dialog .jungle-hunt-rule { padding: 10px 14px; border: 1px solid #727b43; border-radius: 8px; background: #172a20; }
.jungle-hunt-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; padding: 8px; min-height: 0; overflow-y: auto; }
.jungle-hunt-choice { min-width: 0; padding: 8px; border: 2px solid transparent; border-radius: 12px; background: #17231e; color: #eee4c8; }
.jungle-hunt-choice[aria-pressed="true"] { border-color: #f0cd7f; background: #304b2e; box-shadow: 0 0 0 2px #be9f4a55; }
.jungle-hunt-choice:focus-visible { outline: 3px solid #f0cd7f; outline-offset: 3px; }
.jungle-hunt-choice .choice-target-card-detail { pointer-events: none; }
.jungle-hunt-choice .choice-target-line { padding: 8px 0; }
.jungle-hunt-footer { position: sticky; bottom: 0; padding: 14px; background: #111c17; border-top: 1px solid #727b43; }
.jungle-hunt-preview { margin: 0 0 10px; line-height: 1.5; }
.jungle-hunt-footer button { width: 100%; }
@media (max-width: 500px) {
    .jungle-hunt-options { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 4px; }
    .jungle-hunt-choice { padding: 4px; }
    .jungle-hunt-dialog { width: 96vw; }
}

/* --- Monstruo de Jungla en el tablero: patrulla la franja entre ambos campos. ---
   Solo transform/opacity en CSS (sin temporizadores JS). Se pausa con modales,
   al pasar el cursor, al arrastrar cartas y con movimiento reducido. */
.field-row.has-jungle-monster { position: relative; }
.jungle-monster-lane {
    --jm-h: clamp(64px, 12vh, 118px);
    --jm-w: calc(var(--jm-h) * 552 / 324);
    --jm-cycle: 34s;
    position: absolute;
    inset-inline: 10px;
    top: 50%;
    height: var(--jm-h);
    margin-top: calc(var(--jm-h) / -2);
    z-index: 6;
    pointer-events: none;
}
.jungle-monster-lane[hidden] { display: none; }
.jungle-monster-walker {
    position: absolute;
    inset: 0;
    animation: jungle-monster-patrol var(--jm-cycle) linear infinite;
    will-change: transform;
}
.jungle-monster-sprite {
    position: absolute;
    left: 0;
    top: 0;
    width: var(--jm-w);
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 40%;
    background: transparent;
    box-shadow: none;
    cursor: default;
    pointer-events: auto;
    transition: opacity .6s ease, filter .2s ease;
}
.jungle-monster-sprite:hover, .jungle-monster-sprite:active { background: transparent; transform: none; }
.jungle-monster-lane.is-huntable .jungle-monster-sprite { cursor: pointer; filter: drop-shadow(0 0 7px rgba(240, 205, 127, .55)); }
.jungle-monster-lane.is-huntable .jungle-monster-sprite:hover { filter: drop-shadow(0 0 12px rgba(240, 205, 127, .9)); }
.jungle-monster-sprite:focus-visible { outline: 3px solid #f0cd7f; outline-offset: 2px; }
.jungle-monster-facing {
    position: absolute;
    inset: 0;
    display: block;
    animation: jungle-monster-facing var(--jm-cycle) step-end infinite;
}
.jungle-monster-pose {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
    opacity: 0;
    pointer-events: none;
    user-select: none;
}
.jungle-monster-pose[data-pose="embestida"] { animation: jungle-monster-walk-pose var(--jm-cycle) step-end infinite; }
.jungle-monster-pose[data-pose="reposo"] { animation: jungle-monster-rest-pose var(--jm-cycle) step-end infinite; }
.jungle-monster-shadow {
    position: absolute;
    left: 18%;
    right: 30%;
    bottom: 1%;
    height: 10%;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, 0) 70%);
    pointer-events: none;
}

/* Rugido mientras la ventana de Cacería está abierta; ataque al resolverse. */
.jungle-monster-lane.is-roaring .jungle-monster-pose,
.jungle-monster-lane.is-attacking .jungle-monster-pose { opacity: 0 !important; }
.jungle-monster-lane.is-roaring .jungle-monster-pose[data-pose="rugido"],
.jungle-monster-lane.is-attacking .jungle-monster-pose[data-pose="ataque"] { opacity: 1 !important; }
.jungle-monster-lane.is-defeated .jungle-monster-sprite { opacity: 0; pointer-events: none; }

.jungle-monster-lane.is-roaring :is(.jungle-monster-walker, .jungle-monster-facing, .jungle-monster-pose),
.jungle-monster-lane.is-attacking :is(.jungle-monster-walker, .jungle-monster-facing, .jungle-monster-pose),
.jungle-monster-lane:has(.jungle-monster-sprite:hover) :is(.jungle-monster-walker, .jungle-monster-facing, .jungle-monster-pose),
.jungle-monster-lane:has(.jungle-monster-sprite:focus-visible) :is(.jungle-monster-walker, .jungle-monster-facing, .jungle-monster-pose),
body:has(.modal-overlay) .jungle-monster-lane :is(.jungle-monster-walker, .jungle-monster-facing, .jungle-monster-pose) {
    animation-play-state: paused;
}
body.dragging-card .jungle-monster-lane { opacity: .3; }
body.dragging-card .jungle-monster-sprite { pointer-events: none; }

@keyframes jungle-monster-patrol {
    0%, 6% { transform: translateX(0); }
    44%, 56% { transform: translateX(calc(100% - var(--jm-w))); }
    94%, 100% { transform: translateX(0); }
}
@keyframes jungle-monster-facing {
    0% { transform: scaleX(1); }
    50% { transform: scaleX(-1); }
    100% { transform: scaleX(-1); }
}
@keyframes jungle-monster-walk-pose {
    0% { opacity: 0; } 6% { opacity: 1; } 44% { opacity: 0; } 56% { opacity: 1; } 94% { opacity: 0; } 100% { opacity: 0; }
}
@keyframes jungle-monster-rest-pose {
    0% { opacity: 1; } 6% { opacity: 0; } 44% { opacity: 1; } 56% { opacity: 0; } 94% { opacity: 1; } 100% { opacity: 1; }
}

@media (max-width: 700px) {
    .jungle-monster-lane { --jm-h: clamp(48px, 9vh, 82px); --jm-cycle: 26s; inset-inline: 4px; }
}
@media (prefers-reduced-motion: reduce) {
    .jungle-monster-walker { animation: none; transform: translateX(calc(28% - var(--jm-w) / 2)); }
    .jungle-monster-facing, .jungle-monster-pose { animation: none !important; }
    .jungle-monster-pose[data-pose="reposo"] { opacity: 1; }
}

/* --- Ventana: pregunta → dado → cazadores. --- */
.jungle-hunt-dialog[data-stage="ask"], .jungle-hunt-dialog[data-stage="roll"] { width: min(540px, 94vw); }
.jungle-hunt-stage { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; padding: 4px 14px 10px; }
.jungle-hunt-dialog[data-stage="select"] .jungle-hunt-stage { padding: 0; }
.jungle-hunt-question { margin: 6px 0 0; font-size: 1.35rem; font-weight: 700; color: #eed59a; text-align: center; }
.jungle-hunt-dice-stage { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 8px 0 2px; text-align: center; }
.jungle-hunt-roll-die { display: inline-block; font-size: 5.2rem; line-height: 1; color: #f2dca5; text-shadow: 0 0 18px rgba(240, 205, 127, .45); }
.jungle-hunt-roll-die.is-rolling { animation: jungle-hunt-die-tumble .34s linear infinite; }
.jungle-hunt-roll-die.is-landed { animation: jungle-hunt-die-land .45s ease-out; }
.jungle-hunt-roll-info { width: 100%; }
.jungle-hunt-roll-info strong { display: block; font-size: 1.15rem; color: #eed59a; }
.jungle-hunt-warning { margin: 6px 0 0; padding: 10px 12px; border: 1px solid #a15b3d; border-radius: 8px; background: #3a1d14; color: #f6d7c6; font-size: .86rem; line-height: 1.45; }
.jungle-hunt-footer { display: flex; flex-wrap: wrap; gap: 10px; }
.jungle-hunt-footer > .jungle-hunt-preview { flex: 1 1 100%; }
.jungle-hunt-footer > button { flex: 1 1 0; }
/* Botones con colores distintos: avanzar (dorado) y no cazar / renunciar (rojizo). */
.jungle-hunt-dialog .jungle-hunt-footer button.jungle-hunt-btn-confirm {
    border: 1px solid #f3d58b;
    background: linear-gradient(180deg, #e6c069, #b8862e);
    color: #2a1904;
    font-weight: 800;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .3);
}
.jungle-hunt-dialog .jungle-hunt-footer button.jungle-hunt-btn-confirm:hover:not(:disabled) { filter: brightness(1.08); }
.jungle-hunt-dialog .jungle-hunt-footer button.jungle-hunt-btn-confirm:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.jungle-hunt-dialog .jungle-hunt-footer button.jungle-hunt-btn-decline {
    border: 1px solid #b4533c;
    background: linear-gradient(180deg, #5a2219, #3a150f);
    color: #ffd9cc;
    font-weight: 700;
}
.jungle-hunt-dialog .jungle-hunt-footer button.jungle-hunt-btn-decline:hover:not(:disabled) { background: linear-gradient(180deg, #6e2a1f, #461a12); }
/* Segundo clic para renunciar: rojo más intenso para que se note que se pierde la Cacería. */
.jungle-hunt-dialog .jungle-hunt-footer button.jungle-hunt-btn-decline.is-armed {
    border-color: #ff8a70;
    background: linear-gradient(180deg, #b3321f, #7d1f12);
    color: #fff;
    box-shadow: 0 0 0 2px rgba(255, 120, 90, .3);
}
.jungle-hunt-dialog .jungle-hunt-footer button:focus-visible { outline: 3px solid #f0cd7f; outline-offset: 2px; }
/* Elección obligatoria tras lanzar: el dado queda visible arriba de los cazadores. */
.jungle-hunt-select-head { display: flex; align-items: center; gap: 14px; padding: 10px 14px 4px; }
.jungle-hunt-roll-die.is-small { font-size: 3rem; flex-shrink: 0; }
.jungle-hunt-dialog[data-stage="select"] .jungle-hunt-warning { margin: 4px 14px; }
@media (max-width: 640px) {
    .jungle-hunt-select-head { gap: 10px; padding: 8px 10px 2px; }
    .jungle-hunt-roll-die.is-small { font-size: 2.4rem; }
}
@keyframes jungle-hunt-die-tumble {
    0% { transform: rotate(0deg) translateY(0); }
    25% { transform: rotate(90deg) translateY(-6px); }
    50% { transform: rotate(180deg) translateY(0); }
    75% { transform: rotate(270deg) translateY(-6px); }
    100% { transform: rotate(360deg) translateY(0); }
}
@keyframes jungle-hunt-die-land { 0% { transform: scale(1.35); } 60% { transform: scale(.92); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
    .jungle-hunt-roll-die.is-rolling, .jungle-hunt-roll-die.is-landed { animation: none; }
}

/* --- Escena de combate tipo RPG de la Cacería (solo presentación). --- */
.jungle-battle {
    --jb-window: linear-gradient(180deg, #4559c9 0%, #26318a 55%, #18205e 100%);
    width: min(980px, 96vw);
    max-height: 94vh;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    overflow-y: auto;
    border: 2px solid #d8defc;
    border-radius: 12px;
    background: #0a0f22;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .65);
    color: #fff;
}
.jb-banner, .jb-window, .jb-result {
    border: 2px solid #eef1ff;
    border-radius: 7px;
    background: var(--jb-window);
    box-shadow: inset 0 0 0 2px #151a4d, 0 2px 0 rgba(0, 0, 0, .6);
    text-shadow: 1px 1px 0 #000;
}
.jb-banner { padding: 8px 14px; text-align: center; font-weight: 700; font-size: clamp(.95rem, 1.6vw, 1.15rem); letter-spacing: .02em; }
.jb-stage {
    position: relative;
    height: clamp(220px, 46vh, 400px);
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    align-items: center;
    padding: 0 6%;
    overflow: hidden;
    border-radius: 7px;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, .05) 40%, rgba(0, 0, 0, .35) 100%),
        var(--jb-bg, radial-gradient(ellipse at 50% 120%, #4d8a2f 0%, #2d5a22 45%, #16301a 75%, #0d1b12 100%));
    background-size: cover;
    background-position: center;
}
.jb-stage::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 38%;
    background: linear-gradient(180deg, transparent, rgba(30, 60, 20, .35));
    pointer-events: none;
}
.jb-monster { position: relative; z-index: 2; justify-self: start; width: clamp(170px, 34vw, 360px); }
.jb-monster.is-dead { opacity: 0; }
.jb-monster-img { display: block; width: 100%; height: auto; image-rendering: pixelated; filter: drop-shadow(0 10px 8px rgba(0, 0, 0, .5)); user-select: none; }
.jb-party { position: relative; z-index: 3; justify-self: end; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.jb-hunter { position: relative; will-change: transform; }
.jb-party:has(.jb-hunter:nth-child(2)) { flex-direction: row; align-items: center; gap: clamp(8px, 1.6vw, 18px); }
.jb-hunter:nth-child(2) { margin-top: clamp(18px, 4vh, 40px); }
.jb-hunter.is-fallen { opacity: .35; filter: grayscale(1) brightness(.5); }
.jb-hunter.is-resisting::after {
    content: "Resiste";
    position: absolute;
    left: 50%;
    top: -10px;
    transform: translateX(-50%);
    padding: 2px 8px;
    border-radius: 999px;
    background: #f0cd7f;
    color: #2b1d05;
    font-size: .72rem;
    font-weight: 800;
    text-shadow: none;
}
.jb-card { width: clamp(84px, 11vw, 132px); pointer-events: none; }
.jb-party:has(.jb-hunter:nth-child(2)) .jb-card { width: clamp(72px, 8.5vw, 112px); }
.jb-card--template > * { max-width: 100%; }
.jb-card--mini {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 5px;
    border: 2px solid #c9a95a;
    border-radius: 9px;
    background: linear-gradient(180deg, #2b2416, #15110a);
    box-shadow: 0 10px 18px rgba(0, 0, 0, .55);
    text-align: center;
}
.jb-card-art { aspect-ratio: 3 / 4; display: grid; place-items: center; overflow: hidden; border-radius: 6px; background: #3a3424; color: #e8d9b0; font-size: .75rem; }
.jb-card-art img { width: 100%; height: 100%; object-fit: cover; }
.jb-card--mini strong { font-size: .78rem; line-height: 1.15; }
.jb-card--mini small { color: #f0cd7f; font-size: .7rem; }

.jb-hud { display: grid; grid-template-columns: 1fr 1.5fr; gap: 8px; }
.jb-window { padding: 8px 12px; font-size: .92rem; }
.jb-window small { display: block; margin-top: 4px; color: #d3dafc; font-size: .76rem; line-height: 1.35; }
.jb-row { display: flex; justify-content: space-between; gap: 12px; }
.jb-row b { font-variant-numeric: tabular-nums; color: #fff6d8; }
.jb-result { padding: 12px 14px; }
.jb-result > strong { display: block; font-size: 1.25rem; color: #fff1b8; }
.jb-result--defeat > strong { color: #ffb4a6; }
.jb-result p { margin: 6px 0 0; line-height: 1.45; }
.jb-note { color: #d3dafc; font-size: .86rem; }
.jb-loot { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 8px 10px; border: 1px dashed #f0cd7f; border-radius: 8px; background: rgba(0, 0, 0, .25); }
.jb-loot b { display: block; color: #f0cd7f; }
.jb-loot small { color: #e3e7ff; }
.jb-loot-chest {
    position: relative;
    flex: 0 0 auto;
    width: 38px;
    height: 28px;
    border: 2px solid #3b2408;
    border-radius: 6px 6px 3px 3px;
    background: linear-gradient(180deg, #b8752a 0 42%, #7a4614 42% 100%);
    box-shadow: inset 0 0 0 2px #e2b55c, 0 0 14px rgba(240, 205, 127, .45);
}
.jb-loot-chest::after { content: ""; position: absolute; left: 50%; top: 36%; width: 8px; height: 9px; transform: translateX(-50%); border-radius: 2px; background: #f6d77c; }
.jb-actions { display: flex; justify-content: flex-end; }
.jb-actions button { min-width: 160px; }

.jb-claws, .jb-flash, .jb-pop { position: absolute; z-index: 6; pointer-events: none; }
.jb-claws i {
    position: absolute;
    left: 6%;
    width: 92%;
    height: 6px;
    border-radius: 6px;
    background: linear-gradient(90deg, transparent, #fff 18%, #fecaca 45%, #ef4444 78%, transparent);
    box-shadow: 0 0 12px rgba(239, 68, 68, .95), 0 0 2px #fff;
    transform-origin: 0 50%;
    transform: rotate(-38deg) scaleX(0);
    animation: jbClaw .5s cubic-bezier(.2, .9, .3, 1) forwards;
}
.jb-claws i:nth-child(1) { top: 46%; }
.jb-claws i:nth-child(2) { top: 60%; animation-delay: 55ms; }
.jb-claws i:nth-child(3) { top: 74%; animation-delay: 110ms; }
.jb-claws--heavy i { height: 9px; background: linear-gradient(90deg, transparent, #fff 18%, #d9f99d 45%, #65a30d 78%, transparent); box-shadow: 0 0 14px rgba(132, 204, 22, .95), 0 0 2px #fff; }
@keyframes jbClaw {
    0% { transform: rotate(-38deg) scaleX(0); opacity: 1; }
    45% { transform: rotate(-38deg) scaleX(1); opacity: 1; }
    100% { transform: rotate(-38deg) scaleX(1); opacity: 0; }
}
.jb-flash { border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .95) 0%, rgba(254, 202, 202, .6) 30%, transparent 68%); animation: jbFlash .32s ease-out forwards; }
@keyframes jbFlash { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.3); opacity: 0; } }
.jb-pop { display: grid; place-items: center; }
.jb-pop b { font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 900; color: #fff; text-shadow: 2px 2px 0 #000, -1px -1px 0 #000, 0 0 10px rgba(0, 0, 0, .8); animation: jbPop .95s ease-out forwards; }
@keyframes jbPop {
    0% { transform: translateY(10px) scale(.6); opacity: 0; }
    20% { transform: translateY(-14px) scale(1.15); opacity: 1; }
    40% { transform: translateY(-6px) scale(1); }
    100% { transform: translateY(-34px); opacity: 0; }
}

@media (max-width: 640px) {
    .jungle-battle { padding: 6px; gap: 6px; }
    .jb-stage { height: clamp(190px, 36vh, 260px); padding: 0 3%; }
    .jb-hud { grid-template-columns: 1fr; }
    .jb-actions button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .jb-claws i, .jb-flash, .jb-pop b { animation: none; }
}

/* --- Botín: carta boca abajo que se da vuelta y elección del portador. --- */
.jungle-hunt-loot-button { width: 100%; margin-bottom: 8px; background: linear-gradient(180deg, #e6c069, #b8862e); color: #2a1904; font-weight: 800; border-color: #f3d58b; }
.jungle-loot-dialog { width: min(860px, 96vw); max-height: 92vh; display: flex; flex-direction: column; overflow: hidden; }
.jungle-loot-host { min-height: 0; overflow-y: auto; padding: 4px 14px 14px; }
.jb-loot-host { margin-top: 10px; padding: 10px; border: 1px dashed #f0cd7f; border-radius: 8px; background: rgba(0, 0, 0, .25); }
.jl-wrap { display: flex; gap: 18px; align-items: flex-start; }
.jl-card {
    --jl-w: clamp(118px, 15vw, 168px);
    flex: 0 0 auto;
    width: var(--jl-w);
    aspect-ratio: 5 / 7;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    perspective: 900px;
    cursor: default;
}
.jl-card.is-ready { cursor: pointer; }
.jl-card.is-ready:hover .jl-back, .jl-card.is-ready:focus-visible .jl-back { box-shadow: 0 0 0 3px #f0cd7f, 0 0 26px rgba(240, 205, 127, .65); transform: translateY(-3px); }
.jl-card:focus-visible { outline: none; }
.jl-card.is-ready .jl-back { animation: jlGlow 1.6s ease-in-out infinite; }
.jl-card.is-shaking .jl-card-inner { animation: jlShake .35s ease-in-out infinite; }
.jl-card-inner { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.3, .7, .3, 1); }
.jl-card.is-flipped .jl-card-inner { transform: rotateY(180deg); }
.jl-back, .jl-front { position: absolute; inset: 0; display: block; border-radius: 10px; backface-visibility: hidden; overflow: hidden; }
.jl-back {
    border: 3px solid #c9a95a;
    background:
        radial-gradient(circle at 50% 50%, rgba(240, 205, 127, .35) 0 18%, transparent 19%),
        repeating-linear-gradient(45deg, #24361f 0 10px, #1a2a17 10px 20px);
    box-shadow: 0 12px 26px rgba(0, 0, 0, .55);
    transition: box-shadow .2s ease, transform .2s ease;
}
.jl-back-mark { position: absolute; left: 50%; top: 50%; width: 34%; aspect-ratio: 1; transform: translate(-50%, -50%) rotate(45deg); border: 3px solid #f0cd7f; border-radius: 6px; box-shadow: inset 0 0 12px rgba(240, 205, 127, .6); }
.jl-front { transform: rotateY(180deg); background: #15110a; border: 3px solid #c9a95a; box-shadow: 0 12px 26px rgba(0, 0, 0, .55); }
.jl-face { display: flex; flex-direction: column; gap: 6px; width: 100%; height: 100%; padding: 10px; text-align: center; color: #f3e6c4; }
.jl-face--template { padding: 0; }
.jl-face--template > * { width: 100%; max-width: 100%; }
.jl-face small { color: #f0cd7f; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.jl-face strong { font-size: .95rem; line-height: 1.2; }
.jl-face-text { overflow: auto; font-size: .72rem; line-height: 1.35; color: #e6dcc0; text-align: left; }
.jl-face--empty { justify-content: center; align-items: center; background: radial-gradient(circle at 50% 40%, #33302a, #15130f 75%); }
.jl-empty-mark { width: 46%; aspect-ratio: 1; border-radius: 50%; border: 3px solid #8a8170; position: relative; }
.jl-empty-mark::after { content: ""; position: absolute; left: 50%; top: 50%; width: 120%; height: 3px; background: #8a8170; transform: translate(-50%, -50%) rotate(-45deg); }
.jl-side { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 8px; transition: opacity .2s ease; }
.jl-side.is-waiting { opacity: .35; }
.jl-title { color: #f0cd7f; font-size: 1.05rem; }
.jl-message { margin: 0; line-height: 1.45; }
.jl-hint { margin: 0 0 6px; color: #d3dafc; font-size: .86rem; }
.jl-carrier-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; max-height: 340px; overflow-y: auto; padding: 4px; }
.jl-carrier { padding: 6px; }
.jl-actions:empty { display: none; }
.jl-actions button { width: 100%; }
@keyframes jlGlow { 0%, 100% { box-shadow: 0 0 0 2px rgba(240, 205, 127, .45), 0 12px 26px rgba(0, 0, 0, .55); } 50% { box-shadow: 0 0 0 3px #f0cd7f, 0 0 24px rgba(240, 205, 127, .6); } }
@keyframes jlShake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-3deg); } 75% { transform: rotate(3deg); } }
@media (max-width: 640px) {
    .jl-wrap { flex-direction: column; align-items: center; }
    .jl-side { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .jl-card-inner { transition: none; }
    .jl-card.is-ready .jl-back, .jl-card.is-shaking .jl-card-inner { animation: none; }
}

/* Objetos equipados sobre el esbirro en el tablero. */
.jungle-equip-badges { position: absolute; left: 4px; right: 4px; bottom: 4px; z-index: 7; display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; pointer-events: auto; }
.jungle-equip-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    max-width: 100%;
    padding: 1px 6px;
    overflow: hidden;
    border: 1px solid #f0cd7f;
    border-radius: 999px;
    background: rgba(31, 22, 6, .88);
    color: #fbe7b0;
    font-size: .62rem;
    font-weight: 700;
    line-height: 1.5;
    white-space: nowrap;
    text-overflow: ellipsis;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .5);
}
.jungle-equip-badge--arma { border-color: #f59e8b; }
.jungle-equip-badge--armadura { border-color: #9cc3f5; }
.jl-card:disabled, .jl-card[disabled] { opacity: 1; filter: none; background: transparent; }

/* Carta equipada detrás del esbirro: asoma por la esquina superior derecha. */
.game-card.has-jungle-equipment { isolation: isolate; }
body.duel-playing .board-main .game-card.duel-card.has-jungle-equipment,
body.duel-playing #gameBoard .game-card.has-jungle-equipment {
    overflow: visible !important;
    isolation: isolate;
}
.jungle-equip-under {
    position: absolute;
    inset: 0;
    z-index: -1;
    display: block;
    border-radius: 12px;
    overflow: hidden;
    background: #15110a;
    border: 2px solid #c9a95a;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .55), 0 0 10px rgba(240, 205, 127, .35);
    transform: translate(calc(14% + var(--jeq-index, 0) * 7%), calc(-9% - var(--jeq-index, 0) * 4%)) rotate(calc(7deg + var(--jeq-index, 0) * 4deg));
    transform-origin: 50% 100%;
    cursor: zoom-in;
    pointer-events: auto;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.jungle-equip-under:hover {
    transform: translate(calc(20% + var(--jeq-index, 0) * 7%), calc(-12% - var(--jeq-index, 0) * 4%)) rotate(calc(10deg + var(--jeq-index, 0) * 4deg));
    box-shadow: 0 8px 20px rgba(0, 0, 0, .6), 0 0 16px rgba(240, 205, 127, .75);
    filter: brightness(1.1);
}
.jungle-equip-under.has-template { background: transparent; border-color: transparent; }
.jungle-equip-under > .cg-template-runtime {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    pointer-events: none;
}
.jungle-equip-under-face {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-end;
    gap: 2px;
    padding: 6px 8px;
    background: linear-gradient(200deg, rgba(42, 30, 10, .2), rgba(10, 8, 4, .85)), repeating-linear-gradient(45deg, #2b2416 0 8px, #201a0f 8px 16px);
    background-size: cover;
    background-position: center;
    color: #f3e6c4;
    text-align: right;
    pointer-events: none;
}
.jungle-equip-under-face small { color: #f0cd7f; font-size: .58rem; text-transform: uppercase; letter-spacing: .05em; }
.jungle-equip-under-face strong { font-size: .7rem; line-height: 1.1; max-width: 60%; }
@media (prefers-reduced-motion: reduce) { .jungle-equip-under { transition: none; } }

/* Objetos con una acción disponible ahora. */
.jungle-equip-under.is-usable { box-shadow: 0 0 0 2px #f0cd7f, 0 0 18px rgba(240, 205, 127, .9); animation: jungleObjectReady 1.6s ease-in-out infinite; cursor: pointer; }
@keyframes jungleObjectReady { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.35); } }
.jungle-object-action-button { margin-bottom: 6px; }
@media (prefers-reduced-motion: reduce) { .jungle-equip-under.is-usable { animation: none; } }

/* --- Ventana de activación de objetos (rediseño). --- */
.jungle-object-dialog {
    width: min(860px, 96vw);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(240, 205, 127, .55);
    border-radius: 18px;
    background:
        radial-gradient(ellipse at 0% 0%, rgba(240, 205, 127, .10), transparent 55%),
        linear-gradient(180deg, #121a2c 0%, #0b1120 100%);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .65), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.jod-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(240, 205, 127, .22);
    background: linear-gradient(90deg, rgba(240, 205, 127, .10), transparent 70%);
}
.jod-icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(240, 205, 127, .6);
    background: radial-gradient(circle at 35% 30%, #4a3a17, #1c150a);
    color: #f6dc97;
    font-size: 1.3rem;
    box-shadow: 0 0 14px rgba(240, 205, 127, .25);
}
.jod-heading { flex: 1 1 auto; min-width: 0; }
.jod-heading strong { display: block; color: #f6dc97; font-size: 1.25rem; letter-spacing: .02em; text-transform: uppercase; }
.jod-heading small { display: block; margin-top: 2px; color: #b9c3d9; font-size: .84rem; }
.jod-close {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    min-height: 0;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .05);
    color: #e2e8f0;
    font-size: .95rem;
}
.jod-close:hover { background: rgba(255, 255, 255, .12); }
.jod-body { display: flex; gap: 22px; padding: 20px; min-height: 0; overflow-y: auto; }
.jod-object {
    flex: 0 0 auto;
    width: clamp(150px, 19vw, 210px);
    margin: 0;
    align-self: flex-start;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 16px 34px rgba(0, 0, 0, .55), 0 0 0 1px rgba(240, 205, 127, .35);
}
.jod-object > .cg-template-runtime { display: block; width: 100% !important; max-width: none !important; height: auto !important; }
.jod-fallback { display: flex; flex-direction: column; gap: 6px; padding: 14px; aspect-ratio: 5 / 7; background: linear-gradient(180deg, #2b2416, #15110a); color: #f3e6c4; }
.jod-fallback small { color: #f0cd7f; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; }
.jod-fallback span { font-size: .78rem; line-height: 1.4; color: #e6dcc0; }
.jod-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.jod-label { display: block; margin-bottom: 6px; color: #f0cd7f; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.jod-effect p {
    margin: 0;
    padding: 12px 14px;
    border-left: 3px solid #f0cd7f;
    border-radius: 0 10px 10px 0;
    background: rgba(240, 205, 127, .07);
    color: #eef2fb;
    line-height: 1.55;
}
.jod-targets { display: flex; flex-wrap: wrap; gap: 12px; }
.jod-target {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: clamp(116px, 13vw, 140px);
    min-height: 0;
    padding: 8px 8px 10px;
    border: 2px solid rgba(255, 255, 255, .08);
    border-radius: 14px;
    background: rgba(255, 255, 255, .03);
    color: #eef2fb;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.jod-target:hover { border-color: rgba(240, 205, 127, .5); transform: translateY(-2px); }
.jod-target[aria-selected="true"] { border-color: #f0cd7f; background: rgba(240, 205, 127, .10); box-shadow: 0 0 0 3px rgba(240, 205, 127, .25), 0 10px 22px rgba(0, 0, 0, .45); }
.jod-target[aria-selected="true"]::after {
    content: "✓";
    position: absolute;
    top: -9px;
    right: -9px;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #f0cd7f;
    color: #2b1d05;
    font-weight: 900;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .5);
}
.jod-target-card { display: block; width: 100%; pointer-events: none; }
.jod-target-card .jb-card { width: 100%; }
.jod-target-name { font-size: .82rem; font-weight: 700; text-align: center; line-height: 1.2; }
.jod-target-stat { font-size: .74rem; color: #b9c3d9; }
.jod-target-stat b { color: #f6dc97; }
.jod-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid rgba(240, 205, 127, .18);
    background: rgba(0, 0, 0, .25);
}
.jod-footer button { min-width: 140px; }
.jod-confirm {
    border: 1px solid #f3d58b;
    background: linear-gradient(180deg, #e6c069, #b8862e);
    color: #2a1904;
    font-weight: 800;
}
.jod-confirm:hover:not(:disabled) { filter: brightness(1.08); }
.jod-confirm:disabled { opacity: .45; filter: grayscale(.4); cursor: not-allowed; }
@media (max-width: 640px) {
    .jod-body { flex-direction: column; align-items: center; padding: 14px; }
    .jod-main { width: 100%; }
    .jod-targets { justify-content: center; }
    .jod-footer { flex-direction: column-reverse; }
    .jod-footer button { width: 100%; }
}

/* Respuesta especial (Alabarda, Custodio del Silencio) en la ventana de respuesta a una habilidad rival. */
.cantico-jungle-halberd,
.cantico-special-response {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-top: 14px;
    padding: 12px;
    border: 1px solid rgba(240, 205, 127, .55);
    border-radius: 14px;
    background: linear-gradient(90deg, rgba(240, 205, 127, .10), rgba(0, 0, 0, .15));
}
.cjh-card { flex: 0 0 auto; width: 92px; border-radius: 10px; overflow: hidden; box-shadow: 0 8px 18px rgba(0, 0, 0, .5); }
.cjh-card > .cg-template-runtime { display: block; width: 100% !important; max-width: none !important; height: auto !important; }
.cjh-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cjh-main strong { color: #f6dc97; }
.cjh-main p { margin: 0; font-size: .86rem; line-height: 1.45; color: #e2e8f0; }
.cjh-main button { align-self: flex-start; min-width: 180px; }

/* Cacería: fila de reducción y total en la escena RPG. */
.jb-row--penalty b { color: #ffb4a6; }
.jb-row--total { margin-top: 4px; padding-top: 4px; border-top: 1px solid rgba(238, 241, 255, .35); font-weight: 800; }
.jod-target .jb-card--mini strong, .jod-target .jb-card--mini small { display: none; }

/* Objetos equipados en ventanas de decisión (elegir objetivo, combate, etc.). */
.choice-equip-summary { width: 100%; margin-top: 8px; padding: 7px 8px; border: 1px solid rgba(216, 168, 69, .45); border-radius: 10px; background: linear-gradient(180deg, rgba(64, 43, 12, .55), rgba(15, 23, 42, .7)); color: #fef3c7; text-align: left; box-sizing: border-box; }
.choice-equip-summary > strong { display: block; margin-bottom: 5px; font-size: .68rem !important; letter-spacing: .06em; text-transform: uppercase; color: #fcd77f; }
.choice-equip-list { display: grid; gap: 5px; }
.choice-equip-entry { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 7px; align-items: start; min-width: 0; }
.choice-equip-icon { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; border: 1px solid rgba(252, 215, 127, .55); background: rgba(15, 23, 42, .85); color: #fde68a; font-size: .85rem; line-height: 1; }
.choice-equip-entry--arma .choice-equip-icon { border-color: #f59e8b; color: #fecaca; }
.choice-equip-entry--armadura .choice-equip-icon { border-color: #9cc3f5; color: #dbeafe; }
.choice-equip-text { display: grid; gap: 1px; min-width: 0; line-height: 1.2; }
.choice-equip-text b { color: #f8fafc; font-size: .76rem; overflow-wrap: anywhere; }
.choice-equip-text small { color: #cbd5e1; font-size: .64rem; text-transform: uppercase; letter-spacing: .04em; }
.choice-equip-text em { color: #e2e8f0; font-style: normal; font-size: .68rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
