/* Aether Vault 3.11.241 — readable full collector cards and a spacious reader.
   UI-only changes: the original cardHTML artwork/rarity design and battle rules remain. */

/* Use the available screen area for playing cards, not empty margins. */
body:has(.av226-screen) .av226-screen {
  grid-template-columns:minmax(0,1fr) clamp(340px,23vw,405px)!important;
  grid-template-rows:48px minmax(0,1fr) 30px clamp(230px,29dvh,264px)!important;
}
.av226-screen .av226-topbar{padding:4px 14px!important}
.av226-screen .av226-tabletop{padding:4px 111px 4px 12px!important}
.av226-screen .av226-battlerow{grid-template-columns:clamp(92px,8.5vw,126px) minmax(0,1fr)!important;gap:6px!important}
.av226-screen .av226-rowcenter{justify-content:center!important}
.av226-screen .av226-enemyrow .av226-rowcenter{padding-top:13px!important}
.av226-screen .av226-enemyhand{top:0!important;height:20px!important;min-height:20px!important}
.av226-screen .av226-fieldcards,.av226-screen .av226-enemyrow .av226-fieldcards{
  gap:clamp(6px,.85vw,13px)!important;align-items:center!important;justify-content:center!important;
}

/* All four deployed slots have the same actual portrait dimensions. Use a
   width constraint as well as height so four real cards always fit. */
.av226-screen{
  --av241-field-h:min(26dvh,calc((100vw - clamp(340px,23vw,405px) - 296px) / 2.95));
}
.av226-screen .av226-minion {--av240-h:var(--av241-field-h)!important}
.av226-screen .av240-empty-slot {
  flex:0 0 calc(var(--av241-field-h) * .705)!important;
  width:calc(var(--av241-field-h) * .705)!important;
  height:var(--av241-field-h)!important;
  max-height:none!important;
}
.av226-screen .av226-minion .av226-minionactions{padding-top:4px!important;flex-basis:30px!important;height:30px!important}
.av226-screen .av226-minion .av226-minionactions button{
  font:900 clamp(10px,.76vw,12px)/1.05 Arial,sans-serif!important;
  height:25px!important;
}
.av226-screen .av226-minion .av226-rivalbar{margin-top:3px!important}

/* Preserve the EXACT collection/binder card frame and rarity gradients,
   while giving its text room to breathe instead of cropping it. */
.av226-screen .av240-collectible.card{padding:6px!important}
.av226-screen .av240-collectible .ctop{
  height:15%!important;flex:0 0 15%!important;padding:3px 7px!important;
}
.av226-screen .av240-collectible .ctop strong{
  display:-webkit-box!important;-webkit-box-orient:vertical!important;
  -webkit-line-clamp:2!important;
  white-space:normal!important;overflow:hidden!important;text-overflow:clip!important;
  font:800 clamp(11px,.89vw,14px)/1.06 Cinzel,Georgia,serif!important;
  overflow-wrap:break-word;
}
.av226-screen .av240-collectible .gem{font-size:12px!important;flex-shrink:0}
.av226-screen .av240-collectible .cbottom{
  height:36%!important;flex:0 0 36%!important;
  padding:5px 7px!important;gap:3px!important;
  justify-content:space-between!important;
}
.av226-screen .av240-collectible .type{
  font:800 clamp(9.5px,.72vw,11.5px)/1.16 'DM Sans',Arial,sans-serif!important;
  letter-spacing:0!important;white-space:normal!important;overflow-wrap:anywhere!important;
  max-height:none!important;text-overflow:clip!important;
}
.av226-screen .av240-collectible .flavor{
  -webkit-line-clamp:3!important;
  font:700 clamp(9.5px,.72vw,11.5px)/1.19 'DM Sans',Arial,sans-serif!important;
}
.av226-screen .av240-collectible .serial{font-size:clamp(8px,.62vw,9.5px)!important;line-height:1.05!important}
.av226-screen .av240-collectible .power{font-size:clamp(16px,1.2vw,20px)!important}

/* Readable full-size hand cards instead of a small specimen in a tall tray. */
.av226-screen .av226-handdock{padding:6px 12px 7px!important;gap:2px!important}
.av226-screen .av226-handhead{flex-basis:22px!important;min-height:22px!important}
.av226-screen .av226-hand{padding:1px 4px 1px!important;gap:clamp(8px,.9vw,14px)!important}
.av226-screen .av226-handcard{
  --av240-hand-h:clamp(152px,calc(29dvh - 65px),192px)!important;
}
.av226-screen .av226-playbutton{height:26px!important;min-height:26px!important;flex-basis:26px!important;font-size:11px!important}
.av226-screen .av240-handface{align-items:flex-start!important}
.av226-screen .av226-handcard.selected .av240-collectible.card{box-shadow:0 0 0 1px #ffe9a7,0 0 14px #eec875a0,0 8px 17px #0009!important}

/* Side panel: spacious, genuine text hierarchy, and an actually readable
   complete set of abilities. Scrolling never clips the card title or actions. */
.av226-screen .av226-reader{
  min-height:0!important;min-width:0!important;
  overflow-x:hidden!important;overflow-y:auto!important;
  padding:13px 17px 23px!important;
  scroll-padding-top:13px!important;
  scrollbar-width:thin;scrollbar-color:#98764b #24222a;
  border:0!important;border-left:0!important;
}
.av226-screen .av226-reader::before{
  content:'CARD DETAILS';display:block;position:static!important;
  margin:0 0 11px!important;padding:0 0 9px!important;
  border:0!important;border-bottom:1px solid #be995b6e!important;
  font:900 12px/1.3 Arial,sans-serif!important;
  letter-spacing:1.8px!important;
}
.av226-screen .av226-reader .focus-heading{gap:12px!important;align-items:flex-start!important;margin-bottom:12px!important;padding:0!important}
.av226-screen .av226-reader .focus-heading >div:first-child{flex:1;min-width:0}
.av226-screen .av226-reader .focus-eyebrow{font-size:11px!important;line-height:1.4!important;letter-spacing:1px!important}
.av226-screen .av226-reader .focus-heading h3{
  font:800 clamp(18px,1.3vw,22px)/1.23 Georgia,serif!important;
  color:#ffdea0!important;overflow-wrap:anywhere!important;margin:3px 0 0!important;
}
.av226-screen .av226-reader .focus-navigation{flex:0 0 auto}
.av226-screen .av226-reader .focus-navigation button{min-width:32px!important;height:32px!important;font-size:20px!important}
.av226-screen .av226-reader .focus-hero{
  display:grid!important;grid-template-columns:minmax(128px,.88fr) minmax(0,1.12fr)!important;
  gap:12px!important;align-items:start!important;margin-bottom:12px!important;
}
.av226-screen .av226-reader .focus-art{
  width:100%!important;height:clamp(160px,21dvh,205px)!important;
  max-height:none!important;min-height:0!important;
  margin:0!important;background-size:contain!important;background-position:center center!important;
  background-repeat:no-repeat!important;background-color:#10161f!important;
  border:1px solid #c8a06a!important;border-radius:8px!important;
}
.av226-screen .av226-reader .focus-data{min-width:0!important;display:flex!important;flex-direction:column!important;gap:9px!important}
.av226-screen .av226-reader .focus-rarity{font:800 12px/1.45 Arial,sans-serif!important;color:#ead1a2!important}
.av226-screen .av226-reader .focus-stat-row{
  display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:4px!important;margin:0!important;
}
.av226-screen .av226-reader .focus-stat-row>span{
  min-width:0!important;padding:8px 2px!important;
  font:900 clamp(14px,1vw,17px)/1.1 Arial,sans-serif!important;
  border-radius:5px!important;
}
.av226-screen .av226-reader .focus-stat-row small{
  font:800 9px/1.1 Arial,sans-serif!important;
  letter-spacing:0!important;margin-bottom:4px!important;
}
.av226-screen .av226-reader .focus-playability,
.av226-screen .av226-reader .focus-field-status{
  font:800 12px/1.45 Arial,sans-serif!important;
  margin:0!important;overflow-wrap:anywhere!important;
}
.av226-screen .av226-reader .focus-abilities{display:flex!important;flex-direction:column!important;gap:10px!important;margin:3px 0 10px!important;min-height:0!important;overflow:visible!important}
.av226-screen .av226-reader .focus-ability{
  border:1px solid #ad8859!important;border-left:3px solid #dfb56f!important;
  background:#28282e!important;padding:12px!important;border-radius:7px!important;
}
.av226-screen .av226-reader .focus-ability h4{
  font:900 13px/1.35 Arial,sans-serif!important;margin:0 0 6px!important;
  overflow-wrap:anywhere!important;
}
.av226-screen .av226-reader .focus-ability p{
  font:600 13px/1.46 Arial,sans-serif!important;
  color:#f2e7d9!important;margin:4px 0!important;
  overflow-wrap:anywhere!important;
}
.av226-screen .av226-reader .focus-footer{
  display:flex!important;gap:9px!important;flex-wrap:wrap!important;
  margin:8px 0 0!important;padding:0 0 8px!important;
}
.av226-screen .av226-reader .focus-footer button{flex:1 1 130px!important;min-height:38px!important;font-size:12px!important}
.av226-screen .av226-reader .focus-empty{font-size:14px!important;line-height:1.55!important}

@media(max-height:780px){
  body:has(.av226-screen) .av226-screen{grid-template-rows:46px minmax(0,1fr) 29px clamp(188px,27dvh,210px)!important}
  .av226-screen{--av241-field-h:min(24.2dvh,calc((100vw - clamp(340px,23vw,405px) - 296px) / 2.95))}
  .av226-screen .av226-minion .av226-minionactions{flex-basis:27px!important;height:27px!important;padding-top:2px!important}
  .av226-screen .av226-enemyrow .av226-rowcenter{padding-top:9px!important}
  .av226-screen .av226-handcard{--av240-hand-h:clamp(124px,calc(27dvh - 62px),148px)!important}
  .av226-screen .av240-collectible .cbottom{height:34%!important;flex-basis:34%!important}
  .av226-screen .av240-collectible .flavor{-webkit-line-clamp:2!important}
  .av226-screen .av226-reader .focus-art{height:156px!important}
}
@media(max-width:1300px){
  .av226-screen .av226-tabletop{padding-right:97px!important}
  .av226-screen .av226-battlerow{grid-template-columns:clamp(82px,8.1vw,108px) minmax(0,1fr)!important;gap:5px!important}
  .av226-screen{--av241-field-h:min(26dvh,calc((100vw - clamp(340px,23vw,405px) - 270px) / 2.95))}
}
@media(max-width:1040px){
  body:has(.av226-screen) .av226-screen{grid-template-columns:minmax(0,1fr)!important}
  .av226-screen{--av241-field-h:min(26dvh,calc((100vw - 225px) / 2.95))}
  .av226-screen .av226-reader{width:min(430px,94vw)!important;right:5px!important;padding:17px!important;border:2px solid #ba985b!important}
  .av226-screen .av226-tabletop{padding-right:97px!important}
}
@media(max-width:720px){
  body:has(.av226-screen) .av226-screen{grid-template-rows:45px minmax(0,1fr) 28px 174px!important}
  .av226-screen .av226-tabletop{padding:4px 69px 4px 4px!important}
  .av226-screen .av226-battlerow{grid-template-columns:64px minmax(0,1fr)!important;gap:2px!important}
  .av226-screen{--av241-field-h:min(20dvh,calc((100vw - 144px) / 2.9))}
  .av226-screen .av226-handcard{--av240-hand-h:105px!important}
  .av226-screen .av240-collectible .ctop strong{font-size:9px!important}
  .av226-screen .av240-collectible .type{font-size:8px!important}
  .av226-screen .av240-collectible .flavor{display:none!important}
  .av226-screen .av226-reader .focus-hero{grid-template-columns:120px minmax(0,1fr)!important;gap:9px!important}
  .av226-screen .av226-reader .focus-art{height:158px!important}
}
@media(prefers-reduced-motion:reduce){
  .av226-screen .av240-collectible{transition:none!important}
}

/* Responsive correction for the confirmed 2560 × 1440 primary monitor.
   Earlier styles inadvertently placed the player rank into the hidden
   midline's zero-height grid track. Keep both ranks in independent rows. */
.av226-screen{
  --av241-sidebar-w:clamp(350px,21vw,545px);
  --av241-header-h:54px;
  --av241-log-h:34px;
  --av241-dock-h:clamp(215px,29dvh,390px);
  --av241-row-buffer:56px;
  --av241-field-h:min(
    32dvh,
    calc((100dvh - var(--av241-header-h) - var(--av241-log-h) - var(--av241-dock-h)) * .5 - var(--av241-row-buffer)),
    calc((100vw - var(--av241-sidebar-w) - 320px) / 2.82)
  );
}
body:has(.av226-screen) .av226-screen{
  grid-template-columns:minmax(0,1fr) var(--av241-sidebar-w)!important;
  grid-template-rows:var(--av241-header-h) minmax(0,1fr) var(--av241-log-h) var(--av241-dock-h)!important;
}
.av226-screen .av226-tabletop{
  display:grid!important;
  grid-template-rows:minmax(0,1fr) 0 minmax(0,1fr)!important;
  min-height:0!important;
  padding:5px 118px 5px 14px!important;
}
.av226-screen .av226-enemyrow{grid-row:1!important;min-height:0!important}
.av226-screen .av226-playerrow{grid-row:3!important;min-height:0!important}
.av226-screen .av226-midline{display:none!important}
.av226-screen .av226-enemyrow .av226-rowcenter{padding-top:18px!important}
.av226-screen .av226-rowcenter{height:100%!important;min-height:0!important}
.av226-screen .av226-fieldcards{height:100%!important;min-height:0!important;align-items:center!important}
.av226-screen .av226-minion{--av240-h:var(--av241-field-h)!important}
.av226-screen .av240-empty-slot{
  height:var(--av241-field-h)!important;
  width:calc(var(--av241-field-h) * .705)!important;
  flex:0 0 calc(var(--av241-field-h) * .705)!important;
  max-height:none!important;
}
/* Give the collector card its genuine portrait proportions in both areas. */
.av226-screen .av226-handcard{
  --av240-hand-h:calc(var(--av241-dock-h) - 70px)!important;
  --av240-hand-w:min(calc(var(--av240-hand-h) * .705),calc((100vw - 72px) / var(--av226-count) - 12px))!important;
  flex:0 1 var(--av240-hand-w)!important;
  width:var(--av240-hand-w)!important;
  max-width:var(--av240-hand-w)!important;
}
.av226-screen .av240-collectible .ctop strong{
  font-size:clamp(11px,calc(var(--av241-field-h) * .042),21px)!important;
}
.av226-screen .av240-collectible .type,
.av226-screen .av240-collectible .flavor{
  font-size:clamp(9px,calc(var(--av241-field-h) * .032),16px)!important;
}
.av226-screen .av240-collectible .serial{
  font-size:clamp(8px,calc(var(--av241-field-h) * .024),11px)!important;
}
.av226-screen .av240-collectible .ctop{height:15%!important;flex-basis:15%!important}
.av226-screen .av240-collectible .cbottom{height:34%!important;flex-basis:34%!important}
.av226-screen .av240-collectible .flavor{-webkit-line-clamp:4!important}
.av226-screen .av240-collectible .type{line-height:1.28!important}
.av226-screen .av240-collectible .flavor{line-height:1.25!important}
.av226-screen .av226-reader{
  padding:18px 22px 26px!important;
  overscroll-behavior:contain;
}
.av226-screen .av226-reader .focus-art{height:clamp(178px,23dvh,310px)!important}
.av226-screen .av226-reader .focus-ability p{font-size:clamp(13px,.66vw,17px)!important;line-height:1.54!important}
.av226-screen .av226-reader .focus-ability h4{font-size:clamp(13px,.66vw,17px)!important}
.av226-screen .av226-reader .focus-heading h3{font-size:clamp(19px,1vw,27px)!important}
.av226-screen .av226-reader .focus-stat-row>span{font-size:clamp(15px,.88vw,21px)!important}
.av226-screen .av226-reader .focus-rarity{font-size:clamp(12px,.58vw,15px)!important}
.av226-screen .av226-reader .focus-playability,
.av226-screen .av226-reader .focus-field-status{font-size:clamp(12px,.64vw,16px)!important}
.av226-screen .av226-reader .focus-footer{position:relative!important;inset:auto!important}
@media(min-width:1900px) and (min-height:940px){
  .av226-screen .av226-reader .focus-hero{
    grid-template-columns:minmax(200px,1fr) minmax(0,1fr)!important;
    gap:17px!important;
  }
  .av226-screen .av226-reader .focus-art{height:min(28dvh,340px)!important}
  .av226-screen .av226-reader .focus-ability{padding:15px!important}
  .av226-screen .av226-handcard .av240-collectible .ctop strong{font-size:clamp(12px,.92vw,17px)!important}
  .av226-screen .av226-handcard .av240-collectible .type,
  .av226-screen .av226-handcard .av240-collectible .flavor{font-size:clamp(10px,.65vw,13px)!important}
}
@media(max-height:900px){
  .av226-screen{
    --av241-header-h:46px;
    --av241-log-h:30px;
    --av241-dock-h:clamp(165px,24dvh,216px);
    --av241-row-buffer:52px;
  }
  .av226-screen .av226-tabletop{padding-top:4px!important;padding-bottom:4px!important}
  .av226-screen .av226-enemyrow .av226-rowcenter{padding-top:14px!important}
  .av226-screen .av240-collectible .cbottom{height:31%!important;flex-basis:31%!important}
  .av226-screen .av240-collectible .flavor{-webkit-line-clamp:2!important}
  .av226-screen .av226-reader{padding:12px 15px 18px!important}
}
@media(max-width:1300px){
  .av226-screen .av226-tabletop{padding-right:98px!important}
  .av226-screen{--av241-sidebar-w:350px;--av241-field-h:min(31dvh,calc((100dvh - var(--av241-header-h) - var(--av241-log-h) - var(--av241-dock-h)) * .5 - var(--av241-row-buffer)),calc((100vw - 350px - 270px) / 2.82))}
  .av226-screen .av226-reader .focus-hero{grid-template-columns:1fr!important}
  .av226-screen .av226-reader .focus-art{height:clamp(115px,18dvh,178px)!important}
  .av226-screen .av226-reader .focus-stat-row>span{padding:6px 2px!important}
}
@media(max-width:1040px){
  .av226-screen{--av241-sidebar-w:0px;--av241-field-h:min(31dvh,calc((100dvh - var(--av241-header-h) - var(--av241-log-h) - var(--av241-dock-h)) * .5 - var(--av241-row-buffer)),calc((100vw - 235px) / 2.82))}
  body:has(.av226-screen) .av226-screen{grid-template-columns:minmax(0,1fr)!important}
  .av226-screen .av226-reader{width:min(450px,96vw)!important;right:4px!important}
  .av226-screen .av226-tabletop{padding-right:92px!important}
}
@media(max-width:720px){
  .av226-screen{--av241-header-h:46px;--av241-log-h:28px;--av241-dock-h:175px;--av241-row-buffer:34px;--av241-field-h:min(25dvh,calc((100dvh - var(--av241-header-h) - var(--av241-log-h) - var(--av241-dock-h)) * .5 - var(--av241-row-buffer)),calc((100vw - 125px) / 2.82))}
  .av226-screen .av226-tabletop{padding:4px 70px 4px 4px!important}
  .av226-screen .av226-battlerow{grid-template-columns:62px minmax(0,1fr)!important}
  .av226-screen .av226-fieldcards{gap:3px!important}
  .av226-screen .av240-collectible .ctop strong{font-size:9px!important}
  .av226-screen .av240-collectible .type{font-size:8px!important}
  .av226-screen .av240-collectible .flavor{display:none!important}
  .av226-screen .av226-reader .focus-hero{grid-template-columns:120px minmax(0,1fr)!important}
}

/* Short displays need a usable hand and two complete creature ranks. */
@media(max-height:900px){
  .av226-screen{
    --av241-dock-h:clamp(205px,31dvh,248px);
    --av241-row-buffer:33px;
  }
  .av226-screen .av226-minion .av226-minionactions{flex-basis:29px!important;height:29px!important}
  .av226-screen .av226-minion .av226-minionactions button{height:24px!important}
  .av226-screen .av226-reader .focus-art{height:clamp(125px,17dvh,178px)!important}
}
@media(max-width:720px){
  .av226-screen{--av241-dock-h:clamp(169px,28dvh,212px);--av241-row-buffer:29px}
  .av226-screen .av226-handcard{--av240-hand-h:calc(var(--av241-dock-h) - 64px)!important}
}
/* Never let the action footer cover an ability card. The reader scrolls as
   one cohesive document on shorter and narrower screens. */
.av226-screen .av226-reader .focus-heading,
.av226-screen .av226-reader .focus-hero,
.av226-screen .av226-reader .focus-data,
.av226-screen .av226-reader .focus-abilities,
.av226-screen .av226-reader .focus-ability,
.av226-screen .av226-reader .focus-footer{
  flex-shrink:0!important;
}
.av226-screen .av226-reader .focus-abilities{
  flex:0 0 auto!important;
  min-height:max-content!important;
  overflow:visible!important;
}
.av226-screen .av226-reader .focus-ability{height:auto!important}
.av226-screen .av226-reader .focus-footer{
  position:static!important;
  flex:0 0 auto!important;
  margin:12px 0 0!important;
  padding:8px 0 16px!important;
  z-index:auto!important;
}
