.roster-page { background: #f8f3f6; }
.roster-hero { position: relative; isolation: isolate; overflow: hidden; background: linear-gradient(120deg, #211320, #48203a); color: #fff8fc; }
.roster-hero::before { content: ''; position: absolute; z-index: -1; inset: -40% auto -24% 24%; width: 24rem; transform: skewX(-25deg); border-inline: 1px solid #f2a7ce30; background: repeating-linear-gradient(90deg, transparent 0 2.5rem, #f4afd813 2.5rem calc(2.5rem + 1px)); pointer-events: none; }
.roster-hero-inner { position: relative; z-index: 1; display: grid; justify-items: start; align-content: center; gap: clamp(.8rem, 2vw, 1.8rem); min-height: clamp(20rem, 30vw, 28rem); padding-block: 1.6rem 2.2rem; }
.roster-crumbs { display: flex; flex-wrap: wrap; gap: .6rem; color: #efc5dc; font-size: .85rem; }
.roster-crumbs a { text-underline-offset: .2em; }
.roster-crumbs a:hover { color: #fff; }
.roster-hero-copy { max-width: 44%; }
.roster-hero-copy::before { content: ''; display: block; width: clamp(1.65rem, 4vw, 3.2rem); height: .25rem; margin-bottom: .7rem; transform: skewX(-24deg); background: #ff5397; }
.roster-hero h1 { max-width: 10ch; margin: 0; color: white; font: 650 clamp(3rem, 7vw, 7rem)/.94 var(--display); text-transform: uppercase; letter-spacing: -.035em; }
.roster-hero-copy p { max-width: 34ch; margin-top: .85rem; color: #f2dce9; font-size: clamp(.92rem, 1.5vw, 1.1rem); }
.roster-hero-media { position: absolute; z-index: 0; inset: 0 0 0 auto; width: 61%; overflow: hidden; clip-path: polygon(11% 0, 100% 0, 100% 100%, 0 100%); }
.roster-hero-media img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 33%; }
.roster-hero-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, #34102784, transparent 43%), linear-gradient(110deg, #5116314d, transparent 36%); pointer-events: none; }

.team { padding-top: clamp(1.3rem, 3.4vw, 2.8rem); }
.roster-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem 1rem; padding: .65rem .75rem; margin-bottom: clamp(1.2rem, 3vw, 2.4rem); border: 1px solid #e5d7df; border-radius: .65rem; background: #fff; }
.roster-add { margin-inline-start: auto; padding-inline: .3rem; }
.squad-filters { display: flex; min-width: 0; flex-wrap: wrap; gap: .42rem; }
.squad-filters :is(button, a) { display: inline-flex; align-items: center; gap: .45rem; min-width: 0; min-height: 2.75rem; padding: .43rem .78rem; border: 1px solid #e5d2de; border-radius: .36rem; background: #fbf4f8; color: var(--ink); font-size: .89rem; font-weight: 800; overflow-wrap: anywhere; text-decoration: none; }
.squad-filters :is(button, a):hover { border-color: var(--pink); }
.squad-filters [aria-pressed='true'] { background: #49223e; border-color: #49223e; color: #fff8fc; }
.squad-filter-count { min-width: 1.4rem; padding: .05rem .22rem; border-radius: .26rem; background: #eedce8; color: #75214e; font-size: .74rem; font-variant-numeric: tabular-nums; text-align: center; }
.squad-filters [aria-pressed='true'] .squad-filter-count { background: #733858; color: #fff; }

.roster-list-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .55rem 1rem; border-bottom: 1px solid #deccd8; padding-bottom: .85rem; margin-bottom: 1.1rem; }
.roster-list-heading h2, .home-roster-heading h2 { color: #291827; font-size: clamp(2rem, 4.15vw, 3.9rem); line-height: 1; overflow-wrap: anywhere; }
.roster-count { color: #703052; padding: .25rem .58rem; background: #f0e2eb; border-radius: .27rem; font-size: .83rem; font-weight: 800; }
.roster-count:empty { display: none; }
.squad-description { margin: 0 0 1.15rem; color: var(--muted); max-width: 65ch; white-space: pre-wrap; overflow-wrap: anywhere; }
.roster-status { background: #f9e9ee; color: #7f1740; padding: .7rem .9rem; margin-bottom: .8rem; border-left: 3px solid var(--pink); }
.roster-empty { display: grid; align-items: center; min-height: 12rem; padding: clamp(1.1rem, 4vw, 2.7rem); border: 1px dashed #cfa7bf; border-radius: .55rem; background: #fbf1f7; }
.roster-empty p { margin-top: .5rem; max-width: 42ch; color: #5c4250; }
.roster-footer { margin-top: 1.45rem; padding-top: .85rem; border-top: 1px solid #deccd8; color: var(--muted); font-size: .9rem; }
.roster-footer strong { color: var(--ink); margin-left: .3rem; }

.player-grid { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.7rem, 1.8vw, 1.55rem); margin: 0; padding: 0; }
.player-card { --player-light: #6c2553; --player-dark: #271524; min-width: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid #e5d6de; border-radius: .62rem; background: #fff; box-shadow: 0 .5rem .95rem #3c1b2d0d; }
.player-card:nth-child(4n + 2) { --player-light: #75304d; --player-dark: #2b1828; }
.player-card:nth-child(4n + 3) { --player-light: #592d55; --player-dark: #211625; }
.player-card:nth-child(4n + 4) { --player-light: #6b2446; --player-dark: #2c1422; }
.player-media { position: relative; isolation: isolate; overflow: hidden; aspect-ratio: 6 / 5; background: var(--player-dark); }
.player-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 33%; }
.player-media:not(.player-media--fallback)::after { content: ''; position: absolute; inset: 0; background: linear-gradient(160deg, #24101cb8, transparent 40%), linear-gradient(0deg, #24101c72, transparent 32%); pointer-events: none; }
.player-media--fallback { background: linear-gradient(135deg, var(--player-dark) 10%, var(--player-light)); }
.player-media--fallback::before { content: ''; position: absolute; z-index: -1; inset: -12% -8% -16% 38%; transform: skewX(-25deg); border-inline: 1px solid #ffd0eb5c; background: repeating-linear-gradient(0deg, transparent 0 2.15rem, #fff1fa23 2.15rem calc(2.15rem + 1px)); }
.player-initials { position: absolute; inset: .6rem 0 0; display: grid; place-items: center; color: #ffe2f2; font: 700 clamp(3rem, 6.4vw, 6.6rem)/1 var(--display); font-style: italic; letter-spacing: -.035em; }
.player-badge { position: absolute; z-index: 1; top: .65rem; left: .65rem; max-width: calc(100% - 1.3rem); padding: .22rem .5rem; border: 1px solid #ffe3f070; border-radius: .24rem; background: #2b1528df; color: #fff5fa; font-size: .75rem; font-weight: 800; overflow-wrap: anywhere; }
.player-number { position: absolute; z-index: 1; right: .68rem; bottom: .42rem; color: white; font: 650 clamp(1.5rem, 3.15vw, 2.65rem)/1 var(--display); text-shadow: 0 2px 10px #1a0918dd; }
.player-info { display: grid; flex: 1; align-content: start; gap: .53rem; padding: clamp(.73rem, 1.45vw, 1.22rem); border-top: 3px solid #df4384; }
.player-info h3 { color: #2d1a2b; font-size: clamp(1.28rem, 1.9vw, 1.82rem); line-height: 1.13; overflow-wrap: anywhere; }
.player-position { color: #902451; font-size: .85rem; font-weight: 800; overflow-wrap: anywhere; }
.player-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .48rem .72rem; margin: .15rem 0 0; }
.player-stats div { border-top: 1px solid #eddde6; padding-top: .42rem; }
.player-stats dt { color: #6b5262; font-size: .76rem; line-height: 1.3; overflow-wrap: anywhere; }
.player-stats dd { margin: .1rem 0 0; color: #391f34; font: 650 clamp(1.05rem, 1.7vw, 1.46rem)/1.15 var(--display); font-variant-numeric: tabular-nums; }
.player-stat-unit { color: #6b5262; font: 700 .71rem/1.15 var(--text); }
.player-bio { padding-top: .42rem; border-top: 1px solid #eddde6; color: #53444d; font-size: .86rem; white-space: pre-wrap; overflow-wrap: anywhere; }

.home-roster { border-block: 1px solid #eadbe4; background: radial-gradient(ellipse at 100% 0, #f1dce9, transparent 53%), #fbf5f8; }
.home-roster-heading { align-items: center; }
.home-roster-heading h2::before { content: ''; display: block; width: 2rem; height: .22rem; margin-bottom: .58rem; transform: skewX(-24deg); background: var(--pink); }
.home-squads { margin-bottom: 1.05rem; }
.home-roster .player-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.home-roster .player-media { aspect-ratio: 5 / 3; }
.home-roster .player-initials { font-size: clamp(2.8rem, 5vw, 5rem); }

@media (max-width: 1070px) {
  .player-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 740px) {
  .roster-hero-inner { min-height: 0; padding-block: .9rem 1.3rem; gap: .9rem; }
  .roster-hero-copy { max-width: 100%; }
  .roster-hero h1 { max-width: 100%; font-size: clamp(2.45rem, 9vw, 4.35rem); }
  .roster-hero-copy p { margin-top: .55rem; }
  .roster-hero-media { position: relative; width: 100%; aspect-ratio: 16 / 8.5; clip-path: none; border-top: 1px solid #ef82b58c; }
  .roster-hero-media img { object-position: center 42%; }
  .player-grid, .home-roster .player-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .player-initials { font-size: clamp(3.25rem, 10vw, 4.8rem); }
}
@media (max-width: 440px) {
  .roster-toolbar { padding: .48rem; gap: .28rem .55rem; }
  .roster-add { margin-inline-start: 0; }
  .squad-filters :is(button, a) { padding-inline: .55rem; }
  .player-media { aspect-ratio: 5 / 4; }
  .player-stats { column-gap: .4rem; }
  .player-badge { top: .42rem; left: .42rem; max-width: calc(100% - .84rem); font-size: .69rem; }
}
@media (max-width: 355px) {
  .team .player-grid { grid-template-columns: minmax(0, 1fr); }
}
