/* El editor público comparte el asistente de entrenamientos y mantiene campo y equipos visibles. */
.board-page #modal:has(.public-training-board){width:calc(100vw - 30px);max-width:1220px;height:calc(100dvh - 32px);max-height:calc(100dvh - 32px);overflow:hidden;}
.public-training-board{width:100%;height:100%;max-height:none;display:flex;flex-direction:column;overflow:hidden;}
.public-training-board [hidden]{display:none!important;}
.public-training-board .tw-board-head,.public-training-board .tw-exercise-bar{flex:0 0 auto;}
.public-training-board .tw-exercise-bar{grid-template-columns:auto minmax(150px,1fr) 74px 135px auto;}
.public-training-board .tw-exercise-bar>b{grid-column:auto;}
.public-training-board .tw-board-workspace{display:grid;grid-template-columns:94px minmax(0,1fr) 285px;flex:1;min-height:0;overflow:hidden;}
.public-training-board .tw-pitch-wrap{display:flex;align-items:center;justify-content:center;min-width:0;min-height:0;padding:0;margin:0;overflow:hidden;}
.public-training-board .tw-pitch-wrap svg{width:100%;height:100%;max-height:100%;min-height:0;flex:1;object-fit:contain;}
.public-training-board .tw-tools{display:flex;flex-direction:column;position:static;min-height:0;overflow:auto;}
.public-training-board .tw-tools button{flex:0 0 auto;}
.public-training-board .tw-groups{grid-column:auto;min-width:0;min-height:0;overflow:auto;}
.public-training-board .tw-side-panel{min-height:0;}
.public-training-board #tw-group-list{overflow:visible;}
@media(max-width:1000px){
 .public-training-board .tw-exercise-bar{grid-template-columns:minmax(0,1fr) 74px 135px auto;}
 .public-training-board .tw-exercise-bar>b{grid-column:1/-1;}
}
@media(min-width:650px) and (max-width:1000px){
 .public-training-board .tw-board-workspace{grid-template-columns:62px minmax(0,1fr) 205px;gap:6px;padding:6px;}
 .public-training-board .tw-tools button{flex-direction:column;justify-content:center;text-align:center;min-height:42px;padding:3px;}
 .public-training-board .tw-tools{padding:4px;}
 .public-training-board .tw-exercise-bar .btn:last-child{grid-column:auto;}
 .public-training-board .tw-exercise-bar .btn{padding:7px;font-size:8px;}
}
@media(max-width:649px){
 .board-page #modal:has(.public-training-board){width:100%;max-width:100%;height:100dvh;max-height:100dvh;border-radius:0;}
 .public-training-board .tw-board-workspace{display:flex;flex-direction:column;overflow:auto;}
 .public-training-board .tw-pitch-wrap{order:0;flex:0 0 auto;min-height:210px;}
 .public-training-board .tw-pitch-wrap svg{height:auto;aspect-ratio:100/65;}
 .public-training-board .tw-tools{order:1;display:grid;grid-template-columns:repeat(5,1fr);overflow:visible;flex:0 0 auto;}
 .public-training-board .tw-groups{order:2;overflow:visible;flex:0 0 auto;}
 .public-training-board .tw-exercise-bar{grid-template-columns:minmax(0,1fr) 65px 115px;}
 .public-training-board #tw-rebalance{grid-column:1/-1!important;}
}

.public-training-board .tw-side-tabs{grid-template-columns:1fr;}

.board-page #modal:has(.free-report-view){width:min(1000px,calc(100vw - 30px));height:calc(100dvh - 32px);overflow:hidden;}
.free-report-view{width:100%;height:100%;display:flex;flex-direction:column;background:#f2f5fa;}
.free-report-view>header{display:flex;align-items:center;justify-content:space-between;padding:10px 16px;background:#fff;border-bottom:1px solid #e5e9f1;}
.free-report-view .close{position:static;}
.free-report-view iframe{display:block;border:0;width:100%;flex:1;min-height:0;}

.free-report-view [hidden]{display:none!important;}
.free-report-view>header{gap:10px;}
#free-report-save{margin-left:auto;}

.free-pdf-pages{flex:1;min-height:0;overflow:auto;padding:20px;background:#e6eaf1;}
.free-pdf-pages canvas{display:block;width:100%;height:auto;max-width:840px;margin:0 auto 18px;box-shadow:0 3px 15px #10213f20;background:white;}
