/* V20.11.38: master-card responsive typography and study-card stat density fix. */
.v201137-card-copy{min-width:0;}
.v201137-card-copy p{display:flex;flex-wrap:wrap;align-items:center;gap:2px 5px;margin:4px 0 0;}
.v201137-cost-nowrap{white-space:nowrap!important;word-break:keep-all!important;}

/* The card component changes typography by its own rendered width, not by screen-specific font shrinking. */
@container (max-width:125px){
  .pmc-card-frame .pmc-team-name{font-size:1.08em!important;letter-spacing:-.025em!important;}
  .pmc-card-frame .pmc-age-badge b{font-size:1.24em!important;}
  .pmc-card-frame .pmc-age-badge small{font-size:.43em!important;}
  .pmc-card-frame .pmc-action-badge b{font-size:1.70em!important;}
  .pmc-card-frame .pmc-action-badge small{font-size:.47em!important;}
  .pmc-card-frame .pmc-name span{display:none!important;}
  .pmc-card-frame .pmc-name b{font-size:1.58em!important;line-height:.94!important;}
  .pmc-card-frame .pmc-name-long b{font-size:1.43em!important;}
  .pmc-card-frame .pmc-name-xlong b{font-size:1.26em!important;}
  .pmc-card-frame .pmc-stat-label{font-size:.68em!important;letter-spacing:-.04em!important;}
  .pmc-card-frame .pmc-stat-value{font-size:.80em!important;}
  .pmc-card-frame .pmc-cost-label{font-size:.92em!important;}
  .pmc-card-frame .pmc-cost-number{font-size:1.55em!important;}
  .pmc-card-frame .pmc-type-ribbon{font-size:.66em!important;letter-spacing:.02em!important;}
}
@container (min-width:126px) and (max-width:165px){
  .pmc-card-frame .pmc-team-name{font-size:1.14em!important;}
  .pmc-card-frame .pmc-name b{font-size:1.52em!important;}
  .pmc-card-frame .pmc-name-long b{font-size:1.36em!important;}
  .pmc-card-frame .pmc-name-xlong b{font-size:1.18em!important;}
  .pmc-card-frame .pmc-name span{font-size:.50em!important;}
  .pmc-card-frame .pmc-stat-label{font-size:.76em!important;}
  .pmc-card-frame .pmc-stat-value{font-size:.88em!important;}
  .pmc-card-frame .pmc-cost-number{font-size:1.68em!important;}
}

/* Readable full-card contexts. */
.v1850-card-preview,.v1844-preview,.v1857-card-preview{align-self:start;overflow:visible!important;}
.v1850-card-preview .pmc-card-frame,.v1844-preview .pmc-card-frame,.v1857-card-preview .pmc-card-frame{margin-inline:auto!important;}
.v1850-study-info,.v1844-upgrade-info,.v1857-group-info{min-width:0!important;}
.v1850-study-name p,.v1844-name-row p,.v1857-group-title p{overflow-wrap:anywhere;}

/* Study preview is a compact full card. Keep the six rows, but reserve real width for the bar.
   Bonus breakdown is already available in the study information panel, so the micro-card shows only final values. */
#study .v1850-card-preview .pmc-stats{
  top:66.55%!important;height:24.75%!important;
  padding:.30em .40em .26em!important;gap:0!important;
}
#study .v1850-card-preview .pmc-stat{
  grid-template-columns:15.2% minmax(0,1fr) 15.8%!important;
  column-gap:1.15%!important;min-width:0!important;
}
#study .v1850-card-preview .pmc-stat-label{
  min-width:0!important;font-size:.66em!important;line-height:1!important;
  letter-spacing:-.065em!important;overflow:hidden!important;text-overflow:clip!important;
}
#study .v1850-card-preview .pmc-stat-track{
  min-width:0!important;height:.48em!important;min-height:.30em!important;
  border-width:.055em!important;
}
#study .v1850-card-preview .pmc-stat-value{
  min-width:0!important;width:100%!important;display:flex!important;
  align-items:center!important;justify-content:flex-end!important;
  gap:0!important;font-size:.72em!important;line-height:1!important;
  letter-spacing:-.035em!important;text-align:right!important;overflow:hidden!important;
}
#study .v1850-card-preview .pmc-stat-value small{display:none!important;}

@media(max-width:380px){
  
  
  #study .v1850-card-preview .pmc-stat-label{font-size:.63em!important;}
  #study .v1850-card-preview .pmc-stat-value{font-size:.68em!important;}
}

/* Lineup uses true thumbnails: unreadable micro text is removed and the external slot label carries the name. */
#order .v1872-mini-card .pmc-card-frame{container-type:normal!important;aspect-ratio:2/3!important;}
#order .v1872-mini-card .pmc-topbar,
#order .v1872-mini-card .pmc-age-badge,
#order .v1872-mini-card .pmc-type-ribbon,
#order .v1872-mini-card .pmc-action-badge,
#order .v1872-mini-card .pmc-namebar,
#order .v1872-mini-card .pmc-type-tag,
#order .v1872-mini-card .pmc-stats,
#order .v1872-mini-card .pmc-costbar,
#order .v1872-mini-card .pmc-status-stack{display:none!important;}
#order .v1872-mini-card .pmc-photo{left:7%!important;right:7%!important;top:7%!important;bottom:7%!important;height:auto!important;border-radius:8%!important;}
#order .v1872-mini-card .pmc-player-img{width:100%!important;height:100%!important;object-fit:contain!important;object-position:center bottom!important;}
#order .v1872-mini-card .pmc-frame-edge{filter:none!important;}
#order .v1872-field-label{line-height:1.18!important;white-space:normal!important;word-break:keep-all!important;font-size:8.4px!important;}
#order .v1872-field-label small{font-size:7px!important;line-height:1.15!important;}
.v20919-result-card>b{font-size:11px!important;line-height:1.2!important;}
.v20919-result-card>span{font-size:9px!important;line-height:1.2!important;}

@media(max-width:760px){
  #study .v1850-study-grid,#enhancement .v1844-upgrade-grid,#recycle .v1857-grid{grid-template-columns:1fr!important;}
  #study .v1850-study-card,#enhancement .v1844-upgrade-item,#recycle .v1857-group{width:100%!important;max-width:100%!important;box-sizing:border-box!important;}
  #study .v1850-study-name .v1850-badge{font-size:9px;padding:4px 7px;white-space:nowrap;}
  #study .v1852-study-reason{font-size:10px;line-height:1.45;}
  #enhancement .v1844-name-row h3{white-space:normal;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-height:1.15;}
  #enhancement .v1844-name-row p{font-size:10px;line-height:1.35;}
  #recycle .v1857-safe-count{font-size:9px;padding:4px 6px;white-space:nowrap;}
  .v20919-result-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;}
  .v20919-result-card .pmc-card-frame{max-width:158px!important;}
}
@media(max-width:380px){
  #study .v1850-study-card{grid-template-columns:136px minmax(0,1fr)!important;gap:8px!important;padding:8px!important;}
  #study .v1850-card-preview .pmc-card-frame{max-width:136px!important;}
  #study .v1850-study-name h3{font-size:15px!important;}
  #study .v1850-study-name p{font-size:9px!important;}
  #study .v1850-actions{grid-template-columns:1fr!important;}
  #enhancement .v1844-upgrade-item{grid-template-columns:122px minmax(0,1fr)!important;padding:8px!important;}
  #enhancement .v1844-preview .pmc-card-frame{max-width:122px!important;}
  #recycle .v1857-group{grid-template-columns:1fr!important;}
  #recycle .v1857-card-preview{width:148px!important;margin:0 auto!important;}
  #recycle .v1857-card-preview .pmc-card-frame{width:148px!important;min-width:148px!important;max-width:148px!important;}
}
