/* Shared day rows align team plans, age-group summaries and numbered events. */
.msb-page .msb-program-grid{align-items:start}
.msb-program-grid>.msb-entry-column{grid-column:1;grid-row:1 / span var(--meet-days)}
.msb-program-grid>.msb-day-team{grid-column:2;grid-row:var(--day-row)}
.msb-program-grid>.msb-day-summary{grid-column:3;grid-row:var(--day-row)}
.msb-program-grid>.msb-day-events{grid-column:4;grid-row:var(--day-row)}
.msb-page .msb-program-scroll{max-width:100%;overflow-x:auto}
.msb-page .msb-program-table{width:100%;border-collapse:collapse;table-layout:auto;font-size:11px;line-height:1.35;background:#fff}
.msb-page .msb-program-table th,.msb-page .msb-program-table td{padding:6px 4px;border:1px solid #dbe3ee;text-align:center;vertical-align:top}
.msb-page .msb-program-table th{background:#eef3f8;font-weight:750;color:#12263e;white-space:nowrap}
.msb-day-events .msb-program-table td:nth-child(2){text-align:left}
.msb-page .msb-program-grid h2{font-size:14px}
@media screen and (max-width:1100px){
.msb-page .msb-program-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.msb-program-grid>.msb-entry-column{grid-column:1/-1;grid-row:1}
.msb-program-grid>.msb-day-team{grid-column:1;grid-row:calc(var(--day-row) + 1)}
.msb-program-grid>.msb-day-summary{grid-column:2;grid-row:calc(var(--day-row) + 1)}
.msb-program-grid>.msb-day-events{grid-column:3;grid-row:calc(var(--day-row) + 1)}
}
@media screen and (max-width:650px){.msb-page .msb-program-grid{display:flex;flex-direction:column}.msb-program-grid>.msb-panel{width:100%}.msb-page .msb-program-table{font-size:12px}}
@media print{.msb-page .msb-program-grid{display:block}.msb-program-grid>.msb-panel{break-inside:avoid;margin-bottom:10px}.msb-page .msb-program-table{font-size:8pt}}

/* R17: notes live with the coach briefing; reduce repeated panel/table gaps. */
.msb-page .msb-program-grid>.msb-panel{margin-bottom:0}
.msb-page .msb-program-grid{gap:8px;align-content:start}
.msb-page .msb-program-table th,.msb-page .msb-program-table td{padding:4px}
.msb-page .msb-coach-race-notes{margin-top:8px;padding-top:6px;border-top:1px solid #dbe3ee}
.msb-page .msb-coach-race-notes p{margin:4px 0}

/* Six equal action slots; preserve existing working actions. */
@media screen{.msb-page .msb-actions{grid-template-columns:repeat(6,minmax(0,1fr))}.msb-page .msb-actions .msb-action-placeholder{display:flex;align-items:center;justify-content:center;text-align:center;min-height:35px;min-width:0;padding:0 6px;border:1px solid var(--msb-accent);border-radius:8px;background:#fff;color:#163f72;font:inherit;font-size:12px;font-weight:650;opacity:1;cursor:default}}
@media screen and (max-width:650px){.msb-page .msb-actions{grid-template-columns:repeat(2,minmax(0,1fr))}}

.msb-page .msb-actions{grid-auto-rows:1fr}.msb-planning-links{display:flex;flex-wrap:wrap;gap:16px;margin:8px 0 12px;font-size:13px}.msb-page .msb-actions a{white-space:normal;text-align:center;padding:6px;line-height:1.3}.msb-hotel-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.msb-hotel-grid .msb-panel{min-width:0}.msb-hotel-links{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}.msb-hotel-links a{border:1px solid #163f72;border-radius:8px;padding:9px 12px;text-decoration:none;font-weight:650}.msb-hotel-grid small{overflow-wrap:anywhere}.msb-hotel-grid h3{font-size:17px;margin:12px 0 6px}.msb-hotel-grid .msb-fact{padding:10px 0;border-top:1px solid #e1e7ee}.msb-hotel-grid .msb-fact strong{display:block;font-size:13px;color:#506680}@media(max-width:700px){.msb-hotel-grid{grid-template-columns:1fr}}

/* Official schedule shares Sunday's grid row, rather than a fixed spacer. */
.msb-program-grid>.msb-official-column{grid-column:1;grid-row:var(--official-row)}
@media screen and (max-width:1100px){.msb-split-official>.msb-official-column{grid-column:1/-1;grid-row:2}.msb-split-official>.msb-day-team,.msb-split-official>.msb-day-summary,.msb-split-official>.msb-day-events{grid-row:calc(var(--day-row) + 2)}}

/* R25: five desktop columns, with age-specific event lists sharing each day row. */
.msb-page .msb-event-sections{min-width:0;display:grid;grid-template-columns:minmax(0,1fr);gap:8px;align-items:start}
.msb-page .msb-event-sections>.msb-panel{background:#f7faf8;border:0;margin:0;box-shadow:none}
@media screen and (min-width:1400px){
 .msb-page .msb-program-grid{grid-template-columns:repeat(5,minmax(0,1fr))}
 .msb-program-grid>.msb-day-events{grid-column:4 / span 2}
 .msb-page .msb-event-sections{grid-template-columns:repeat(2,minmax(0,1fr))}
 .msb-event-sections>.msb-panel:only-child{grid-column:1}
}
@media screen and (max-width:650px){.msb-page .msb-event-sections{width:100%}}
@media print{.msb-page .msb-event-sections{display:block}.msb-page .msb-event-sections>.msb-panel{margin-bottom:10px}}

/* Official information aligns with every team day in column one. */
.msb-daily-official>.msb-day-official{grid-column:1;grid-row:var(--day-row)}
@media screen and (min-width:651px) and (max-width:1100px){
 .msb-page .msb-daily-official{grid-template-columns:repeat(4,minmax(0,1fr))}
 .msb-daily-official>.msb-day-team{grid-column:2;grid-row:var(--day-row)}
 .msb-daily-official>.msb-day-summary{grid-column:3;grid-row:var(--day-row)}
 .msb-daily-official>.msb-day-events{grid-column:4;grid-row:var(--day-row)}
}

/* Smaller summary cells; preserve words and the Med Relay nonbreaking label. */
@media screen{
 .msb-page .msb-day-summary .msb-program-table{font-size:10px;line-height:1.3}
 .msb-page .msb-day-summary .msb-program-table th,
 .msb-page .msb-day-summary .msb-program-table td{padding:4px 2px;overflow-wrap:normal;word-break:normal}
}
@media screen and (max-width:650px){
 .msb-page .msb-day-summary .msb-program-table{font-size:11px}
}

.msb-page .msb-program-table td.msb-suggested-event{box-shadow:inset 0 0 0 1px #166534;background:#fff}

.msb-page .msb-day-summary .msb-program-table{table-layout:fixed}
.msb-page .msb-day-summary .msb-program-table th{white-space:normal}
