/* Aether Vault 3.11.240. The arena uses the original collectible-card design.
   This is a visual-only override: all four field slots, animations and actions remain. */

/* The board occupies the whole browser viewport; no enclosing game border. */
body:has(.av226-screen) .av226-screen {
  grid-template-rows:50px minmax(0,1fr) 32px clamp(207px,27dvh,260px)!important;
  border:0!important;border-radius:0!important;box-shadow:none!important;
}
.av226-screen .av226-board {box-shadow:none!important;border:0!important}
.av226-screen .av226-board:before,.av226-screen .av226-board:after {display:none!important}
.av226-screen .av226-midline {display:none!important}
.av226-screen .av226-tabletop {
  grid-template-rows:minmax(0,1fr) 0 minmax(0,1fr)!important;
  padding-top:5px!important;padding-bottom:5px!important;
}
.av226-screen .av226-fieldcards,.av226-screen .av226-enemyrow .av226-fieldcards{
  justify-content:center!important;align-items:center!important;
  height:100%!important;min-height:0!important;
  gap:clamp(7px,1vw,16px)!important;
  padding:0!important;
}
.av226-screen .av226-rowcenter{position:relative;justify-content:center!important;min-height:0}
.av226-screen .av226-enemyrow .av226-rowcenter{padding-top:25px!important}
.av226-screen .av226-enemyhand{
  position:absolute;top:1px;left:0;right:0;z-index:3;height:21px;min-height:21px;
}

/* Every occupied field slot uses identical collectible-card proportions. */
.av226-screen .av226-minion {
  --av240-h:clamp(159px,24dvh,235px);
  flex:0 0 auto!important;
  width:calc(var(--av240-h)*.705)!important;
  height:calc(var(--av240-h) + 32px)!important;
  max-height:none!important;
  min-height:0!important;
  margin:0!important;padding:0!important;
  align-self:center!important;
  justify-content:flex-start!important;
  overflow:visible!important;
  border:0!important;background:none!important;box-shadow:none!important;
}
.av226-screen .av226-enemyrow .av226-minion {
  height:calc(var(--av240-h) + 20px)!important;
}
.av226-screen .av226-minionselect {
  flex:0 0 var(--av240-h)!important;
  height:var(--av240-h)!important;
  min-height:0!important;max-height:none!important;
  width:100%!important;display:block!important;
  overflow:visible!important;padding:0!important;
  background:none!important;border:0!important;border-radius:0!important;
  transform-origin:50% 80%;
}
.av226-screen .av226-minion .av240-fieldwrap {
  display:block!important;
  position:relative!important;
  width:100%!important;height:100%!important;
  margin:0!important;padding:0!important;
  background:none!important;border:0!important;border-radius:0!important;
  box-shadow:none!important;overflow:visible!important;
}
/* A separate frame or pale card overlay must never be drawn around collectible cards. */
.av226-screen .av240-fieldwrap::before,.av226-screen .av240-fieldwrap::after {display:none!important}
.av226-screen .av240-collectible.card {
  display:block!important;
  width:100%!important;height:100%!important;
  aspect-ratio:.705!important;
  max-width:none!important;max-height:none!important;
  margin:0!important;
  padding:7px!important;
  border:2px solid #977c5a!important;
  border-radius:13px!important;
  box-shadow:0 10px 20px #0009,inset 0 0 3px #ffdda8!important;
  overflow:hidden!important;
  transition:box-shadow .2s ease,filter .2s ease;
}
/* Restore the exact rarity gradients from the card collector: not cream/tan cards. */
.av226-screen .av240-collectible.card[data-rarity="Common"]{background:linear-gradient(137deg,#5d4b3e,#e4c28b 16%,#40312a 39%,#b69566 70%,#463223)!important}
.av226-screen .av240-collectible.card[data-rarity="Uncommon"]{background:linear-gradient(135deg,#6b787b,#d7e9e6 20%,#526267 45%,#c8dce0 80%,#546065)!important}
.av226-screen .av240-collectible.card[data-rarity="Rare"]{background:linear-gradient(135deg,#193f8d,#8fcaff 22%,#1b2c73 48%,#5ab9ee 79%,#171b65)!important}
.av226-screen .av240-collectible.card[data-rarity="Epic"]{background:linear-gradient(135deg,#753c9b,#e2b5ff 20%,#57217f 50%,#b95fea 80%,#502474)!important}
.av226-screen .av240-collectible.card[data-rarity="Legendary"]{background:linear-gradient(135deg,#ad7b24,#fff3b4 17%,#956019 42%,#fbd979 79%,#855213)!important}
.av226-screen .av240-collectible.card[data-rarity="Mythic"]{background:linear-gradient(115deg,#8436e5,#52ddff 18%,#f58ecc 34%,#ffee81 48%,#42e7cf 72%,#aa74ff)!important}
.av226-screen .av240-collectible .inner{
  height:100%!important;width:100%!important;
  display:flex!important;flex-direction:column!important;
  border:1px solid #efd49a90!important;border-radius:7px!important;
  overflow:hidden!important;background:#0a111e!important;
}
.av226-screen .av240-collectible .ctop{
  height:13%!important;flex:0 0 13%!important;
  display:flex!important;align-items:center!important;justify-content:space-between!important;
  padding:4px 6px!important;
  background:linear-gradient(90deg,#080e19,#1d2b3c)!important;
  color:#f9e6c2!important;
  border-bottom:1px solid #d4b87e8a!important;
}
.av226-screen .av240-collectible .ctop strong{
  font:700 clamp(9px,.92vw,13px)/1.08 Cinzel,Georgia,serif!important;
  white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
}
.av226-screen .av240-collectible .artbox{
  display:block!important;position:relative!important;flex:1 1 auto!important;
  height:auto!important;min-height:0!important;background:#1c2939!important;
  overflow:hidden!important;
}
.av226-screen .av240-collectible .art {
  position:relative!important;width:100%!important;height:100%!important;
  background-size:400% 300%;background-repeat:no-repeat!important;
  border:0!important;border-radius:0!important;box-shadow:none!important;
}
.av226-screen .av240-collectible .power {
  position:absolute!important;right:6px!important;bottom:6px!important;
  font-size:clamp(15px,1.35vw,20px)!important;
}
.av226-screen .av240-collectible .cbottom {
  display:flex!important;flex-direction:column!important;justify-content:space-between!important;
  height:27%!important;flex:0 0 27%!important;
  min-height:0!important;overflow:hidden!important;
  padding:5px 7px!important;gap:1px!important;
  background:linear-gradient(#172536,#0b111e)!important;
}
.av226-screen .av240-collectible .type{
  font-size:clamp(7px,.7vw,10px)!important;
  line-height:1.2!important;color:#d5ba83!important;letter-spacing:.1px!important;
  overflow:hidden!important;text-overflow:ellipsis!important;
}
.av226-screen .av240-collectible .flavor{
  display:-webkit-box!important;-webkit-box-orient:vertical!important;
  -webkit-line-clamp:2!important;white-space:normal!important;
  overflow:hidden!important;
  font:700 clamp(8px,.74vw,10px)/1.13 'DM Sans',sans-serif!important;
  text-align:left!important;color:#f1f5ff!important;
}
.av226-screen .av240-collectible .serial{
  display:flex!important;justify-content:space-between!important;
  font-size:clamp(7px,.64vw,9px)!important;color:#9fb1c6!important;
}
.av226-screen .av226-minion .av226-minionactions{
  flex:0 0 31px!important;width:100%!important;
  height:31px!important;gap:5px!important;
  padding:6px 0 0!important;margin:0!important;
  display:flex!important;
}
.av226-screen .av226-minion .av226-minionactions button{
  height:25px!important;min-width:0!important;
  padding:4px 2px!important;
  border-radius:6px!important;
  font:900 10px/1 Arial,sans-serif!important;
}
.av226-screen .av226-minion .av226-rivalbar{
  flex:0 0 18px!important;height:18px!important;margin:2px 0 0!important;
}
.av226-screen .av226-minion.focused .av240-collectible.card,
.av226-screen .av226-minionselect:hover .av240-collectible.card{
  box-shadow:0 13px 24px #000b,0 0 16px #edbf6c91!important;
}
/* Empty locations are quiet placement marks rather than boxes over the board. */
.av226-screen .av240-empty-slot {
  flex:0 0 calc(clamp(159px,24dvh,235px)*.705)!important;
  width:calc(clamp(159px,24dvh,235px)*.705)!important;
  height:clamp(159px,24dvh,235px)!important;
  border:1px dashed #bc986344!important;
  background:radial-gradient(ellipse,#bc986315,transparent 70%)!important;
  box-shadow:none!important;
}

/* Hand uses the same complete, ornate card as the collection. */
.av226-screen .av226-handdock{padding:6px 14px 9px!important;gap:4px!important;overflow:hidden!important}
.av226-screen .av226-hand{align-items:stretch!important;justify-content:center!important;gap:clamp(8px,1vw,16px)!important;min-height:0!important}
.av226-screen .av226-handcard {
  flex:0 1 clamp(124px,11.6vw,185px)!important;
  width:clamp(124px,11.6vw,185px)!important;
  max-width:185px!important;
  min-width:0!important;height:100%!important;
  min-height:0!important;padding:0!important;
  background:none!important;border:0!important;box-shadow:none!important;
  overflow:visible!important;
}
.av226-screen .av226-handcard.selected{box-shadow:none!important;border:0!important}
.av226-screen .av226-handpick{
  flex:1 1 0!important;min-height:0!important;
  width:100%!important;overflow:visible!important;
  padding:0!important;border:0!important;
}
.av226-screen .av240-handface{height:100%!important;min-height:0!important;width:100%!important}
.av226-screen .av240-handface > .av240-collectible.card{
  height:100%!important;width:100%!important;
}
.av226-screen .av226-handcard.selected .av240-collectible.card {
  box-shadow:0 0 0 2px #e8c27d,0 0 17px #eec875aa,0 10px 20px #0009!important;
}
.av226-screen .av226-playbutton{
  flex:0 0 27px!important;height:27px!important;min-height:27px!important;
  width:100%!important;
}
.av226-screen [data-arena-expand]{display:none!important}
@media(max-height:770px){
  body:has(.av226-screen) .av226-screen{grid-template-rows:47px minmax(0,1fr) 30px 207px!important}
  .av226-screen .av226-minion{--av240-h:clamp(125px,21.5dvh,171px)}
  .av226-screen .av240-empty-slot {flex-basis:calc(clamp(125px,21.5dvh,171px)*.705)!important;width:calc(clamp(125px,21.5dvh,171px)*.705)!important;height:clamp(125px,21.5dvh,171px)!important}
  .av226-screen .av240-collectible .cbottom{height:26%!important;flex-basis:26%!important;padding:3px 5px!important}
  .av226-screen .av240-collectible .flavor{-webkit-line-clamp:1!important}
  .av226-screen .av240-collectible .ctop strong{font-size:9px!important}
}
@media(max-width:1040px){body:has(.av226-screen) .av226-screen{grid-template-columns:minmax(0,1fr)!important}}
@media(max-width:720px){
  body:has(.av226-screen) .av226-screen{grid-template-rows:45px minmax(0,1fr) 30px 174px!important}
  .av226-screen .av226-tabletop{padding:3px 68px 3px 5px!important}
  .av226-screen .av226-minion{--av240-h:clamp(99px,18dvh,140px)}
  .av226-screen .av240-empty-slot{flex-basis:calc(clamp(99px,18dvh,140px)*.705)!important;width:calc(clamp(99px,18dvh,140px)*.705)!important;height:clamp(99px,18dvh,140px)!important}
  .av226-screen .av240-collectible.card{padding:3px!important;border-radius:8px!important}
  .av226-screen .av240-collectible .ctop{padding:2px 3px!important}
  .av226-screen .av240-collectible .ctop strong{font-size:7px!important}
  .av226-screen .av240-collectible .cbottom{padding:2px 3px!important;height:28%!important;flex-basis:28%!important}
  .av226-screen .av240-collectible .type{font-size:6.5px!important}
  .av226-screen .av240-collectible .flavor{display:none!important}
  .av226-screen .av240-collectible .serial{font-size:6px!important}
  .av226-screen .av226-handcard{flex-basis:min(135px,calc((100% - 20px)/4))!important;width:min(135px,calc((100% - 20px)/4))!important}
}
@media(prefers-reduced-motion:reduce){
  .av226-screen .av240-collectible{transition:none!important}
}

/* Keep the FULL hand cards in genuine portrait proportions instead of
   stretching a short card box sideways. Reserve the entire visible card. */
body:has(.av226-screen) .av226-screen{
  grid-template-rows:50px minmax(0,1fr) 32px clamp(220px,31dvh,278px)!important;
}
.av226-screen .av226-hand{padding:3px 4px 3px!important}
.av226-screen .av226-handcard{
  --av240-hand-h:clamp(131px,calc(31dvh - 80px),198px);
  --av240-hand-w:min(calc(var(--av240-hand-h) * .705),calc((100vw - 50px) / var(--av226-count) - 9px));
  flex:0 1 var(--av240-hand-w)!important;
  width:var(--av240-hand-w)!important;
  max-width:var(--av240-hand-w)!important;
}
.av226-screen .av240-handface{
  display:flex!important;justify-content:center!important;
  align-items:flex-start!important;
}
.av226-screen .av240-handface > .av240-collectible.card{
  aspect-ratio:.705!important;
  width:100%!important;
  height:auto!important;
  max-height:100%!important;
}
@media(max-height:770px){
  body:has(.av226-screen) .av226-screen{
    grid-template-rows:47px minmax(0,1fr) 30px clamp(197px,28dvh,219px)!important;
  }
  .av226-screen .av226-handcard{--av240-hand-h:clamp(119px,calc(28dvh - 74px),142px)}
}
@media(max-width:720px){
  body:has(.av226-screen) .av226-screen{grid-template-rows:45px minmax(0,1fr) 30px 174px!important}
  .av226-screen .av226-handcard{--av240-hand-h:100px}
}
