/* 0.22.1 — targeted readability and containment fixes; preserve the duel grid. */
/* A flex/grid child must be allowed to shrink before its table can scroll. */
#stats-content,#stats-content>.panel,.stats-content-table,.player-directory,
.league-history-panel,.stats-overview-grid>.panel{min-width:0;max-width:100%;box-sizing:border-box}
.table-wrap{max-width:100%;box-sizing:border-box}
/* The old generic sticky rule also pinned row headings over matrix content. */
#stats-content .table-wrap tbody th{position:static;z-index:auto;text-align:left}
#stats-content .table-wrap thead th{position:sticky;top:0;z-index:2;background:var(--surface)}
#stats-content .matchup-matrix tbody th .link-button{text-align:left;white-space:normal;line-height:1.4;font-size:inherit}
/* Filter labels share padding and line-height; long choices can use available
   space without forcing a whole page beyond the viewport. */
#main .filters label{line-height:1.4}
#main .filters select,#main .filters input:not([type=checkbox]):not([type=radio]):not([type=range]){box-sizing:border-box;min-height:36px;padding:7px 10px;line-height:1.4}
#main .filters select{padding-right:30px}
#main .sideboard-view-controls select{width:auto!important;min-width:150px!important;font-size:14px!important}
/* 1080p-class workspaces: readable chart legends, labels and table rows. */
@media(min-width:1400px) and (min-height:850px){
 #main th,#main td{font-size:14px;line-height:1.45;padding:10px 12px}
 #stats-content .panel>.matchup-matrix th,#stats-content .panel>.matchup-matrix td{font-size:14px;padding:10px 12px}
 #main .stats-overview-grid svg text{font-size:13px!important}
 #main .stats-overview-grid .chart-legend button{font-size:13px;line-height:1.4;min-height:30px}
 #main .stats-overview-grid .analytics-chart{grid-template-columns:minmax(0,1fr) minmax(150px,22%);gap:8px 14px}
 #main .stats-overview-grid .chart-values,#main .stats-overview-grid .chart-readout{font-size:13px;line-height:1.4}
 #main .duel-chain-preference,#main .duel-hand-controls label,#main .sideboard-view-controls label{font-size:13px!important;line-height:1.4}
 #main .duel-log-panel .event-log{font-size:14px;line-height:1.5}
 .admin-full-deck span{font-size:13px;line-height:1.4}
}
@media(max-width:850px){
 #main .sideboard-view-controls select{min-width:110px!important;font-size:16px!important;max-width:100%}
 #main .filters select,#main .filters input:not([type=checkbox]):not([type=radio]):not([type=range]){font-size:16px}
}
