/* Preparation cards use their illustration's proportions, never leftover viewport height.
   Keep scrolling on the board; the existing action dock remains outside it. */
#paktweber215 #app[data-game-active=true] .ui-preparation .arena-board{
  grid-template-rows:none;
  grid-auto-rows:max-content;
  align-content:start;
  align-items:start;
  row-gap:12px;
}
#paktweber215 #app[data-game-active=true] .ui-preparation .arena-board>:is(.market-column,.team-column){
  width:100%;max-width:none;height:auto;min-height:0;
  align-self:start;justify-self:center;
}
#paktweber215 #app[data-game-active=true] .ui-preparation :is(.market,.team){
  display:flex;flex:none;flex-direction:column;
  width:100%;height:auto;min-height:0;box-sizing:border-box;
}
#paktweber215 #app[data-game-active=true] .ui-preparation .market{
  max-width:462px;align-self:center;
}
#paktweber215 #app[data-game-active=true] .ui-preparation .arena-board>.team-column{
  max-width:774px;
}
#paktweber215 #app[data-game-active=true] .ui-preparation :is(.market .offers,.team>.roster){
  display:grid;flex:none;width:100%;height:auto;min-height:0;
  grid-template-rows:auto;grid-auto-rows:auto;
  gap:6px;align-items:stretch;justify-content:center;
}
#paktweber215 #app[data-game-active=true] .ui-preparation .market .offers{
  grid-template-columns:repeat(3,minmax(0,150px));
}
#paktweber215 #app[data-game-active=true] .ui-preparation .team>.roster{
  grid-template-columns:repeat(5,minmax(0,150px));
}
#paktweber215 #app[data-game-active=true] .ui-preparation :is(.market .offer,.team>.roster>.unit){
  display:flex;flex-direction:column;align-self:stretch;
  grid-column:auto;grid-row:auto;width:100%;height:auto;min-height:0;min-width:0;
  box-sizing:border-box;
}
#paktweber215 #app[data-game-active=true] .ui-preparation :is(.market .offer>.art,.team>.roster>.unit>.portrait){
  position:relative;display:block;flex:none!important;
  width:100%;height:auto!important;min-height:0!important;max-height:none;
  aspect-ratio:2/3!important;box-sizing:border-box;
}
#paktweber215 #app[data-game-active=true] .ui-preparation :is(.market .offer>.art,.team>.roster>.unit>.portrait)>.card-art-image{
  position:absolute!important;inset:0!important;
  width:100%!important;height:100%!important;
  object-fit:contain!important;object-position:center top!important;
}
#paktweber215 #app[data-game-active=true] .ui-preparation :is(.offer>.body,.team>.roster>.unit>.unit-body){
  box-sizing:border-box;width:100%;min-width:0;flex:none;
}
#paktweber215 #app[data-game-active=true] .ui-preparation .team>.roster>.unit .name{
  font-size:clamp(10px,1.4vw,12px);line-height:1.2;
  white-space:normal;overflow-wrap:anywhere;min-height:2.4em;
}
#paktweber215 #app[data-game-active=true] .ui-preparation .team>.roster>.arena-empty-slot{
  box-sizing:border-box;grid-column:auto;grid-row:auto;width:100%;
  height:auto;min-height:0!important;aspect-ratio:auto;align-self:stretch;
}
#paktweber215 #app[data-game-active=true] .ui-preparation .market .offer.empty{
  min-height:200px;justify-content:center;gap:8px;
}
/* Labels sit on parchment; card captions keep their existing dark surface. */
#paktweber215 #app[data-game-active=true] .ui-preparation :is(.ui-preparation-label,.market-heading h2,.market-heading>div>span,.team>.panel-title h2,.reserve-heading,.reserve-heading h3,.reserve-heading>span,.formation-direction-label,.formation-direction-label>span,.reserve-empty){
  color:#385344;text-shadow:none;
}
#paktweber215 #app[data-game-active=true] .ui-preparation .band-help{
  background:#f5f0da;color:#385344;border-color:#a6b39a;
}
#paktweber215 #app[data-game-active=true]:is([data-phase=draft],[data-phase=prepare]) .hud .metric:not(.rune-metric)>span{
  color:#385344;text-shadow:none;
}
