/* Match Day: keep the existing five color rows compact and match notes reachable. */
.editor-grid.matchday-visual-grid>.editor-scroll.matchday-details-col{min-height:0!important;min-width:0!important;max-height:100%!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;scrollbar-gutter:stable;align-content:start!important}
.editor-grid.matchday-visual-grid>.editor-scroll.matchday-details-col>.summary{min-height:max-content!important;overflow:visible!important}
.editor-grid.matchday-visual-grid>.editor-scroll.matchday-details-col>.block{flex:0 0 auto!important;min-height:max-content!important;overflow:visible!important}
.editor-scroll.matchday-details-col .form-grid{flex:0 0 auto!important;min-height:max-content!important;grid-template-rows:none!important;grid-auto-rows:max-content!important;align-content:start!important}
.editor-scroll.matchday-details-col .field.full:last-child{min-height:max-content!important;grid-template-rows:auto auto!important}
.editor-scroll.matchday-details-col #notesInput{height:72px!important;min-height:72px!important}
.topbar.topbar-expanded .topbar-main{min-width:0!important}
.topbar.topbar-expanded .topbar-actions{flex-wrap:wrap!important;min-width:0!important}
.topbar.topbar-expanded .title{white-space:normal!important}
.workspace>.editor-host>.section-head{flex-wrap:wrap!important}
.workspace>.editor-host>.section-head .savebar{min-width:0!important;max-width:100%!important;flex-wrap:wrap!important}
/* Size the existing visuals from the pitch itself, including native browser zoom. */
@supports(container-type:inline-size){
 #pitch,#matchdayLineupPreviewPitch{container-type:inline-size}
 :is(#pitch,#matchdayLineupPreviewPitch)>.matchday-lineup-pitch-player{width:14.4cqw!important}
 :is(#pitch,#matchdayLineupPreviewPitch) .matchday-lineup-pitch-player .matchday-canonical-jersey{width:11.2cqw!important;height:12.6cqw!important}
 :is(#pitch,#matchdayLineupPreviewPitch) .matchday-lineup-pitch-player .matchday-canonical-jersey canvas{width:11.2cqw!important;height:13cqw!important}
 :is(#pitch,#matchdayLineupPreviewPitch) .matchday-canonical-jersey strong{font-size:2.4cqw!important;margin-top:-.2cqw!important}
 :is(#pitch,#matchdayLineupPreviewPitch) .matchday-lineup-pitch-name{max-width:18.4cqw!important;font-size:1.6cqw!important;margin-top:.4cqw!important;padding:.4cqw 1.2cqw!important;border-width:.2cqw!important}
 :is(#pitch,#matchdayLineupPreviewPitch) .matchday-lineup-photo{width:9.6cqw!important;height:9.6cqw!important;border-radius:2.6cqw!important}
}
.editor-scroll.matchday-details-col .kit-picker-card{padding:8px!important;gap:5px!important}
.editor-scroll.matchday-details-col .kit-picker-card .kit-picker-row{grid-template-columns:90px minmax(0,1fr)!important;gap:7px!important;min-width:0!important}
.editor-scroll.matchday-details-col .kit-picker-card .color-palette{grid-template-columns:repeat(10,minmax(0,24px))!important;gap:4px!important;min-width:0!important}
.editor-scroll.matchday-details-col .kit-picker-card .color-swatch{width:100%!important;height:auto!important;min-width:0!important;min-height:0!important;max-height:24px!important;aspect-ratio:1;border-radius:6px!important}
@media(max-width:600px){.editor-scroll.matchday-details-col .kit-picker-card .kit-picker-row{grid-template-columns:74px minmax(0,1fr)!important;gap:5px!important}}
/* The intermediate layout must flow like the small-screen layout, not retain a clipped desktop grid. */
@media(max-width:1179px){
 html{height:auto!important;min-height:100%!important;overflow-y:auto!important;overflow-x:hidden!important}
 body:not(.matchday-overlay-open):not(.export-modal-open){height:auto!important;min-height:100svh!important;overflow:visible!important;overscroll-behavior:auto!important}
 .app{height:auto!important;min-height:100svh!important;overflow:visible!important}
 .app>.main,.main>.content,.content>.workspace,.workspace>.editor-host{height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important}
 .editor-grid.matchday-visual-grid{height:auto!important;max-height:none!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:none!important;grid-auto-rows:max-content!important;overflow:visible!important}
 .editor-grid.matchday-visual-grid>.editor-scroll.matchday-details-col,.editor-grid.matchday-visual-grid>.matchday-preview-col,.editor-grid.matchday-visual-grid>.matchday-players-col{height:auto!important;max-height:none!important;overflow:visible!important;display:grid!important}
 .editor-grid.matchday-visual-grid>.matchday-preview-col .pitch-card{height:auto!important;min-height:0!important;overflow:visible!important}
 .editor-grid.matchday-visual-grid>.matchday-preview-col #pitch{height:auto!important;max-height:none!important;width:min(100%,560px)!important;aspect-ratio:.72/1!important}
 .editor-scroll.matchday-details-col #notesInput{height:96px!important;min-height:96px!important}
}

/* Venue selection is a segmented control: only its selected option is accented. */
html[data-mfe-theme] body #matchVenueSwitch{
 background:var(--mfe-surface-plain,rgba(255,255,255,.035))!important;
 border-color:var(--mfe-input-border,rgba(255,255,255,.08))!important;
 box-shadow:inset 0 1px 0 rgba(255,255,255,.04)!important;color:var(--muted)!important;
}
html[data-mfe-theme] body #matchVenueSwitch>span{
 background:transparent!important;border-color:transparent!important;box-shadow:none!important;color:var(--muted)!important;
}
html[data-mfe-theme] body #matchVenueSwitch[data-value="home"]>.venue-home,
html[data-mfe-theme] body #matchVenueSwitch[data-value="away"]>.venue-away{
 background:var(--mfe-accent-fill)!important;border-color:var(--mfe-accent-border)!important;
 box-shadow:0 0 0 1px var(--mfe-accent-glow-soft)!important;color:var(--text)!important;
}
html[data-mfe-theme] body #matchVenueSwitch:focus-visible{outline:2px solid var(--accent)!important;outline-offset:2px!important;}
