/* Ludicera v38.19 – Aces Up, Australian Patience, Baker's Dozen */
.new-game-table{width:min(1320px,100%)!important;margin:0 auto}
.new-game-table .felt{min-height:570px;grid-template-rows:auto 350px 48px}
.au-top,.ap-top,.bd-top{display:flex;align-items:flex-start;gap:var(--ludicera-card-gap,14px);width:max-content;max-width:100%;margin:0 auto 10px;position:relative;z-index:1}
.ap-top{justify-content:center}.bd-top{justify-content:center}
.ng-foundations{display:grid;grid-template-columns:repeat(4,var(--ludicera-card-width,76px));gap:var(--ludicera-card-gap,14px);width:max-content}
.ng-slot{box-sizing:border-box;width:var(--ludicera-card-width,76px);height:var(--ludicera-card-height,108px);border:1px dashed #ffffff80;border-radius:5px;background:transparent;color:#e6f0dc;display:grid;place-items:center;position:relative;overflow:visible;font-size:14px}
.au-discard{grid-template-rows:auto auto;align-content:center;gap:4px}.au-discard span{font:700 24px Georgia,serif}.au-discard small{font-size:10px}
#au-columns{grid-template-columns:repeat(4,var(--ludicera-card-width,76px))!important}
#ap-columns{grid-template-columns:repeat(7,var(--ludicera-card-width,76px))!important}
#bd-columns{grid-template-columns:repeat(13,var(--ludicera-card-width,76px))!important}
:is(#au-columns,#ap-columns,#bd-columns){display:grid!important;column-gap:var(--ludicera-card-gap,14px)!important;width:max-content!important;max-width:none!important;margin-left:auto!important;margin-right:auto!important;align-self:start!important}
:is(#au-columns,#ap-columns,#bd-columns)>.column{box-sizing:border-box!important;width:var(--ludicera-card-width,76px)!important;min-width:var(--ludicera-card-width,76px)!important;max-width:var(--ludicera-card-width,76px)!important;position:relative}
:is(#au-columns,#ap-columns,#bd-columns)>.column>.playing-card,.new-game-table .ng-slot>.playing-card{box-sizing:border-box!important;width:var(--ludicera-card-width,76px)!important;min-width:var(--ludicera-card-width,76px)!important;max-width:var(--ludicera-card-width,76px)!important;height:var(--ludicera-card-height,108px)!important;min-height:var(--ludicera-card-height,108px)!important;max-height:var(--ludicera-card-height,108px)!important}
#bd-table .table-scroll{overflow-x:auto}
#bd-table .felt{min-width:max-content;padding-left:26px;padding-right:26px}
#bd-table .bd-top{min-width:100%;justify-content:center}
.new-game-table .column.drop-target,.new-game-table .ng-slot.drop-target{outline:2px solid #d7b967!important;outline-offset:-2px;background:#e8dba013!important}
.new-game-table .new-game-help{line-height:1.55}
@media(max-width:700px),(max-width:1000px) and (max-height:500px){
 .new-game-table .felt{min-height:440px;grid-template-rows:auto 270px 48px}
 .au-top,.ap-top,.bd-top,.ng-foundations{gap:3px}
 #au-columns,#ap-columns,#bd-columns{column-gap:3px!important;margin-left:0!important;margin-right:0!important}
 #bd-table .felt{padding-left:8px;padding-right:8px}
 .new-game-table .ng-slot{width:auto;min-width:0;height:auto;aspect-ratio:39/61;font-size:10px}
}

/* v38.20 – make the three new games use the same felt/top-row layout as the established games. */
@media(min-width:701px) and (min-height:501px){
  /* Keep the top row full-width, but keep its card groups compact instead of centering/stretching them. */
  #au-table .au-top,
  #ap-table .ap-top,
  #bd-table .bd-top{
    display:flex!important;
    align-items:flex-start!important;
    width:100%!important;
    max-width:none!important;
    margin:0 0 32px!important;
    gap:var(--ludicera-card-gap,14px)!important;
  }

  /* Aces Up: stock + removed pile stay together on the left. */
  #au-table .au-top{
    justify-content:flex-start!important;
  }

  /* Australian Patience: stock + waste left, 4 foundations compact on the right. */
  #ap-table .ap-top{
    justify-content:flex-start!important;
  }
  #ap-table #ap-foundations{
    margin-left:auto!important;
  }

  /* Baker's Dozen: the 4 foundations form one compact group on the right. */
  #bd-table .bd-top{
    justify-content:flex-end!important;
  }
  #bd-table #bd-foundations{
    margin-left:auto!important;
  }

  #ap-table #ap-foundations,
  #bd-table #bd-foundations{
    display:grid!important;
    grid-template-columns:repeat(4,var(--ludicera-card-width,76px))!important;
    gap:var(--ludicera-card-gap,14px)!important;
    width:max-content!important;
    max-width:100%!important;
    justify-content:start!important;
    justify-items:center!important;
  }

  /* Top slots/cards use exactly the same physical size as the cards below. */
  #au-table .ng-slot,
  #ap-table .ng-slot,
  #bd-table .ng-slot{
    width:var(--ludicera-card-width,76px)!important;
    min-width:var(--ludicera-card-width,76px)!important;
    max-width:var(--ludicera-card-width,76px)!important;
    height:var(--ludicera-card-height,108px)!important;
    min-height:var(--ludicera-card-height,108px)!important;
    max-height:var(--ludicera-card-height,108px)!important;
  }
}
