/* V129 – premium Memory finish: legible illustrations, no stretched cards or duplicate caption. */
#app .memory127-page .memory127-choice span{display:none!important}
#app .memory127-page .memory127-choice{gap:0!important}
#app .memory127-page .memory127-choices{align-items:center!important}
@media(orientation:portrait){
 #app .memory127-page.memory127-game:has(.memory127-card:nth-child(2):last-child){
  justify-content:center!important;
 }
 #app .memory127-page.memory127-game:has(.memory127-card:nth-child(4):last-child){
  justify-content:center!important;
 }
}
@media(orientation:landscape){
 #app .memory127-page.memory127-game .memory127-grid:has(>.memory127-card:nth-child(20):last-child){
  grid-template-columns:repeat(7,minmax(0,1fr))!important;
  grid-template-rows:repeat(3,minmax(0,1fr))!important;
  width:min(100%,515px)!important;
  height:96%!important;
 }
 #app .memory127-page.memory127-game .memory127-grid:has(>.memory127-card:nth-child(18):last-child),
 #app .memory127-page.memory127-game .memory127-grid:has(>.memory127-card:nth-child(16):last-child),
 #app .memory127-page.memory127-game .memory127-grid:has(>.memory127-card:nth-child(14):last-child){
  grid-template-columns:repeat(6,minmax(0,1fr))!important;
  grid-template-rows:repeat(3,minmax(0,1fr))!important;
  width:min(100%,470px)!important;
  height:96%!important;
 }
 #app .memory127-page.memory127-game .memory127-grid:has(>.memory127-card:nth-child(12):last-child){
  grid-template-columns:repeat(6,minmax(0,1fr))!important;
  grid-template-rows:repeat(2,minmax(0,1fr))!important;
  width:min(100%,490px)!important;
  height:78%!important;
 }
}

/* Two first-round cards keep the real portrait proportions instead of becoming narrow strips. */
@media(orientation:portrait){
 #app .memory127-page.memory127-game .memory127-grid:has(>.memory127-card:nth-child(2):last-child){
   width:min(90%,320px)!important;
   height:clamp(160px,26vh,205px)!important;
   max-height:33%!important;
   grid-template-columns:repeat(2,minmax(0,1fr))!important;
   grid-template-rows:1fr!important;
 }
}
