/* v0.90 — Shared physical cards: the visible art controls the whole footprint.
   RPG, CPU/solo, Cube and multiplayer all render the same .poke structure.
   The previous fix only styled the image wrapper, leaving an oversized .poke
   width inherited from mobile/desktop CSS. That created a blue letterbox. */
body.duel-active #duel .stage .territory .poke{
 /* --attachment-height is already responsive per Active/Bench and viewport. */
 width:min(100%,calc(var(--attachment-height) * 0.716374))!important;
 min-width:0!important;
 max-width:100%!important;
 height:auto!important;
 min-height:0!important;
 max-height:none!important;
 box-sizing:border-box!important;
 padding:0!important;
 border:0!important;
 background:transparent!important;
 box-shadow:none!important;
 overflow:visible!important;
 --attachment-peek:clamp(5px,1.6vw,17px);
 --tool-peek:var(--attachment-peek);
 --attachment-overlap:clamp(3px,.95vw,9px);
 --tool-overlap:var(--attachment-overlap);
}
/* The actual Pokémon image is portrait-shaped, without any navy canvas.
   Match the width of the button to the portrait art, never to its old slot. */
body.duel-active #duel .stage .territory .poke .pokemon-face{
 display:block!important;
 position:relative!important;
 z-index:4!important;
 flex:none!important;
 width:100%!important;
 height:auto!important;
 min-height:0!important;
 max-height:none!important;
 aspect-ratio:245/342!important;
 padding:0!important;
 margin:0!important;
 border:0!important;
 border-radius:5px!important;
 background:transparent!important;
 box-shadow:none!important;
 overflow:hidden!important;
}
body.duel-active #duel .stage .territory .poke .pokemon-face>img{
 display:block!important;
 position:absolute!important;
 inset:0!important;
 width:100%!important;
 height:100%!important;
 max-width:none!important;
 max-height:none!important;
 padding:0!important;
 margin:0!important;
 border:0!important;
 border-radius:5px!important;
 object-fit:contain!important;
 object-position:center!important;
}
body.duel-active #duel .stage .territory .poke .pokemon-face>.empty{
 position:absolute!important;
 inset:0!important;
 width:100%!important;
 height:100%!important;
 min-height:0!important;
}
/* Both stacks inherit the exact rendered width/aspect ratio of their Pokémon.
   Visible left/right edges are entire physical cards, not stretched strips. */
body.duel-active #duel .stage .territory .poke .energy-peeks.energy-card-stack,
body.duel-active #duel .stage .territory .poke .pokemon-tools.tool-card-stack{
 display:block!important;
 position:absolute!important;
 top:0!important;
 bottom:auto!important;
 width:100%!important;
 height:auto!important;
 min-width:0!important;
 max-width:none!important;
 max-height:none!important;
 aspect-ratio:245/342!important;
 overflow:visible!important;
 transform:none!important;
 pointer-events:none!important;
}
body.duel-active #duel .stage .territory .poke .energy-peeks.energy-card-stack{
 left:calc(-1 * var(--attachment-peek))!important;
 right:auto!important;
 z-index:1!important;
}
body.duel-active #duel .stage .territory .poke .pokemon-tools.tool-card-stack{
 right:calc(-1 * var(--tool-peek))!important;
 left:auto!important;
 z-index:2!important;
}
body.duel-active #duel .stage .territory .poke .energy-card-stack .attached-energy.energy-card-mini,
body.duel-active #duel .stage .territory .poke .pokemon-tools .pokemon-tool-card{
 display:block!important;
 position:absolute!important;
 top:0!important;
 bottom:auto!important;
 width:100%!important;
 height:100%!important;
 min-width:0!important;
 min-height:0!important;
 max-height:none!important;
 margin:0!important;
 padding:0!important;
 border-radius:5px!important;
 overflow:hidden!important;
 transform:none!important;
}
/* Images always fill their own card rectangle; no oversized blue backdrop,
   cropped center section or type-letter bar may overlap the card artwork. */
body.duel-active #duel .stage .territory .poke .energy-card-stack .energy-card-art,
body.duel-active #duel .stage .territory .poke .pokemon-tools .tool-card-art{
 display:block!important;
 width:100%!important;
 height:100%!important;
 max-width:none!important;
 max-height:none!important;
 border:0!important;
 border-radius:5px!important;
 object-fit:contain!important;
 object-position:center!important;
}
body.duel-active #duel .stage .territory .poke .pokemon-tools .pokemon-tool-card::after,
body.duel-active #duel .stage .territory .poke .energy-card-stack .attached-energy.energy-card-mini::before{
 display:none!important;
}
