/* Aether Vault 3.11.245 — safe hand / readable reader.  Presentation only.
   The Collector card component and gameplay are deliberately unchanged. */

/* Restore room for the existing full-size hand cards rather than reducing
   their scale.  The board's field-card size automatically adapts to this. */
@media(min-width:1150px) and (max-height:900px){
  .av226-screen{--av241-dock-h:clamp(220px,calc(31dvh + 16px),264px)}
}
@media(min-width:1500px) and (min-height:901px){
  .av226-screen{--av241-dock-h:clamp(230px,calc(29dvh + 16px),406px)}
}

/* The hand gets its own measured height below the label.  Previously the
   full portrait could start behind YOUR HAND because card + button + padding
   exceeded the flex track at certain viewport heights and browser zooms. */
.av226-screen .av226-handdock{
  display:flex!important;
  flex-direction:column!important;
  gap:0!important;
  padding:7px 14px 10px!important;
  min-height:0!important;
  overflow:hidden!important;
}
.av226-screen .av226-handhead{
  position:relative!important;
  z-index:1;
  flex:0 0 28px!important;
  height:28px!important;
  min-height:28px!important;
  padding:0 1px 3px!important;
  margin:0!important;
  align-items:center!important;
}
.av226-screen .av226-hand{
  display:flex!important;
  position:relative!important;
  z-index:0;
  flex:1 1 0!important;
  min-height:0!important;
  height:auto!important;
  align-items:flex-start!important;
  justify-content:center!important;
  gap:clamp(7px,.9vw,14px)!important;
  padding:6px 5px 0!important;
  margin:0!important;
  overflow:hidden!important;
}
.av226-screen .av226-handcard{
  /* Reserve 28px for YOUR HAND, 28px for Play, and safe padding/gaps.
     This is the maximum card size that physically fits inside the dock. */
  --av240-hand-h:max(92px,calc(var(--av241-dock-h) - 86px))!important;
  --av240-hand-w:min(calc(var(--av240-hand-h) * .705),calc((100vw - 92px) / 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;
  min-width:0!important;
  height:100%!important;
  max-height:100%!important;
  align-self:flex-start!important;
  padding:0!important;
  gap:4px!important;
  margin:0!important;
  transform:none!important;
  translate:0 0!important;
  overflow:visible!important;
}
.av226-screen .av226-handcard:hover,
.av226-screen .av226-handcard:focus-within,
.av226-screen .av226-handcard.selected{
  transform:none!important;
  translate:0 0!important;
}
.av226-screen .av226-handpick{
  flex:1 1 0!important;
  min-height:0!important;
  max-height:calc(var(--av241-dock-h) - 86px)!important;
  width:100%!important;
  overflow:visible!important;
  padding:0!important;
}
.av226-screen .av240-handface{
  display:flex!important;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  justify-content:center!important;
  align-items:flex-start!important;
  overflow:visible!important;
}
.av226-screen .av240-handface > .av240-collectible.card{
  display:block!important;
  aspect-ratio:.705!important;
  width:100%!important;
  height:auto!important;
  max-height:calc(var(--av241-dock-h) - 86px)!important;
  margin:0!important;
}
.av226-screen .av226-playbutton{
  flex:0 0 27px!important;
  height:27px!important;
  min-height:27px!important;
  margin:0!important;
}

/* A little breathing room between bottom of the field and the hand dock.
   Do not scale down or restyle collectible cards. */
.av226-screen .av226-playerrow .av226-rowcenter{padding-bottom:9px!important}

/* Right-side ability text remains reachable, even on a short window.
   The scrollbar is deliberately visible rather than hiding the second power. */
.av226-screen .av226-reader{
  height:100%!important;
  max-height:100%!important;
  min-height:0!important;
  overflow-x:hidden!important;
  overflow-y:scroll!important;
  scrollbar-width:auto!important;
  scrollbar-color:#b6925e #201e24!important;
  scrollbar-gutter:stable!important;
  padding-bottom:34px!important;
  overscroll-behavior:contain;
}
.av226-screen .av226-reader::-webkit-scrollbar{width:11px}
.av226-screen .av226-reader::-webkit-scrollbar-track{background:#201e24}
.av226-screen .av226-reader::-webkit-scrollbar-thumb{background:#a68658;border:2px solid #201e24;border-radius:9px}
.av226-screen .av226-reader .focus-abilities,
.av226-screen .av226-reader .focus-ability,
.av226-screen .av226-reader .focus-footer{
  height:auto!important;
  min-height:0!important;
  overflow:visible!important;
  flex-shrink:0!important;
}

@media(max-height:680px){
  .av226-screen .av226-handdock{padding:5px 9px 7px!important}
  .av226-screen .av226-handhead{flex-basis:25px!important;height:25px!important;min-height:25px!important}
  .av226-screen .av226-hand{padding-top:4px!important}
  .av226-screen .av226-handcard{
    --av240-hand-h:max(84px,calc(var(--av241-dock-h) - 76px))!important;
  }
  .av226-screen .av226-handpick,
  .av226-screen .av240-handface > .av240-collectible.card{
    max-height:calc(var(--av241-dock-h) - 76px)!important;
  }
}
@media(prefers-reduced-motion:reduce){
  .av226-screen .av226-handcard{transition:none!important}
}
