/* Three chosen cards share one row; this intentionally outranks the v33 two-card layout. */
body .magic-deck-builder .magic-deck-expanded-selection>.magic-deck-slots{
 display:grid;
 grid-template-columns:repeat(3,minmax(0,1fr));
 column-gap:16px;
 row-gap:0;
 align-items:start;
 min-width:0;
}
body .magic-deck-builder .magic-deck-expanded-selection>.magic-deck-slots:focus-visible{
 outline:2px solid #93efdd;
 outline-offset:5px;
 border-radius:12px;
}
body .magic-deck-builder .magic-deck-expanded-selection .magic-deck-slot{
 min-width:0;
 scroll-snap-align:start;
}
body .magic-deck-builder .magic-deck-expanded-selection .magic-deck-featured-heading{
 min-height:44px;
 padding:0 2px 10px;
 box-sizing:border-box;
}
body .magic-deck-builder .magic-deck-expanded-selection .magic-card-header{
 min-height:108px;
 padding:14px 12px;
 align-items:center;
}
body .magic-deck-builder .magic-deck-expanded-selection .magic-card-header>span:not(.magic-card-cost){min-width:0}
body .magic-deck-builder .magic-deck-expanded-selection .magic-card-header strong{
 font-size:clamp(24px,2.2vw,35px);
 line-height:1.08;
 overflow-wrap:anywhere;
}
body .magic-deck-builder .magic-deck-expanded-selection .magic-card-header small{
 font-size:11px;
 line-height:1.35;
 margin-top:7px;
}
body .magic-deck-builder .magic-deck-expanded-selection .magic-card-art{
 height:clamp(190px,19vw,280px);
}
body .magic-deck-builder .magic-deck-expanded-selection .magic-card-footer{
 min-height:88px;
 box-sizing:border-box;
}
body .magic-deck-builder .magic-deck-expanded-selection .magic-deck-slot.is-empty{
 align-self:stretch;
 flex-direction:column;
 text-align:center;
 min-height:420px;
}

/* Shared tracks align names, portraits and stats even when one name wraps. */
@supports(grid-template-rows:subgrid){
 body .magic-deck-builder .magic-deck-expanded-selection>.magic-deck-slots{align-items:stretch}
 body .magic-deck-builder .magic-deck-expanded-selection>.magic-deck-slots>.magic-deck-slot{
  grid-row:span 5;
 }
 body .magic-deck-builder .magic-deck-expanded-selection>.magic-deck-slots>.magic-deck-slot.is-filled{
  display:grid;
  grid-template-rows:subgrid;
  row-gap:0;
 }
 body .magic-deck-builder .magic-deck-expanded-selection .magic-deck-slot.is-filled>.magic-card{
  display:grid;
  grid-row:span 4;
  grid-template-rows:subgrid;
  row-gap:0;
 }
 body .magic-deck-builder .magic-deck-expanded-selection .magic-deck-slot.is-filled>.magic-card>.magic-card-face{
  display:grid;
  grid-row:span 3;
  grid-template-rows:subgrid;
  row-gap:0;
  min-width:0;
 }
 body .magic-deck-builder .magic-deck-expanded-selection .magic-card-attributes{align-self:start}
}
@media(max-width:1050px){
 body .magic-deck-builder .magic-deck-expanded-selection>.magic-deck-slots{column-gap:10px}
 body .magic-deck-builder .magic-deck-expanded-selection .magic-card-header{padding:12px 9px;min-height:114px;gap:7px}
 body .magic-deck-builder .magic-deck-expanded-selection .magic-card-header strong{font-size:25px}
 body .magic-deck-builder .magic-deck-expanded-selection .magic-deck-featured-remove{padding:6px 8px;font-size:11px}
}
@media(max-width:760px){
 body .magic-deck-builder .magic-deck-expanded-selection>.magic-deck-slots{
  grid-template-columns:repeat(3,minmax(250px,1fr));
  overflow-x:auto;
  overscroll-behavior-x:contain;
  scroll-snap-type:x proximity;
  scroll-padding-inline:2px;
  scrollbar-color:#8d6ab0 #1d1729;
  padding:3px 2px 12px;
 }
 body .magic-deck-builder .magic-deck-expanded-selection .magic-deck-featured-heading{width:100%}
 body .magic-deck-builder .magic-deck-expanded-selection .magic-card-header{min-height:108px}
 body .magic-deck-builder .magic-deck-expanded-selection .magic-card-art{height:220px}
 body .magic-deck-builder .magic-deck-expanded-selection .magic-deck-slot.is-empty{min-height:420px}
}
