/* Two cards per row, in match order, within each group. */
main{max-width:1200px}
#rounds{display:block;padding:12px}
#rounds .match-order{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;align-items:start;margin-bottom:20px}
#rounds .match-order>h2{grid-column:1/-1;margin:4px 0 2px;font-size:1rem}
#rounds .match{min-width:0;margin:0;padding:9px}
#rounds .match-head{gap:5px;flex-wrap:wrap;margin-bottom:4px}
#rounds .player{min-width:0;grid-template-columns:minmax(0,1fr);min-height:44px}
#rounds .player-choice{min-width:0;grid-template-columns:minmax(0,1fr) auto;gap:4px;padding:5px 2px;min-height:44px;font-size:13px}
#rounds .player-choice>span,#rounds .player b,#rounds .player small{min-width:0;overflow-wrap:anywhere}
#rounds .player small{font-size:11px;line-height:1.35;margin-top:2px}
#rounds .player-status-actions{padding:0 2px 5px;gap:4px;justify-content:flex-end}
#rounds .player-status-actions button{min-width:0;min-height:36px;padding:4px 6px}
#rounds .empty-player{grid-template-columns:minmax(0,1fr);font-size:12px;gap:4px;padding:5px 2px}
#rounds .match-actions{margin-top:5px;gap:4px}
#rounds .video-edit{margin-top:5px;padding:5px;gap:4px}
#rounds .video-edit input{width:100%;padding:6px;min-height:36px}
#rounds .video-edit button{min-height:36px;padding:5px}
#rounds .match-video .watch-video{min-height:38px;margin-top:5px;font-size:13px}
#rounds .player-status{margin-left:2px;padding:1px 3px}
@media(max-width:600px){
 #rounds{padding:8px}
 #rounds .match-order{gap:7px}
 #rounds .match{padding:6px;border-radius:7px}
 #rounds .match-head{font-size:10px}
 #rounds .player-choice{grid-template-columns:minmax(0,1fr) auto;font-size:12px;gap:3px}
 #rounds .player small{font-size:10px}
 #rounds .player-status-actions{display:none;gap:2px;padding:0 0 4px}
 .admin-mode #rounds .player-status-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}
 #rounds .player-status-actions button{padding:4px 0;font-size:10px;letter-spacing:-.5px}
 #rounds .match-actions button,#rounds .video-edit button{font-size:11px}
 #rounds .match-video .watch-video{font-size:12px}
 .admin-mode #rounds .video-edit{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
 #rounds .video-edit input{grid-column:1/-1;font-size:11px}
}
/* The video side panel can be narrow even on desktop. */
.viewer-mode #viewerBracket #rounds{padding:8px 0}

/* The same compact player and action layout applies to the final card. */
#championship .player{grid-template-columns:minmax(0,1fr);min-height:44px}
#championship .player-choice{grid-template-columns:minmax(0,1fr) auto;min-height:44px;padding:5px 2px;font-size:13px;gap:4px}
#championship .player small{font-size:11px;line-height:1.35;margin-top:2px}
:is(#rounds,#championship) .player-result{display:inline-flex;align-items:center;justify-content:flex-end;gap:5px;white-space:nowrap}
:is(#rounds,#championship) .player-points{display:inline-block;font-size:17px;line-height:1.2;font-variant-numeric:tabular-nums}
:is(#rounds,#championship) .match-card-tools{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:center;gap:4px;margin-top:5px}
:is(#rounds,#championship) .match-card-tools .member-match-controls{grid-column:1;grid-row:1;min-width:0;flex-wrap:nowrap}
:is(#rounds,#championship) .match-card-tools .match-video{grid-column:2;grid-row:1;min-width:0;margin:0;justify-content:flex-end}
:is(#rounds,#championship) .match-card-tools button{width:100%;max-width:96px;min-width:0;min-height:30px;padding:4px 5px;font-size:11px;line-height:1.2;white-space:nowrap}
:is(#rounds,#championship) .match-card-tools .match-video .watch-video{width:100%;max-width:88px;min-width:0;min-height:30px;margin:0;padding:4px 5px;font-size:11px;line-height:1.2;white-space:nowrap}
.admin-mode :is(#rounds,#championship) .video-edit{grid-template-columns:minmax(0,1fr) auto auto}
:is(#rounds,#championship) .video-edit .bookmark-launch{grid-column:1/-1}
@media(max-width:600px){
 #championship .player-choice{font-size:12px}
 #championship .player small{font-size:10px}
 :is(#rounds,#championship) .match-card-tools button,:is(#rounds,#championship) .match-card-tools .match-video .watch-video{font-size:10px;padding:4px 3px}
 .admin-mode :is(#rounds,#championship) .video-edit{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
 :is(#rounds,#championship) .video-edit input{grid-column:1/-1}
}
@media(max-width:360px){
 #rounds .match-order{grid-template-columns:minmax(0,1fr)}
}
@media(pointer:coarse){
 :is(#rounds,#championship) .match-card-tools button,:is(#rounds,#championship) .match-card-tools .match-video .watch-video{min-height:32px}
}
.match-no-advancer{margin:4px 0}
.match-no-advancer:has(>button[hidden]){display:none}
.match-no-advancer>button{min-height:40px;padding:5px 10px;border:1px solid #baafcb;border-radius:6px;background:#f5f1fa;color:#493569;font:inherit;font-size:.8rem;font-weight:700;cursor:pointer}
.match-no-advancer>button:disabled{cursor:default;opacity:.55}
