/* Compact Teams heading and controls; squad cards deliberately untouched. */
html body #appView #view-teams .teams-toolbar{grid-template-columns:auto 140px minmax(0,1fr) auto auto!important;grid-template-areas:"mode club status transfers actions"!important}
html body #appView #view-teams .teams-toolbar>.teams-mode-toggle{grid-area:mode!important}
html body #appView #view-teams .teams-toolbar>.teams-club-filter{grid-area:club!important}
html body #appView #view-teams .teams-toolbar>.teams-status198{grid-area:status!important}
html body #appView #view-teams .teams-toolbar>#r643AllTransfers{grid-area:transfers!important;margin:0!important}
html body #appView #view-teams .teams-toolbar>.team-actions{grid-area:actions!important}
html body #appView #view-teams .page-head{padding:16px 24px!important;min-height:0!important;margin-bottom:12px!important}
html body #appView #view-teams .page-head>div{display:grid!important;grid-template-columns:max-content minmax(0,1fr)!important;align-items:baseline!important;gap:6px 16px!important;min-width:0!important}
html body #appView #view-teams .page-head .eyebrow{grid-column:1 / -1!important;margin:0!important}
html body #appView #view-teams .page-head h2{margin:0!important}
html body #appView #view-teams .page-head>div>p:not(.eyebrow){margin:0!important;font-size:12px!important;line-height:1.4!important}
html body #appView #view-teams .teams-toolbar{display:grid!important;grid-template-columns:auto 140px minmax(0,1fr) auto auto!important;align-items:center!important;gap:10px!important;margin:0 0 12px!important}
html body #appView #view-teams .teams-mode-toggle{width:auto!important;min-width:0!important;grid-column:auto!important}
html body #appView #view-teams .teams-club-filter{width:auto!important;min-width:0!important;margin:0!important;grid-column:auto!important}
html body #appView #view-teams .teams-club-filter>span{display:none!important}
html body #appView #view-teams .team-actions{display:flex!important;flex-wrap:nowrap!important;gap:8px!important;grid-column:auto!important;width:auto!important;margin:0!important}
html body #appView #view-teams .team-actions .button{width:auto!important;min-width:0!important;white-space:nowrap!important}
html body #appView #view-teams .teams-status198{position:relative;min-width:0;margin:0}
html body #appView #view-teams .teams-status198>summary{cursor:pointer;list-style:none;min-height:42px;display:flex;align-items:center;justify-content:center;gap:7px;padding:8px 10px;border:1px solid #bdd8ce;border-radius:12px;background:#f5faf8;color:#174b57;font-size:12px;font-weight:750}
html body #appView #view-teams .teams-status198>summary::-webkit-details-marker{display:none}
html body #appView #view-teams .teams-status198>summary::after{content:'⌄'}
html body #appView #view-teams .teams-status198[open]>summary::after{content:'⌃'}
html body #appView #view-teams .teams-status198>summary:focus-visible{outline:3px solid #087a60;outline-offset:2px}
html body #appView #view-teams .teams-status198 .pa-legend{display:flex!important;flex-wrap:wrap!important;gap:5px 10px!important;align-items:center!important;margin:0!important;padding:8px 10px!important;border:0!important;background:transparent!important;font-size:11px!important;line-height:1.35!important}
html body #appView #view-teams .teams-status198 .pa-legend>span{white-space:nowrap}
@media(min-width:1500px){html body #appView #view-teams .teams-status198>summary{display:none}html body #appView #view-teams .teams-status198 .pa-legend{padding:0 4px!important}}
@media(max-width:1499px){html body #appView #view-teams .teams-status198 .pa-legend{position:absolute!important;z-index:40;top:calc(100% + 6px);right:0;width:300px;max-width:calc(100vw - 32px);padding:14px!important;border:1px solid #bdd8ce!important;border-radius:12px;background:#fff!important;box-shadow:0 8px 24px #12372c26;font-size:12px!important;gap:10px!important}html body #appView #view-teams .teams-status198 .pa-legend>strong{display:none}html body #appView #view-teams .teams-status198 .pa-legend>span{flex-basis:100%}}
@media(max-width:760px){html body #appView #view-teams .teams-toolbar{grid-template-columns:minmax(0,1fr) 125px!important;gap:8px!important}html body #appView #view-teams .teams-status198{grid-column:2;grid-row:2}html body #appView #view-teams .teams-club-filter{grid-column:1;grid-row:2}html body #appView #view-teams .teams-mode-toggle{grid-column:1 / -1!important}html body #appView #view-teams .team-actions{grid-column:1 / -1!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px!important}html body #appView #view-teams .team-actions .button{min-height:40px!important;padding:8px 5px!important}html body #appView #view-teams .page-head{padding:14px 18px!important}html body #appView #view-teams .page-head>div>p:not(.eyebrow){grid-column:1 / -1!important;font-size:11px!important}}
@media(max-width:760px){html body #appView #view-teams .teams-toolbar{grid-template-areas:"mode transfers" "club status" "actions actions"!important}html body #appView #view-teams .teams-toolbar:not(:has(#r643AllTransfers)){grid-template-areas:"mode mode" "club status" "actions actions"!important}html body #appView #view-teams .team-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
html body #appView #view-teams .teams-toolbar{height:auto!important;max-height:none!important;min-height:0!important;grid-template-rows:none!important;overflow:visible!important}html body #appView #view-teams .teams-club-filter{position:relative!important;max-width:none!important}html body #appView #view-teams #teamClubPickerButton{width:100%!important;min-width:0!important}

@media(max-width:760px){html body #appView #view-teams .teams-toolbar,html body #appView #view-teams .teams-toolbar:not(:has(#r643AllTransfers)){grid-template-columns:minmax(0,1fr) minmax(0,1.15fr)!important;grid-template-areas:"mode club" "status actions"!important}html body #appView #view-teams .team-actions .button{font-size:10px!important;letter-spacing:0!important}}

@media(min-width:761px){html body #appView #view-teams .team-actions .button{min-width:max-content!important;max-width:none!important;flex:0 0 auto!important}}
@media(max-width:760px){html body #appView #view-teams #teamsInPlay::after,html body #appView #view-teams #teamsMine::after{content:none!important;display:none!important}html body #appView #view-teams .teams-status198 .pa-legend{left:0!important;right:auto!important}}

/* The club selector occupies the right-hand mobile column. Anchor the menu
   to that edge instead of centring it over the narrower selector. */
@media(max-width:760px){
  html body #appView #view-teams #teamClubPickerMenu{
    left:auto!important;
    right:0!important;
    transform:none!important;
    width:min(280px,calc(100vw - 32px))!important;
    min-width:0!important;
    max-width:calc(100vw - 32px)!important;
    box-sizing:border-box!important;
  }
  html body #appView #view-teams #teamClubPickerMenu .club-picker-menu-head{
    margin:0 0 5px!important;
    width:100%!important;
    box-sizing:border-box!important;
  }
}
