/* Roster-specific layout. Keep the 16-team directory in one compact desktop column
 * and size five seats from the detail column, not from the whole workspace. */
.teams-page .team-workspace{display:grid;grid-template-columns:clamp(180px,15vw,220px) minmax(0,1fr);gap:20px;align-items:start}
.teams-page .team-selector-rail{--roster-mark-size:clamp(24px,calc(5dvh - 12px),38px);display:grid;grid-template-rows:auto minmax(0,1fr);block-size:calc(100dvh - var(--header-height,74px) - 48px);min-block-size:0;position:sticky;top:calc(var(--header-height,74px) + 16px);max-height:none;overflow:visible;margin:0}
.teams-page .team-selector-rail .team-rail-heading{display:flex;padding:11px 14px}
.teams-page .team-selector-rail nav[data-team-dock]{display:grid;grid-template-columns:minmax(0,1fr);grid-auto-rows:minmax(0,1fr);align-content:stretch;min-height:0;gap:2px;padding:6px;overflow:visible}
.teams-page .team-selector-rail nav[data-team-dock]>a{display:grid;grid-template-columns:var(--roster-mark-size) minmax(0,1fr);align-items:center;gap:8px;min-width:0;max-width:none;min-height:0;padding:2px 7px;border:1px solid transparent;border-radius:7px;flex:none;position:relative}
.teams-page .team-selector-rail nav[data-team-dock]>a:last-child{border-bottom:1px solid transparent}
.teams-page .team-selector-rail nav[data-team-dock]>a[aria-current=page]{border:1px solid var(--accent);background:color-mix(in srgb,var(--accent) 10%,var(--surface));box-shadow:inset 3px 0 0 var(--accent);color:var(--text)}
.teams-page .team-selector-rail nav[data-team-dock]>a:focus-visible{outline:2px solid var(--accent);outline-offset:1px;z-index:2}
.teams-page .team-selector-rail nav[data-team-dock] .team-mark{width:var(--roster-mark-size);height:var(--roster-mark-size);flex-basis:var(--roster-mark-size);z-index:1}
.teams-page .team-selector-rail nav[data-team-dock]>a>.roster-team-caption{display:flex;align-items:baseline;gap:8px;min-width:0;width:100%;max-width:100%;font-size:clamp(16px,1.8dvh,18px);line-height:1.25;font-weight:600;white-space:nowrap;overflow:hidden}
.teams-page .team-selector-rail nav[data-team-dock] .roster-team-full-name{display:block;flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.teams-page .team-selector-rail nav[data-team-dock] .roster-team-separator{display:none}
.teams-page .team-selector-rail nav[data-team-dock] .roster-team-tag{flex:none;font-size:12px;line-height:1.2;font-weight:500;color:var(--muted);letter-spacing:.02em}
.teams-page .team-identity{padding:12px 16px;gap:14px;min-height:82px}
.teams-page .team-identity>.team-mark{width:52px;height:52px;flex-basis:52px}
.teams-page .team-identity h2{font-size:clamp(21px,1.65vw,28px);line-height:1.2}
.teams-page .team-identity p{margin-top:4px;line-height:1.5}
.teams-page .team-record .team-milestone{font-size:clamp(20px,1.5vw,26px);margin-bottom:3px}
.teams-page .team-detail>.team-live{margin:10px 0 0;padding:10px 12px;border:1px solid var(--line);border-radius:10px}
.teams-page .team-detail .team-live-heading{margin-bottom:7px;gap:10px}
.teams-page .team-detail .team-live-heading h2{font-size:13px}
.teams-page .team-detail .team-live-roster{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:6px 12px}
.teams-page .team-detail .team-live-room{max-width:none;min-height:44px;padding:3px 6px 3px 0;gap:7px;border:0}
.teams-page .team-detail .team-live-avatar{width:32px;height:36px}
.teams-page .team-detail .team-live-info{gap:3px}
.teams-page .team-detail .team-live-info strong{font-size:12px}
.teams-page .team-detail .team-live-info .live-state{font-size:11px}
.teams-page .roster-section{margin-top:18px}
.teams-page .roster-section .lineup-five{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:clamp(8px,1vw,14px);align-items:start}
.teams-page .roster-section .lineup-slot:nth-child(n){min-width:0;grid-column:auto;flex:none}
.teams-page .roster-section .lineup-slot>.player-card{height:auto}
@media(min-width:1280px) and (max-height:820px){
 .teams-page .site-main{padding-top:20px}
 .teams-page .team-selector-rail .team-rail-heading{padding-block:9px}
 .teams-page .team-identity{min-height:72px;padding-block:10px}
 .teams-page .roster-section{margin-top:14px}
}
@media(min-width:701px) and (max-width:1279px){
 .teams-page .team-workspace{grid-template-columns:clamp(180px,15vw,220px) minmax(0,1fr);gap:16px}
}
@media(min-width:701px) and (max-width:1000px){
 .teams-page .roster-section .lineup-five{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:700px){
 .teams-page .team-workspace{display:block}
 .teams-page .team-selector-rail{display:block;block-size:auto;position:static;overflow:hidden;margin-bottom:16px}
 .teams-page .team-selector-rail .team-rail-heading{padding:8px 12px}
 .teams-page .team-selector-rail nav[data-team-dock]{grid-template-columns:none;grid-template-rows:auto;grid-auto-rows:auto;grid-auto-flow:column;grid-auto-columns:156px;gap:4px 6px;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scroll-padding:8px;padding:8px}
 .teams-page .team-selector-rail nav[data-team-dock]>a{grid-template-columns:36px minmax(0,1fr);min-height:50px}
 .teams-page .team-selector-rail nav[data-team-dock] .team-mark{width:36px;height:36px;flex-basis:36px}
 .teams-page .team-selector-rail nav[data-team-dock]>a>.roster-team-caption{display:grid;gap:2px;font-size:15px;white-space:normal;overflow:visible}
 .teams-page .team-selector-rail nav[data-team-dock] .roster-team-full-name{display:block;white-space:nowrap;text-overflow:ellipsis}
 .teams-page .team-identity{padding:12px;gap:10px}
 .teams-page .team-identity>div:nth-child(2){flex-basis:calc(100% - 66px)}
 .teams-page .team-identity h2{font-size:22px}
 .teams-page .team-record{padding-top:9px}
 .teams-page .team-detail .team-live-roster{grid-template-columns:repeat(2,minmax(0,1fr))}
 .teams-page .roster-section .lineup-five{display:flex;flex-wrap:nowrap;justify-content:start;overflow-x:auto;gap:14px}
 .teams-page .roster-section .lineup-slot:nth-child(n){flex:0 0 clamp(244px,78vw,286px)}
}
@media(forced-colors:active){.teams-page .team-selector-rail nav[data-team-dock]>a[aria-current=page]{outline:2px solid Highlight;outline-offset:-2px}}

/* Match the real, responsive card height; when every seat is empty the
 * proportion remains useful without a measured card. */
.teams-page .roster-section .lineup-slot:nth-child(n)>.lineup-empty{
 box-sizing:border-box;min-height:0;height:var(--roster-card-height,auto);aspect-ratio:3/5;
}

/* A broadcast iframe has no site header and a short viewport. Give the
 * directory that recovered height and keep the match panel compact. */
@media(min-width:701px){
 .public-full-embed.teams-page .site-main{padding-bottom:12px}
 .public-full-embed.teams-page .team-selector-rail{position:static;block-size:calc(100dvh - clamp(12px,2vw,28px) - 12px);max-height:none;--roster-mark-size:clamp(20px,4dvh,34px)}
 .public-full-embed.teams-page .team-selector-rail nav[data-team-dock]>a>.roster-team-caption{font-size:clamp(12px,2dvh,18px)}
 .public-full-embed.teams-page .team-identity{min-height:60px;padding:8px 12px}
 .public-full-embed.teams-page .team-identity>.team-mark{width:44px;height:44px;flex-basis:44px}
 .public-full-embed.teams-page .roster-section{margin-top:10px}
 .public-full-embed.teams-page .roster-section .lineup-five{grid-template-columns:repeat(5,minmax(0,1fr));max-width:calc(max(300px,100dvh - 260px)*3);margin-inline:auto}
 .public-full-embed.teams-page .team-schedule{margin-top:12px;padding:12px 16px}
 .public-full-embed.teams-page .team-schedule .section-heading{margin-bottom:8px}
 .public-full-embed.teams-page .team-schedule .section-heading>a{min-height:32px}
 .public-full-embed.teams-page .team-schedule .empty-state{min-height:0;padding:18px}
 .public-full-embed.teams-page .team-schedule .matches-grid{gap:8px}
 .public-full-embed.teams-page .team-schedule .training-match-card{height:72px;min-height:72px;gap:2px;padding:6px 8px}
 .public-full-embed.teams-page .team-schedule .training-card-match{min-height:30px}
 .public-full-embed.teams-page .team-schedule .training-card-team .team-mark{width:30px;height:30px;flex-basis:30px}
 .public-full-embed.teams-page .team-schedule .cup-match-card.fixture-card{min-height:72px;gap:4px;padding:6px 8px}
}

/* In a narrow broadcast frame keep the team picker, identity and role
 * selector compact while preserving a readable, horizontally browsable card. */
@media(max-width:700px){
 .public-full-embed.teams-page .site-main{padding-block:8px 12px}
 .public-full-embed.teams-page .team-selector-rail{display:flex;align-items:stretch;margin-bottom:8px}
 .public-full-embed.teams-page .team-selector-rail .team-rail-heading{flex:0 0 auto;gap:3px;padding:4px 6px;border-bottom:0;border-right:1px solid var(--line)}
 .public-full-embed.teams-page .team-rail-heading .embed-brand{width:28px;height:32px}
 .public-full-embed.teams-page .team-rail-heading>span:last-child{display:none}
 .public-full-embed.teams-page .team-selector-rail nav[data-team-dock]{flex:1;min-width:0;grid-auto-columns:132px;gap:4px;padding:4px}
 .public-full-embed.teams-page .team-selector-rail nav[data-team-dock]>a{grid-template-columns:30px minmax(0,1fr);gap:5px;min-height:44px;padding:2px 5px}
 .public-full-embed.teams-page .team-selector-rail nav[data-team-dock] .team-mark{width:30px;height:30px;flex-basis:30px}
 .public-full-embed.teams-page .team-selector-rail nav[data-team-dock]>a>.roster-team-caption{font-size:13px}
 .public-full-embed.teams-page .team-selector-rail nav[data-team-dock] .roster-team-tag{font-size:10px}
 .public-full-embed.teams-page .team-identity{flex-wrap:nowrap;min-height:60px;gap:8px;padding:8px}
 .public-full-embed.teams-page .team-identity>.team-mark{width:40px;height:40px;flex:0 0 40px}
 .public-full-embed.teams-page .team-identity>div:nth-child(2){flex:1 1 auto;min-width:0}
 .public-full-embed.teams-page .team-identity h2{font-size:16px;line-height:1.25}
 .public-full-embed.teams-page .team-record{width:auto;flex:0 0 auto;padding:0;border:0;text-align:right}
 .public-full-embed.teams-page .team-record .team-milestone{font-size:15px;margin:0}
 .public-full-embed.teams-page .team-record .team-swiss-record{font-size:11px}
 .public-full-embed.teams-page .roster-section{margin-top:8px}
 .public-full-embed.teams-page .roster-position-nav>button{gap:2px;white-space:nowrap;font-size:11px}
 .public-full-embed.teams-page .roster-position-nav .role-icon{width:13px;height:13px}
 .public-full-embed.teams-page .roster-section .lineup-five{gap:10px}
 .public-full-embed.teams-page .roster-section .lineup-slot:nth-child(n){flex:0 0 clamp(200px,58vw,230px)}
 .public-full-embed.teams-page .roster-scroll-status{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .public-full-embed.teams-page .team-schedule{margin-top:10px;padding:12px}
 .public-full-embed.teams-page .team-schedule .section-heading{margin-bottom:8px}
}
