/* Pass D — roster */

/* ===== rosterStyle ===== */

.fifa-roster {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
  gap: .8rem;
}

.fifa-card {
  position: relative;
  overflow: hidden;
  padding: 1rem;
  border: 1px solid #b9d8c3;
  border-radius: 18px;
  background: linear-gradient(145deg,#075b36,#0a8750);
  color: #fff;
  box-shadow: 0 10px 22px #075d3420;
}

.fifa-card:after {
  content: "";
  position: absolute;
  width: 10rem;
  height: 10rem;
  right: -4rem;
  bottom: -6rem;
  border: 18px solid #ffffff16;
  border-radius: 50%;
}

.fifa-card>* {
  position: relative;
  z-index: 1;
}

.fifa-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.fifa-number {
  font-size: 1.8rem;
  font-weight: 900;
  line-height: 1;
}

.fifa-avatar {
  width: 3rem;
  height: 3rem;
  font-size: .9rem;
  background: #ffffff24;
}

.fifa-position {
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.fifa-card h2 {
  margin: .8rem 0 .1rem;
  font-size: 1.08rem;
}

.fifa-nickname {
  margin: 0;
  color: #d8f4e1;
  font-size: .78rem;
  font-weight: 700;
}

.fifa-details {
  display: grid;
  gap: .3rem;
  margin-top: .8rem;
  font-size: .72rem;
  color: #d8f4e1;
}

.fifa-details b {
  color: #fff;
}

.fifa-stats {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: .35rem;
  margin-top: .9rem;
}

.fifa-stats span {
  padding: .42rem .2rem;
  border-radius: 8px;
  background: #ffffff18;
  text-align: center;
  font-size: .61rem;
}

.fifa-stats b {
  display: block;
  font-size: 1rem;
}

.fifa-no-stats {
  margin: .85rem 0 0;
  color: #d8f4e1;
  font-size: .72rem;
}

/* ===== rosterEditStyle ===== */

.fifa-portrait {
  width: 3rem;
  height: 3rem;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #ffffff70;
}

.roster-edit {
  margin-top: .8rem;
}

.roster-edit summary {
  font-size: .7rem;
  font-weight: 900;
  cursor: pointer;
}

.roster-edit-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .4rem;
  margin-top: .55rem;
}

.roster-edit-form label {
  display: grid;
  gap: .15rem;
  color: #d8f4e1;
  font-size: .63rem;
  font-weight: 800;
}

.roster-edit-form input,.roster-edit-form select {
  min-width: 0;
  padding: .35rem;
  border: 0;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: .72rem;
}

.roster-edit-form .roster-photo-field,.roster-edit-form button {
  grid-column: 1/-1;
}

.roster-edit-form button {
  min-height: 34px;
  font-size: .75rem;
}

/* ===== fifaFlipStyle ===== */

.fifa-roster-v2 {
  grid-template-columns: repeat(auto-fit,minmax(265px,1fr));
  gap: 1rem;
}

.fifa-flip-card {
  min-height: 430px;
  perspective: 1400px;
}

.fifa-flip-inner {
  position: relative;
  min-height: 430px;
  height: 100%;
  transition: transform .62s cubic-bezier(.2,.72,.2,1);
  transform-style: preserve-3d;
}

.fifa-flip-card.is-flipped .fifa-flip-inner {
  transform: rotateY(180deg);
}

.fifa-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: auto;
  padding: 1.05rem;
  border: 1px solid #9ed1af;
  border-radius: 20px;
  background: linear-gradient(145deg,#075b36,#0a8750);
  box-shadow: 0 10px 24px #075d3422;
  color: #fff;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.fifa-face:after {
  content: "";
  position: absolute;
  width: 11rem;
  height: 11rem;
  right: -4rem;
  bottom: -6rem;
  border: 18px solid #ffffff16;
  border-radius: 50%;
}

.fifa-face>* {
  position: relative;
  z-index: 1;
}

.fifa-back {
  transform: rotateY(180deg);
  background: linear-gradient(145deg,#064d2a,#08713d);
}

.fifa-player-head {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: .85rem;
  align-items: center;
}

.fifa-player-photo {
  display: block;
  width: 104px;
  height: 128px;
  object-fit: cover;
  border: 2px solid #ffffff85;
  border-radius: 14px;
  background: #e0eee4;
}

.fifa-empty-photo {
  display: grid;
  place-items: center;
  color: #fff;
  background: #ffffff28;
  font-size: 1.25rem;
  font-weight: 900;
}

.fifa-player-head h2,.fifa-back h2 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.08;
}

.fifa-role {
  margin: .42rem 0 0;
  color: #d8f4e1;
  font-size: .9rem;
  font-weight: 900;
}

.fifa-role b {
  padding: 0 .15rem;
}

.fifa-bio {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
  margin-top: 1rem;
}

.fifa-bio>div,.fifa-nickname-line {
  padding: .55rem .6rem;
  border: 1px solid #ffffff32;
  border-radius: 10px;
  background: #ffffff12;
}

.fifa-bio span,.fifa-nickname-line span {
  display: block;
  color: #d8f4e1;
  font-size: .63rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.fifa-bio b,.fifa-nickname-line b {
  display: block;
  margin-top: .14rem;
  font-size: .77rem;
}

.fifa-nickname-line {
  margin-top: .5rem;
}

.fifa-flip-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  width: 100%;
  min-height: 38px;
  margin-top: auto;
  border: 1px solid #ffffff70;
  border-radius: 10px;
  background: #fff;
  color: var(--deep);
  font-size: .76rem;
  font-weight: 900;
}

.fifa-flip-toggle span {
  font-size: 1rem;
}

.fifa-back-heading {
  padding-bottom: .65rem;
  border-bottom: 1px solid #ffffff32;
}

.fifa-back-label {
  color: #c7efd4;
  font-size: .66rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.fifa-stat-grid {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: .5rem;
  margin-top: .85rem;
}

.fifa-stat-grid span {
  display: grid;
  place-items: center;
  min-height: 66px;
  padding: .4rem;
  border-radius: 11px;
  background: #ffffff14;
  text-align: center;
  color: #d8f4e1;
  font-size: .65rem;
  font-weight: 800;
}

.fifa-stat-grid b {
  display: block;
  color: #fff;
  font-size: 1.3rem;
}

.fifa-back .fifa-no-stats {
  margin: .9rem 0;
  color: #d8f4e1;
}

.roster-editor {
  margin-top: .75rem;
}

.roster-editor summary {
  cursor: pointer;
  font-size: .74rem;
  font-weight: 900;
}

.roster-editor-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .42rem;
  margin-top: .55rem;
}

.roster-editor-form label {
  display: grid;
  gap: .15rem;
  color: #d8f4e1;
  font-size: .61rem;
  font-weight: 800;
}

.roster-editor-form input,.roster-editor-form select {
  min-width: 0;
  padding: .38rem;
  border: 0;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: .72rem;
}

.roster-editor-photo,.roster-editor-form button,.roster-readonly {
  grid-column: 1/-1;
}

.roster-readonly {
  margin: .15rem 0;
  color: #d8f4e1;
  font-size: .63rem;
}

.roster-editor-form button {
  min-height: 35px;
  font-size: .72rem;
}

.fifa-back-toggle {
  margin-top: .65rem;
}

@media (max-width:380px) {
  .fifa-player-head {
    grid-template-columns: 88px 1fr;
  }
  .fifa-player-photo {
    width: 88px;
    height: 112px;
  }
}

/* ===== fifaRosterV3Style ===== */

.fifa-roster-v3 {
  grid-template-columns: repeat(auto-fit,minmax(285px,1fr));
  gap: 1rem;
}

.fifa-flip-card {
  min-height: 430px;
  perspective: 1400px;
}

.fifa-flip-inner {
  position: relative;
  min-height: 430px;
  height: 100%;
  transition: transform .62s cubic-bezier(.2,.72,.2,1);
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
}

.fifa-flip-card.is-flipped .fifa-flip-inner {
  transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg);
}

.fifa-face {
  overflow: hidden !important;
  padding: 1rem;
  border: 1px solid #9b7b36;
  border-radius: 18px;
  background: linear-gradient(145deg,#070807,#17150f);
  color: #fff;
  box-shadow: 0 12px 26px #0003;
  backface-visibility: hidden !important;
  -webkit-backface-visibility: hidden !important;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  transition: opacity .12s linear;
}

.fifa-face:after {
  border-color: #cba75920;
}

.fifa-front {
  opacity: 1;
  pointer-events: auto;
}

.fifa-back {
  opacity: 0;
  pointer-events: none;
  transform: rotateY(180deg) translateZ(1px);
  -webkit-transform: rotateY(180deg) translateZ(1px);
  background: linear-gradient(145deg,#14130f,#050605);
}

.fifa-flip-card.is-flipped .fifa-front {
  opacity: 0;
  pointer-events: none;
}

.fifa-flip-card.is-flipped .fifa-back {
  opacity: 1;
  pointer-events: auto;
}

.fifa-card-number {
  position: absolute;
  top: .7rem;
  left: .8rem;
  color: #d8b661;
  font-size: 1.55rem;
  font-weight: 900;
  font-style: italic;
}

.fifa-front-grid {
  display: grid;
  grid-template-columns: 42% 1fr;
  gap: .65rem;
  height: 293px;
  padding-top: 1.9rem;
}

.fifa-photo-wrap {
  overflow: hidden;
  border: 1px solid #c8a652;
  border-radius: 12px;
  background: linear-gradient(145deg,#25221a,#090a08);
}

.fifa-player-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  border-radius: 0;
}

.fifa-empty-photo {
  display: grid;
  place-items: center;
  color: #d8b661;
  background: #211f18;
  font-size: 1.4rem;
  font-weight: 900;
}

.fifa-profile-fields {
  display: grid;
  align-content: start;
  gap: .38rem;
}

.fifa-profile-row {
  padding: .4rem .45rem;
  border-bottom: 1px solid #caa75538;
}

.fifa-profile-row span {
  display: block;
  color: #d8b661;
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.fifa-profile-row b {
  display: block;
  margin-top: .08rem;
  font-size: .78rem;
  line-height: 1.12;
}

.fifa-physical {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .55rem;
}

.fifa-physical span {
  padding: .32rem .42rem;
  border: 1px solid #caa75548;
  border-radius: 7px;
  color: #ded5bd;
  font-size: .62rem;
}

.fifa-physical b {
  color: #fff;
}

.fifa-flip-toggle {
  min-height: 36px;
  border-color: #c8a652;
  background: #d8b661;
  color: #17150f;
}

.fifa-back-heading {
  border-bottom-color: #c8a65255;
}

.fifa-back-label {
  color: #d8b661;
}

.fifa-stat-grid {
  grid-template-columns: repeat(2,1fr);
  gap: .55rem;
  margin-top: 1rem;
}

.fifa-stat-grid span {
  min-height: 82px;
  border: 1px solid #c8a6524a;
  border-radius: 10px;
  background: #c8a65210;
  color: #dfd6bd;
}

.fifa-stat-grid b {
  color: #d8b661;
  font-size: 1.55rem;
}

.fifa-back .fifa-no-stats {
  color: #dfd6bd;
}

.fifa-edit-trigger {
  min-height: 38px;
  margin-top: auto;
  border: 1px solid #d8b661;
  border-radius: 10px;
  background: transparent;
  color: #f5e6b8;
  font-size: .75rem;
  font-weight: 900;
}

.fifa-back-toggle {
  margin-top: .5rem;
}

.roster-edit-panel {
  margin-top: 1rem;
  padding: 1rem;
}

.roster-manager-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem;
  margin-top: 1rem;
}

.roster-manager-form label {
  display: grid;
  gap: .25rem;
  color: #4e6357;
  font-family: var(--font-ui);
  font-size: .86rem;
  font-weight: 700;
}

.roster-manager-form input,.roster-manager-form select {
  min-height: 40px;
  padding: .5rem .6rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
}

.roster-manager-wide,.roster-manager-form button,.roster-locked {
  grid-column: 1/-1;
}

.roster-locked {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  padding: .65rem;
  border-radius: 9px;
  background: var(--paper);
  color: var(--muted);
  font-size: .72rem;
}

.roster-locked span {
  padding: .25rem .4rem;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.roster-locked b {
  color: var(--ink);
}

.roster-locked small {
  width: 100%;
}

@media (max-width:380px) {
  .fifa-front-grid {
    grid-template-columns: 40% 1fr;
  }
  .fifa-profile-row {
    padding: .34rem;
  }
  .fifa-profile-row b {
    font-size: .71rem;
  }
}

/* ===== playerBannerStyle ===== */

.player-banner-roster {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(290px,1fr));
  gap: 1rem;
}

.player-banner-card {
  overflow: hidden;
  border: 1px solid #b9d8c3;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 20px #0c482014;
}

.player-banner-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 43%;
  min-height: 196px;
  overflow: hidden;
  background: linear-gradient(125deg,#f8fcf9 0%,#e6f1e9 50%,#c6dfd0 100%);
}

.player-banner-hero:after {
  content: "";
  position: absolute;
  width: 15rem;
  height: 15rem;
  right: 24%;
  top: -8rem;
  border: 30px solid #08713d0b;
  border-radius: 50%;
  transform: rotate(20deg);
}

.player-banner-title {
  position: relative;
  z-index: 1;
  align-self: center;
  padding: 1rem;
}

.player-banner-title strong {
  display: block;
  color: #08713d;
  font-size: 3.9rem;
  line-height: .74;
  font-weight: 900;
  letter-spacing: -.1em;
}

.player-banner-title span {
  display: block;
  margin-top: .8rem;
  color: #476154;
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.player-banner-title h2 {
  margin: .08rem 0;
  font-size: 1.35rem;
  letter-spacing: -.04em;
}

.player-banner-title p {
  margin: .2rem 0 0;
  color: #476154;
  font-size: .76rem;
  font-weight: 800;
}

.player-banner-photo {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border: 0;
  border-left: 1px solid #ffffff80;
  padding: 0;
  background: #c6dfd0;
  cursor: zoom-in;
}

.player-banner-photo img,.player-banner-photo>span {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.player-banner-photo>span {
  display: grid;
  place-items: center;
  background: #176a45;
  color: #fff;
  font-size: 1.3rem;
  font-weight: 900;
}

.player-banner-photo i {
  position: absolute;
  right: .45rem;
  bottom: .45rem;
  padding: .28rem .4rem;
  border-radius: 7px;
  background: #ffffffde;
  color: var(--deep);
  font-size: .6rem;
  font-style: normal;
  font-weight: 900;
}

.player-banner-details {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.player-banner-details span {
  min-width: 0;
  padding: .68rem .38rem;
  border-right: 1px solid var(--line);
  color: var(--ink);
  font-size: .65rem;
  font-weight: 800;
  text-align: center;
  overflow-wrap: anywhere;
}

.player-banner-details span:last-child {
  border-right: 0;
}

.player-banner-details b {
  display: block;
  margin-bottom: .25rem;
  color: var(--muted);
  font-size: .54rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.player-banner-stats {
  padding: .75rem .85rem;
}

.player-banner-stats h3 {
  margin: 0 0 .6rem;
  color: #08713d;
  font-size: .72rem;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.banner-stats {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: .45rem;
}

.banner-stats span {
  display: grid;
  min-height: 58px;
  place-items: center;
  padding: .35rem;
  border-radius: 9px;
  background: var(--paper);
  color: var(--muted);
  font-size: .57rem;
  font-weight: 800;
  text-align: center;
}

.banner-stats b {
  display: block;
  color: var(--deep);
  font-size: 1.22rem;
}

.banner-no-stats {
  margin: 0;
  color: var(--muted);
  font-size: .75rem;
}

.player-banner-edit {
  width: calc(100% - 1.7rem);
  min-height: 35px;
  margin: 0 .85rem .85rem;
  border: 1px solid #b7d7c1;
  border-radius: 9px;
  background: #fff;
  color: var(--deep);
  font-size: .72rem;
  font-weight: 900;
}

@media (max-width:520px) {
  .player-banner-details {
    grid-template-columns: repeat(2,1fr);
  }
  .player-banner-details span:nth-child(2) {
    border-right: 0;
  }
  .player-banner-details span:nth-child(-n+2) {
    border-bottom: 1px solid var(--line);
  }
}

/* ===== playerProfileStyle ===== */

.player-profile-roster {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 1.2rem;
}

.player-profile-card {
  overflow: hidden;
  border: 1px solid #c9e0d0;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 28px #0c482012;
}

.player-profile-hero {
  position: relative;
  min-height: 245px;
  overflow: hidden;
  background: linear-gradient(115deg,#f9fdf9 0%,#eaf4ed 49%,#cfe4d5 100%);
}

.player-profile-hero:after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(90deg,#f9fdf9 0%,#f9fdf9eF 42%,#f9fdf956 62%,#f9fdf900 82%);
  pointer-events: none;
}

.player-immersive-photo {
  position: absolute;
  inset: 0 0 0 32%;
  width: 68%;
  border: 0;
  padding: 0;
  background: #d6e8da;
  cursor: zoom-in;
}

.player-immersive-photo img,.player-immersive-photo>span {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.player-immersive-photo>span {
  display: grid;
  place-items: center;
  background: #176a45;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 900;
}

.player-profile-name {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 245px;
  width: 62%;
  flex-direction: column;
  justify-content: center;
  padding: 1.1rem;
}

.player-profile-name strong {
  color: #08713d;
  font-size: 4.5rem;
  line-height: .68;
  font-weight: 950;
  letter-spacing: -.12em;
}

.player-profile-name span {
  margin-top: 1rem;
  color: #607568;
  font-size: .65rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.player-profile-name h2 {
  margin: .1rem 0;
  font-size: 1.5rem;
  letter-spacing: -.05em;
}

.player-profile-name p {
  margin: .2rem 0 0;
  color: #476154;
  font-size: .78rem;
  font-weight: 800;
}

.player-photo-zoom {
  position: absolute;
  z-index: 3;
  right: .65rem;
  bottom: .65rem;
  width: 1.85rem;
  height: 1.85rem;
  border: 1px solid #ffffffa8;
  border-radius: 50%;
  background: #08713de6;
  color: #fff;
  font-size: 1.12rem;
  line-height: 1;
}

.player-profile-facts {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  padding: .65rem .8rem;
  background: transparent;
}

.player-profile-facts span {
  display: inline-flex;
  align-items: baseline;
  gap: .28rem;
  color: var(--ink);
  font-size: .68rem;
  font-weight: 800;
}

.player-profile-facts b {
  color: var(--muted);
  font-size: .57rem;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.player-profile-facts span:not(:last-child):after {
  content: "";
  width: 3px;
  height: 3px;
  margin-left: .18rem;
  border-radius: 50%;
  background: #87a393;
}

.player-profile-stats {
  padding: .2rem .8rem .75rem;
}

.player-profile-stats .banner-stats {
  grid-template-columns: repeat(3,1fr);
  gap: .35rem;
}

.player-profile-stats .banner-stats span {
  min-height: 49px;
  border-radius: 8px;
  background: #f3f7f3;
  font-size: .58rem;
}

.player-profile-stats .banner-stats b {
  font-size: 1.12rem;
}

.player-profile-stats .banner-no-stats {
  padding: .4rem 0;
  font-size: .7rem;
}

.player-profile-edit {
  min-height: 29px;
  margin: 0 .8rem .75rem;
  padding: .25rem .5rem;
  border: 0;
  background: transparent;
  color: #08713d;
  font-size: .62rem;
  font-weight: 900;
}

.roster-editor-modal {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: center;
  padding: .65rem;
}

.roster-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: #06140bd9;
}

.roster-editor-dialog {
  position: relative;
  z-index: 1;
  width: min(100%,760px);
  max-height: calc(100vh - 1.3rem);
  overflow-y: auto;
  border: 1px solid #ffffff55;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 20px 50px #0008;
}

.player-photo-close {
  position: absolute;
  z-index: 2;
  top: .55rem;
  right: .55rem;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 50%;
  background: #ffffffeB;
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1;
}

.roster-editor-dialog {
  width: min(100%,620px);
  padding: 1rem;
}

.roster-editor-dialog .title {
  padding-right: 2rem;
}

.roster-editor-dialog .roster-manager-form {
  margin-bottom: 0;
}

/* Active player editor: the dialog owns the viewport, while only its body scrolls. */
.roster-editor-modal {
  box-sizing: border-box;
  height: 100vh;
  min-height: 100svh;
  height: 100dvh;
  padding: max(.65rem, env(safe-area-inset-top, 0px)) max(.65rem, env(safe-area-inset-right, 0px)) max(.65rem, env(safe-area-inset-bottom, 0px)) max(.65rem, env(safe-area-inset-left, 0px));
  overflow: hidden;
  overscroll-behavior: contain;
}

.player-edit-dialog {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  height: min(100vh, 760px);
  min-height: 0;
  max-height: calc(100vh - 1.3rem);
  padding: 0;
  overflow: hidden;
}

.player-edit-modal-header,
.player-edit-modal-footer {
  flex: 0 0 auto;
  position: relative;
  z-index: 2;
  background: #fff;
}

.player-edit-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: calc(.8rem + env(safe-area-inset-top, 0px)) 1rem .8rem;
  border-bottom: 1px solid var(--line);
}

.player-edit-modal-header .title {
  min-width: 0;
  padding-right: 0;
}

.player-edit-modal-header h2 {
  margin: 0;
  overflow-wrap: anywhere;
}

.player-edit-modal-header .eyebrow {
  display: none;
}

.player-edit-modal-header h2 {
  color: #4e6357;
  font-family: var(--font-ui);
  font-size: .76rem;
  font-weight: 900;
  text-shadow: 0 1px 1px rgba(255, 255, 255, .28);
  letter-spacing: .09em;
  text-transform: uppercase;
}

.player-edit-close,
.player-edit-modal-footer button {
  min-width: 44px;
  min-height: 44px;
}

.player-edit-close {
  position: static;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
}

.roster-manager-form {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  gap: 0;
  margin-top: 0;
}

.player-edit-modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1rem;
}

.player-edit-modal-body > label {
  min-width: 0;
}

.player-edit-modal-body input,
.player-edit-modal-body select {
  min-height: 44px;
  box-sizing: border-box;
  font-family: var(--font-ui);
  font-weight: 400;
}

.player-edit-modal-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: .6rem;
  padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
}

.player-edit-modal-footer button {
  grid-column: auto;
  width: 100%;
}

.secondary-position-editor-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.secondary-position-editor-heading small {
  display: block;
  margin-top: .2rem;
}

.secondary-position-editor-toggle {
  flex: 0 0 auto;
  min-height: 44px;
  padding: .55rem .7rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--deep);
  font-weight: 800;
}

.secondary-position-summary {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .6rem;
}

.secondary-position-chip,
.secondary-position-empty {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: .35rem .65rem;
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
  font-size: .72rem;
  font-weight: 800;
}

.secondary-position-empty {
  color: var(--muted);
}

.secondary-position-panel {
  margin-top: .7rem;
  padding: .7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}

.secondary-position-panel .secondary-position-point {
  min-width: 44px;
  min-height: 44px;
}

@media (max-width:650px) {
  .player-edit-dialog {
    width: min(100%, 620px);
    max-height: calc(100dvh - 1.3rem);
    border-radius: 14px;
  }

  .player-edit-modal-body {
    grid-template-columns: 1fr;
    padding: .9rem;
  }

  .player-edit-modal-body .roster-manager-wide {
    grid-column: auto;
  }

  .player-edit-modal-footer {
    padding-left: .9rem;
    padding-right: .9rem;
  }

  .secondary-position-editor-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .secondary-position-editor-toggle {
    width: 100%;
  }
}

@media (max-width:720px) {
  .player-profile-roster {
    grid-template-columns: 1fr;
  }
  .player-profile-hero {
    min-height: 235px;
  }
  .player-profile-name {
    min-height: 235px;
  }
  .player-profile-name strong {
    font-size: 4rem;
  }
}

@media (max-width:390px) {
  .player-profile-name {
    width: 66%;
    padding: .85rem;
  }
  .player-profile-name strong {
    font-size: 3.5rem;
  }
  .player-profile-name h2 {
    font-size: 1.25rem;
  }
  .player-profile-facts {
    gap: .28rem;
    padding: .55rem .65rem;
  }
  .player-profile-facts span {
    font-size: .62rem;
  }
}

/* ===== finalPlayerCardStyle ===== */

.player-card-list {
  display: grid;
  gap: 1rem;
}

.roster-position-sticky-sentinel {
  height: 1px;
  margin-bottom: -1px;
  pointer-events: none;
}

.roster-position-filters {
  position: sticky;
  top: .45rem;
  z-index: 20;
  container-type: inline-size;
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  gap: clamp(.12rem, .55cqw, .4rem);
  margin-top: .35rem;
  margin-bottom: 1rem;
  padding: clamp(.3rem, 1.2cqw, .35rem) clamp(.12rem, .5cqw, .25rem);
  border: 1px solid rgba(220, 242, 227, .68);
  border-radius: var(--radius-glass);
  background: linear-gradient(135deg, rgba(255, 255, 255, .2), rgba(239, 248, 242, .1) 46%, rgba(8, 91, 50, .12)), rgba(239, 248, 242, .2);
  box-shadow: 0 8px 20px rgba(8, 55, 35, .16), inset 0 1px 0 rgba(255, 255, 255, .5);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  transition: background-color .24s ease, box-shadow .24s ease, border-color .24s ease;
}

.roster-position-filters.is-stuck {
  border-color: rgba(220, 242, 227, .62);
  background: linear-gradient(135deg, rgba(255, 255, 255, .24), rgba(239, 248, 242, .12) 46%, rgba(8, 91, 50, .14)), rgba(239, 248, 242, .25);
  box-shadow: 0 10px 22px rgba(5, 40, 24, .18);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

.roster-position-filters.is-stuck .roster-position-filter:not(.is-active) {
  background: rgba(255, 255, 255, .2);
}

.roster-position-filters::-webkit-scrollbar {
  display: none;
}

.roster-position-filters.is-dragging {
  will-change: transform;
  user-select: none;
}

.roster-position-filter {
  flex: 1 1 0;
  min-width: 0;
  min-height: clamp(30px, 8cqw, 36px);
  padding: .3rem clamp(.12rem, .7cqw, .3rem);
  border: 1px solid rgba(220, 242, 227, .72);
  border-radius: var(--radius-glass);
  background: linear-gradient(145deg, rgba(255, 255, 255, .4), rgba(255, 255, 255, .18));
  backdrop-filter: blur(11px) saturate(1.15);
  -webkit-backdrop-filter: blur(11px) saturate(1.15);
  color: #214d38;
  font-size: clamp(.48rem, 2.1cqw, .72rem);
  font-weight: 800;
  white-space: nowrap;
  text-align: center;
  letter-spacing: -.025em;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.roster-position-filter.is-active {
  border-color: rgba(8, 91, 50, .82);
  background: rgba(8, 91, 50, .9);
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .roster-position-filter {
    transition: none;
  }

}

.player-card {
  overflow: hidden;
  border: 1px solid #cce2d3;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 26px #0b4b2612;
}

.player-banner {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  background: linear-gradient(115deg,#fff 0%,#eff8f1 44%,#bcdec8 100%);
}

.player-shapes {
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg,transparent 0 43%,#08713d0d 43% 46%,transparent 46% 52%,#08713d0a 52% 55%,transparent 55%),radial-gradient(circle at 77% 22%,#08713d18 0 3px,transparent 3px 100%);
  background-size: auto,12px 12px;
}

.player-watermark {
  position: absolute;
  z-index: 1;
  left: 39%;
  top: 50%;
  width: 230px;
  opacity: .12;
  transform: translate(-50%,-50%);
}

.player-identity {
  position: relative;
  z-index: 3;
  display: flex;
  min-height: 230px;
  width: 55%;
  flex-direction: column;
  justify-content: center;
  padding: 1.25rem 1.5rem;
}

.player-number {
  color: #08713d;
  font-size: 5.6rem;
  line-height: .68;
  font-weight: 950;
  letter-spacing: -.12em;
}

.player-lastname {
  margin-top: 1rem;
  color: #516b5a;
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.player-name {
  margin: .05rem 0;
  font-size: 1.75rem;
  letter-spacing: -.06em;
}

.player-nickname {
  margin: .1rem 0;
  color: #5d7666;
  font-size: .78rem;
  font-weight: 700;
}

.player-position {
  margin: .42rem 0 0;
  color: #0b6d3c;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.player-photo {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  width: 52%;
  height: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
}

.player-photo:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,#eff8f1 0%,transparent 28%,transparent);
}

.player-photo img,.player-banner-initials {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.player-banner-initials {
  display: grid;
  place-items: center;
  background: #188048;
  color: #fff;
  font-size: 2rem;
  font-weight: 900;
}

.player-details-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  width: 100%;
  min-height: 39px;
  border: 0;
  border-top: 1px solid #e0ece3;
  background: #fff;
  color: #08713d;
  font-size: .74rem;
  font-weight: 900;
}

.player-details-toggle span {
  transition: transform .25s;
}

.player-details.open+.player-edit-link {
}

.player-details.open~.player-details-toggle span {
  transform: rotate(180deg);
}

.player-details {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows .35s ease,opacity .22s ease;
}

.player-details.open {
  grid-template-rows: 1fr;
  opacity: 1;
}

.player-details>div {
  min-height: 0;
  overflow: hidden;
}

.player-info-row {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 0;
  margin: 0 1rem;
  padding: .9rem 0;
  border-top: 1px solid #e4ede6;
}

.player-info-row span {
  padding: .15rem .75rem;
  border-right: 1px solid #dce8df;
  text-align: center;
  font-size: .75rem;
  font-weight: 800;
}

.player-info-row span:last-child {
  border: 0;
}

.player-info-row b {
  display: block;
  margin-bottom: .28rem;
  color: #6b8272;
  font-size: .6rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.player-stats {
  margin: 0 1rem;
  padding: .3rem 0 1rem;
}

.player-stats h3 {
  margin: .35rem 0 .65rem;
  color: #08713d;
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.player-stats>div {
  display: grid;
  grid-template-columns: repeat(3,1fr);
}

.player-stats span {
  padding: .2rem .75rem;
  border-right: 1px solid #dce8df;
  text-align: center;
  color: #607568;
  font-size: .64rem;
  font-weight: 800;
}

.player-stats span:last-child {
  border: 0;
}

.player-stats b {
  display: block;
  margin-bottom: .1rem;
  color: #102b1b;
  font-size: 1.45rem;
}

.player-edit-link {
  min-height: 30px;
  margin: 0 .85rem .65rem;
  border: 0;
  background: transparent;
  color: #08713d;
  font-size: .62rem;
  font-weight: 900;
}

.player-edit-dialog {
  width: min(100%,650px);
}

@media (max-width:650px) {
  .player-banner {
    min-height: 195px;
  }
  .player-identity {
    min-height: 195px;
    width: 64%;
    padding: 1rem;
  }
  .player-number {
    font-size: 4.4rem;
  }
  .player-name {
    font-size: 1.4rem;
  }
  .player-photo {
    width: 55%;
  }
  .player-watermark {
    left: 56%;
    width: 180px;
  }
  .player-info-row {
    grid-template-columns: 1fr;
    gap: .25rem;
  }
  .player-info-row span {
    border-right: 0;
    border-bottom: 1px solid #edf3ee;
    padding: .48rem;
  }
  .player-info-row span:last-child {
    border-bottom: 0;
  }
  .player-stats>div {
    grid-template-columns: repeat(3,1fr);
  }
  .player-stats span {
    padding: .2rem;
  }
}

/* ===== playerDetailAnimationStyle ===== */

.player-details {
  display: block;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .38s ease,opacity .22s ease;
}

.player-details.open {
  max-height: 420px;
  opacity: 1;
}

.player-details>div {
  overflow: visible;
}

.player-details-toggle:has(+ .player-details.open) span {
  transform: rotate(180deg);
}

/* ===== refinedBannerStyle ===== */

.player-card-list {
  gap: 1.4rem;
}

.player-card {
  border: 1px solid #bfd8c7;
  border-radius: 22px;
  box-shadow: 0 12px 35px #174f2910;
}

.player-banner {
  min-height: 330px;
  background: linear-gradient(112deg,#f8fcf9 0%,#f0f8f3 48%,#d9eee0 100%);
}

.player-shapes {
  background: repeating-linear-gradient(123deg,transparent 0 94px,#0b6b3510 94px 125px,transparent 125px 174px,#fff7 174px 178px,transparent 178px 250px);
  background-size: auto;
}

.player-shapes:after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(#176a451a .6px,transparent .9px);
  background-size: 5px 5px;
  opacity: .24;
}

.player-watermark {
  left: 51%;
  width: 310px;
  opacity: .09;
  mix-blend-mode: multiply;
}

.player-identity {
  min-height: 330px;
  width: 57%;
  padding: 2rem 2.2rem;
  pointer-events: none;
}

.player-number {
  font-family: "Arial Black","Segoe UI",sans-serif;
  font-size: 6.9rem;
  font-style: italic;
  font-weight: 900;
  line-height: .85;
  letter-spacing: -.085em;
  background: linear-gradient(130deg,#0e8c47,#003e22);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.player-lastname {
  font-family: "Arial Black","Segoe UI",sans-serif;
  margin-top: .8rem;
  font-size: 2.35rem;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -.045em;
  color: #073c23;
  width: max-content;
  max-width: none;
  overflow-wrap: normal;
  white-space: nowrap;
}

.player-name {
  font-family: "Segoe UI",Arial,sans-serif;
  font-size: 2rem;
  font-weight: 900;
  text-shadow: 0 1px 1px rgba(255, 255, 255, .28);
  line-height: 1.12;
  text-transform: uppercase;
  letter-spacing: -.045em;
  color: #152e21;
  width: max-content;
  max-width: none;
  overflow-wrap: normal;
  white-space: nowrap;
}

.player-nickname {
  font-size: .85rem;
  letter-spacing: .12em;
  margin-top: .45rem;
}

.player-position {
  font-size: .86rem;
  letter-spacing: .13em;
  margin-top: .8rem;
  color: #0a6937;
}

.player-position:before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 2px;
  background: #138949;
  vertical-align: middle;
  margin-right: .55rem;
}

.player-photo {
  width: 43%;
  right: 2%;
  background: none;
  overflow: hidden;
}

.player-photo:after {
  display: none;
}

.player-photo img {
  background: transparent;
  object-fit: contain;
  object-position: bottom;
}

.player-photo-silhouette img {
  clip-path: polygon(50% 8.2%,55% 8.5%,59% 10%,62% 13%,63.5% 17%,63.5% 22%,65% 24%,64% 28%,62.5% 31%,61.5% 36%,66% 39%,77% 42%,84% 46%,89% 51%,92% 57%,94% 64%,96% 72%,94% 77%,93% 83%,90% 87%,84% 91%,82% 100%,18% 100%,16% 91%,10% 87%,7% 82%,5% 77%,3% 71%,6% 62%,9% 53%,13% 47%,19% 44%,27% 41%,34% 39%,38% 37%,37% 33%,35% 29%,34% 25%,35% 22%,36% 16%,39% 12%,44% 9%);
}

.player-banner-initials {
  background: transparent;
  color: #08713d30;
  font-size: 6rem;
  letter-spacing: -.08em;
}

.player-details-toggle {
  background: #f9fcfa;
  border-top: 1px solid #dceadf;
  min-height: 42px;
  font-size: .7rem;
  letter-spacing: .03em;
}

.player-info-row {
  padding: 1.3rem 0;
  margin: 0 1.6rem;
  border-top: 0;
}

.player-info-row b {
  font-size: .63rem;
  letter-spacing: .09em;
}

.player-stats {
  margin: 0 1.6rem;
  padding: .35rem 0 1.3rem;
  border-top: 1px solid #e3ece6;
}

.player-stats h3 {
  font-size: .68rem;
  letter-spacing: .16em;
}

.player-stats b {
  font-size: 1.8rem;
  font-weight: 800;
}

.player-edit-link {
  margin-top: .25rem;
}

@media (max-width:650px) {
  .player-banner,.player-identity {
    min-height: 270px;
  }
  .player-identity {
    width: 57%;
    padding: 1.3rem 1rem;
  }
  .player-number {
    font-size: 4.8rem;
  }
  .player-lastname {
    font-size: 1.45rem;
  }
  .player-name {
    font-size: 1.22rem;
  }
  .player-nickname {
    font-size: .65rem;
    letter-spacing: .05em;
  }
  .player-position {
    font-size: .74rem;
  }
  .player-photo {
    width: 52%;
    right: 0;
  }
  .player-photo-silhouette img {
  }
  .player-watermark {
    width: 210px;
    left: 59%;
  }
  .player-info-row,.player-stats {
    margin-left: 1rem;
    margin-right: 1rem;
  }
}

@media (prefers-reduced-motion:reduce) {
  .player-details {
    transition: none;
  }
}

.player-photo-silhouette img {
  clip-path: url(#camille-portrait-outline);
}

.player-card-actions {
  display: flex;
  gap: .5rem;
  padding: .25rem .55rem;
  border-top: 1px solid #dceadf;
  background: #f9fcfa;
}

.player-card-actions .player-details-toggle {
  flex: 1;
  min-height: 30px;
  height: 30px;
  font-size: .66rem;
  border: 0;
  background: transparent;
}

.player-card-actions .player-edit-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  margin: 0;
  padding: .35rem .7rem;
  border: 1px solid #a7cfb2;
  border-radius: 8px;
  background: #fff;
  color: #075b32;
  font-size: .68rem;
}

.player-banner-highlight {
  max-width: 92%;
  margin: .85rem 0 0;
  padding: .38rem .65rem .42rem;
  border-left: 2px solid #159653;
  border-radius: 0 8px 8px 0;
  background: #ffffff9c;
  color: #075b32;
  font-family: Georgia,"Times New Roman",serif;
  font-size: .88rem;
  font-style: italic;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.player-info-row {
  background: #f8fbf9;
  border-radius: 12px;
  margin-top: 1rem;
  margin-bottom: .55rem;
}

.player-info-extra {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 0 1.6rem;
  padding: 0 0 1.1rem;
  border-bottom: 1px solid #e3ece6;
}

.player-info-extra span {
  padding: .25rem .75rem;
  text-align: center;
  font-size: .75rem;
  font-weight: 800;
}

.player-info-extra b {
  display: block;
  margin-bottom: .3rem;
  color: #6b8272;
  font-size: .6rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.roster-manager-form small {
  color: var(--muted);
  font-weight: 600;
  line-height: 1.35;
}

.player-photo-upload {
  padding: .75rem;
  border: 1px dashed #9bc7a8;
  border-radius: 10px;
  background: #f7fbf8;
}

.player-photo-upload>span {
  color: var(--deep);
  font-weight: 900;
}

.player-photo-upload input {
  margin-top: .35rem;
}

.player-photo-upload small {
  display: block;
  margin-top: .35rem;
}

@media (max-width:650px) {
  .player-banner-highlight {
    max-width: 100%;
    margin-top: .6rem;
    padding: .28rem .45rem;
    font-size: .72rem;
  }
  .player-info-extra {
    margin-left: 1rem;
    margin-right: 1rem;
  }
.player-card-actions {
  padding: .25rem .55rem;
}
}

.player-options-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.player-options-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 30px;
  padding: 0;
  border: 1px solid rgba(167, 207, 178, .72);
  border-radius: 9px;
  background: rgba(255, 255, 255, .48);
  color: #075b32;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

@media (max-width:650px) {
  .player-options-toggle {
    width: 32px;
    height: 30px;
  }
}

.player-card-actions {
  position: relative;
  display: block;
}

.player-card-actions .player-details-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
}

.player-card-actions .player-options-wrap {
  position: absolute;
  top: 50%;
  right: .8rem;
  transform: translateY(-50%);
}

@media (max-width:650px) {
  .player-card-actions .player-options-wrap {
    right: .55rem;
  }
}

.player-details-action-center {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
}

.player-details-action-center .player-details-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  width: auto;
  align-items: center;
  justify-content: center;
  padding: .5rem 1.25rem;
}

.player-card-actions .player-options-wrap {
  z-index: 3;
}

.player-card {
  border: 1px solid #afcfba;
  border-radius: 26px;
  box-shadow: 0 18px 42px #0b432018;
  background: #fff;
}

.player-banner {
  isolation: isolate;
  min-height: 345px;
  background: linear-gradient(118deg,#ffffff 0%,#f3faf5 45%,#d1ead9 100%);
}

.player-banner:before {
  content: "";
  position: absolute;
  z-index: 0;
  right: -7%;
  top: -12%;
  width: 47%;
  height: 125%;
  background: linear-gradient(145deg,#08713d1c,#08713d04 55%,transparent);
  transform: skewX(-15deg);
  pointer-events: none;
}

.player-shapes {
  opacity: .78;
}

.player-watermark {
  z-index: 1;
  filter: drop-shadow(0 4px 2px #fff8);
}

.player-identity {
  z-index: 3;
  width: 56%;
  padding: 2.15rem 2.45rem;
}

.player-number {
  text-shadow: 0 3px 0 #ffffffa8;
}

.player-lastname {
  display: inline-flex;
  align-self: flex-start;
  padding: .32rem .55rem;
  margin-top: .9rem;
  border-radius: 5px;
  background: #0a6b3810;
  color: #075b32;
  font-size: .72rem;
  letter-spacing: .1em;
}

.player-name {
  margin-top: .22rem;
  color: #102b1b;
}

.player-nickname {
  padding-left: .15rem;
}

.player-position {
  display: flex;
  align-items: center;
  gap: .45rem;
  width: max-content;
  margin-top: .65rem;
  padding: .32rem .55rem;
  border: 1px solid #0a713d2e;
  border-radius: 999px;
  background: #ffffff9e;
}

.player-position:before {
  margin-right: 0;
}

.player-photo {
  z-index: 2;
  right: 1%;
  width: 44%;
  filter: drop-shadow(-14px 16px 13px #064d2a25);
}

.player-card-actions {
  position: relative;
  padding: .25rem .55rem;
  background: linear-gradient(90deg,#fbfdfb,#f0f8f2);
}

.player-card-actions:before {
  content: "";
  position: absolute;
  top: 0;
  left: 1rem;
  right: 1rem;
  height: 1px;
  background: #0a713d20;
}

.player-card-actions .player-details-toggle {
  min-height: 30px;
  height: 30px;
  color: #075b32;
}

.player-card-actions .player-edit-link {
  box-shadow: 0 2px 6px #0b4b2610;
}

.player-info-row {
  margin: 1.15rem 1.6rem .65rem;
  padding: 1rem 0;
  background: linear-gradient(100deg,#f5faf6,#fbfdfb);
  box-shadow: inset 0 0 0 1px #dceadf;
}

.player-info-row span {
  font-size: .8rem;
}

.player-info-row b,.player-info-extra b {
  color: #59806a;
}

.player-info-extra {
  padding-bottom: 1.2rem;
}

.player-stats {
  margin: 0 1.6rem;
  padding: 1.05rem 0 1.4rem;
}

.player-stats>div {
  gap: .55rem;
}

.player-stats span {
  border: 0;
  border-radius: 10px;
  background: #f4f9f5;
  padding: .55rem .35rem;
  color: #5b7463;
}

.player-stats b {
  color: #075b32;
  font-size: 1.7rem;
}

.player-banner-highlight {
  box-shadow: 0 5px 15px #0b4b2610;
}

@media (max-width:650px) {
  .player-card {
    border-radius: 20px;
  }
  .player-banner {
    min-height: 280px;
  }
  .player-identity {
    width: 59%;
    padding: 1.35rem 1.1rem;
  }
  .player-lastname {
    margin-top: .65rem;
    padding: .22rem .38rem;
    font-size: .59rem;
  }
  .player-position {
    margin-top: .45rem;
    padding: .24rem .4rem;
  }
  .player-photo {
    width: 49%;
    right: 0;
  }
  .player-info-row {
    margin: 1rem;
    padding: .35rem 0;
  }
  .player-stats {
    margin: 0 1rem;
    padding-bottom: 1rem;
  }
  .player-stats span {
    padding: .45rem .2rem;
  }
  .player-stats b {
    font-size: 1.45rem;
  }
}

.player-card {
  border: 1px solid #bfd8c7;
  border-radius: 22px;
  box-shadow: 0 12px 35px #174f2910;
}

.player-banner {
  min-height: 330px;
  background: linear-gradient(112deg,#f8fcf9 0%,#f0f8f3 48%,#d9eee0 100%);
}

.player-banner:before {
  content: none;
}

.player-shapes {
  opacity: 1;
}

.player-watermark {
  z-index: 1;
  filter: none;
}

.player-identity {
  z-index: 3;
  width: 57%;
  padding: 2rem 2.2rem;
}

.player-number {
  text-shadow: none;
}

.player-lastname {
  display: block;
  padding: 0;
  margin-top: .8rem;
  border-radius: 0;
  background: transparent;
  color: #073c23;
  font-size: 2.35rem;
  letter-spacing: -.045em;
}

.player-name {
  margin: .05rem 0;
  color: #152e21;
}

.player-nickname {
  padding-left: 0;
}

.player-position {
  display: block;
  width: auto;
  margin-top: .8rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.player-position:before {
  margin-right: .55rem;
}

.player-photo {
  z-index: 2;
  right: 2%;
  width: 43%;
  filter: none;
}

.player-card-actions {
  position: relative;
  padding: .25rem .55rem;
  background: transparent;
}

.player-card-actions:before {
  content: none;
}

.player-card-actions .player-details-toggle {
  min-height: 30px;
  height: 30px;
  color: #08713d;
}

.player-card-capture {
  position: absolute;
  left: .7rem;
  top: calc(-61cqw + 2rem);
  z-index: 5;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #08713d;
  font-size: 0;
  line-height: 1;
  transform: none;
}

.player-card.is-capturing .player-card-actions {
  visibility: hidden;
}

.player-card-capture::before {
  content: "";
  position: absolute;
  width: 17px;
  height: 12px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  background: radial-gradient(circle at center, currentColor 0 3px, transparent 3.5px);
}

.player-card-capture::after {
  content: "";
  position: absolute;
  top: 4px;
  width: 6px;
  height: 3px;
  border-radius: 2px 2px 0 0;
  background: currentColor;
}

.player-card-capture:disabled {
  opacity: .55;
}

.player-card-actions .player-edit-link {
  box-shadow: none;
}

.player-info-row {
  margin: 1rem 1.6rem .55rem;
  padding: 1.3rem 0;
  background: transparent;
  box-shadow: none;
}

.player-info-row span {
  font-size: .75rem;
}

.player-info-row b,.player-info-extra b {
  color: #6b8272;
}

.player-info-extra {
  padding-bottom: 1.1rem;
}

.player-stats {
  margin: 0 1.6rem;
  padding: .35rem 0 1.3rem;
}

.player-stats>div {
  gap: 0;
}

.player-stats span {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: .2rem .75rem;
  color: #607568;
}

.player-stats b {
  color: #102b1b;
  font-size: 1.8rem;
}

.player-card-highlight {
  margin: 0 1.6rem;
  padding: .65rem .85rem;
  border: 1px solid #cce2d3;
  border-radius: 10px;
  background: #f6fbf7;
  color: #075b32;
}

.player-card-highlight span {
  display: block;
  color: #15854a;
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.player-card-highlight p {
  margin: .18rem 0 0;
  font-family: Georgia,"Times New Roman",serif;
  font-size: .9rem;
  font-style: italic;
  font-weight: 700;
  line-height: 1.25;
}

@media (max-width:650px) {
  .player-card {
    border-radius: 20px;
  }
  .player-banner {
    min-height: 270px;
  }
  .player-identity {
    width: 57%;
    padding: 1.3rem 1rem;
  }
  .player-lastname {
    margin-top: .8rem;
    padding: 0;
    font-size: 1.45rem;
  }
  .player-position {
    margin-top: .8rem;
    padding: 0;
  }
  .player-photo {
    width: 52%;
    right: 0;
  }
  .player-info-row {
    margin: 1rem;
    padding: .35rem 0;
  }
  .player-stats {
    margin: 0 1rem;
    padding-bottom: 1rem;
  }
  .player-stats span {
    padding: .2rem;
  }
  .player-stats b {
    font-size: 1.45rem;
  }
  .player-card-highlight {
    margin: 0 1rem;
    padding: .55rem .65rem;
  }
}

.player-banner.has-highlight {
  padding-bottom: 62px;
}

.player-banner.has-highlight .player-photo {
  height: calc(100% - 62px);
  bottom: 62px;
}

.player-banner-highlight {
  position: absolute;
  z-index: 5;
  right: 0;
  bottom: 0;
  left: 0;
  max-width: none;
  height: 62px;
  margin: 0;
  padding: .55rem 2.2rem;
  border: 0;
  border-top: 1px solid #acd4b8;
  border-radius: 0;
  background: linear-gradient(90deg,#f6fbf7,#e5f3e9);
  box-shadow: none;
  color: #075b32;
  overflow: hidden;
}

.player-banner-highlight span {
  display: block;
  color: #16844b;
  font-family: Inter,ui-sans-serif,system-ui,sans-serif;
  font-size: .57rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.player-banner-highlight p {
  margin: .12rem 0 0;
  font-family: Georgia,"Times New Roman",serif;
  font-size: .88rem;
  font-style: italic;
  font-weight: 700;
  line-height: 1.18;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-position {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 116px;
  margin-top: .7rem;
  text-align: center;
}

.player-position:before {
  display: none;
}

.player-position span {
  display: block;
  color: #0a6937;
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.player-position b {
  display: block;
  width: 100%;
  margin-top: .22rem;
  padding-top: .22rem;
  border-top: 1px solid #14914c66;
  color: #075b32;
  font-size: .84rem;
  letter-spacing: .13em;
}

@media (max-width:650px) {
  .player-banner.has-highlight {
    padding-bottom: 55px;
  }
  .player-banner.has-highlight .player-photo {
    height: calc(100% - 55px);
    bottom: 55px;
  }
  .player-banner-highlight {
    height: 55px;
    padding: .42rem 1rem;
  }
  .player-banner-highlight span {
    font-size: .5rem;
  }
  .player-banner-highlight p {
    font-size: .72rem;
  }
  .player-position {
    width: 90px;
    margin-top: .55rem;
  }
  .player-position span {
    font-size: .6rem;
  }
  .player-position b {
    font-size: .7rem;
  }
}

.player-banner.has-highlight {
  padding-bottom: 0;
}

.player-banner.has-highlight .player-photo {
  height: 100%;
  bottom: 0;
}

.player-banner-highlight {
  top: 50%;
  right: 48%;
  bottom: auto;
  left: 33%;
  height: auto;
  min-height: 0;
  padding: .52rem .65rem;
  border: 1px solid #9bc9a9;
  border-radius: 10px;
  background: #f8fcf9e8;
  box-shadow: 0 7px 18px #075b3614;
  transform: translateY(-50%);
}

.player-banner-highlight p {
  font-size: .8rem;
  line-height: 1.25;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.player-banner-highlight span {
  font-size: .5rem;
}

@media (max-width:650px) {
  .player-banner.has-highlight {
    min-height: 330px;
  }
  .player-banner.has-highlight .player-photo {
    height: 100%;
    bottom: 0;
  }
  .player-banner-highlight {
    top: auto;
    right: 54%;
    bottom: 1rem;
    left: 8%;
    padding: .38rem .45rem;
    transform: none;
  }
  .player-banner-highlight p {
    font-size: .67rem;
    -webkit-line-clamp: 3;
  }
  .player-banner-highlight span {
    font-size: .46rem;
    letter-spacing: .08em;
  }
}

.player-banner.has-highlight .player-identity {
  width: 50%;
  justify-content: center;
}

.player-banner.has-highlight .player-banner-highlight {
  position: static;
  display: block;
  max-width: 100%;
  height: auto;
  min-height: 0;
  margin: .7rem 0 0;
  padding: 0;
  border: 0;
  border-left: 2px solid #159653;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
  color: #075b32;
}

.player-banner.has-highlight .player-banner-highlight span {
  display: block;
  padding-left: .45rem;
  color: #16844b;
  font-family: Inter,ui-sans-serif,system-ui,sans-serif;
  font-size: .52rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.player-banner.has-highlight .player-banner-highlight p {
  margin: .14rem 0 0;
  padding-left: .45rem;
  font-family: Georgia,"Times New Roman",serif;
  font-size: .82rem;
  font-style: italic;
  font-weight: 700;
  line-height: 1.18;
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

@media (max-width:650px) {
  .player-banner.has-highlight {
    min-height: 330px;
  }
  .player-banner.has-highlight .player-identity {
    width: 48%;
    padding-right: .6rem;
  }
  .player-banner.has-highlight .player-banner-highlight {
    margin-top: .55rem;
  }
  .player-banner.has-highlight .player-banner-highlight span {
    font-size: .46rem;
  }
  .player-banner.has-highlight .player-banner-highlight p {
    font-size: .66rem;
    -webkit-line-clamp: 3;
  }
}

.player-banner {
  min-height: 340px;
  height: 340px;
}

.player-identity {
  min-height: 340px;
}

.player-photo {
  width: 48%;
  height: 100%;
  overflow: hidden;
}

.player-card-actions {
  min-height: 0;
}

@media (max-width:650px) {
  .player-banner,.player-identity {
    min-height: 285px;
    height: 285px;
  }
  .player-photo {
    width: 55%;
    height: 100%;
  }
  .player-banner.has-highlight {
    min-height: 300px;
    height: 300px;
  }
}

.player-card {
  height: auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.player-banner {
  flex: 0 0 340px;
}

.player-card-actions {
  flex: 0 0 auto;
}

.player-details {
  flex: 0 0 auto;
  max-height: 0;
  overflow: hidden;
}

.player-details.open {
  flex: none;
  max-height: none;
  overflow: visible;
}

.player-profile-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 210px);
  gap: 1rem;
  align-items: start;
}

.player-profile-facts {
  min-width: 0;
}

.player-profile-top .player-secondary-details {
  min-width: 0;
  margin-top: 0;
}

.player-profile-top .secondary-position-pitch {
  margin-top: .45rem;
}

@media (max-width:650px) {
  .player-profile-top {
    grid-template-columns: minmax(0, 1fr) minmax(140px, 180px);
    gap: .55rem;
  }

  .player-profile-top .secondary-position-pitch {
    width: min(100%, 180px);
  }
}

@media (max-width:380px) {
  .player-profile-top {
    grid-template-columns: 1fr;
  }

  .player-profile-top .secondary-position-pitch {
    margin-right: auto;
    margin-left: auto;
  }
}

@media (max-width:650px) {
  .player-card {
    height: auto;
    min-height: 0;
  }
  .player-banner {
    flex-basis: 300px;
  }
}

.player-identity {
  width: 52%;
}

.player-photo {
  width: 58%;
  right: 0;
  overflow: hidden;
}

@media (max-width:650px) {
  .player-identity {
    width: 52%;
  }
  .player-photo {
    width: 60%;
    right: 0;
  }
}

.player-photo {
  left: auto;
  right: 0;
  width: 62%;
  z-index: 2;
  overflow: hidden;
}

.player-identity {
  z-index: 3;
  width: 52%;
  background: transparent;
}

@media (max-width:650px) {
  .player-photo {
    right: 0;
    width: 64%;
  }
  .player-identity {
    width: 52%;
    background: transparent;
  }
}

.player-photo img {
  object-fit: cover;
  object-position: 50% 8%;
  transform: none;
}

.player-photo-silhouette img {
  clip-path: none;
}

.roster-photo-actions {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: .5rem;
  margin-top: .55rem;
}

.roster-photo-actions label,
.roster-photo-actions > button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: .4rem .55rem;
  border: 1px solid #a7cfb2;
  border-radius: 8px;
  background: #fff;
  color: #075b32;
  font-size: .68rem;
  font-weight: 900;
  text-align: center;
  cursor: pointer;
}

.secondary-position-pitch {
  position: relative;
  width: min(100%, 330px);
  aspect-ratio: 3 / 5;
  margin: .75rem auto 0;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,.9);
  border-radius: 12px;
  background-color: #168b2b;
  background-image: repeating-linear-gradient(0deg, rgba(0,70,12,.13) 0 9%, rgba(70,190,45,.11) 9% 18%), repeating-linear-gradient(105deg, rgba(255,255,255,.025) 0 2px, transparent 2px 7px), linear-gradient(90deg, rgba(0,70,12,.1), transparent 45%, rgba(0,70,12,.1));
  box-shadow: inset 0 0 0 1px rgba(0,55,10,.35), 0 8px 18px rgba(9,74,24,.18);
}

.secondary-position-pitch:before,
.secondary-position-pitch:after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255,255,255,.75);
  pointer-events: none;
}

.secondary-position-pitch:before {
  inset: 4% 4%;
  border-radius: 0;
  box-shadow: inset 0 18% 0 -1px transparent;
}

.secondary-position-pitch:after {
  left: 4%; right: 4%; top: 50%; height: 0;
  border-width: 1px 0 0;
  box-shadow: 0 -1px 0 rgba(255,255,255,.15), 0 0 0 0 transparent;
}

.secondary-position-pitch-label {
  position: absolute;
  left: 50%;
  bottom: 2px;
  transform: translateX(-50%);
  color: rgba(255,255,255,.9);
  font-size: .48rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.secondary-position-point {
  position: absolute;
  z-index: 1;
  display: block;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  transform: translate(-50%, -50%);
}

.secondary-position-point-dot {
  display: block;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,.95);
  border-radius: 50%;
  background: rgba(255,255,255,.72);
  box-shadow: 0 1px 2px rgba(0,0,0,.18);
  transform: translate(-50%, -50%);
}

.secondary-position-point-label {
  display: block;
  position: absolute;
  left: 50%;
  top: calc(50% + 13px);
  color: transparent;
  font-size: .58rem;
  font-weight: 900;
  line-height: 1;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%);
}

.secondary-position-point.selected {
  z-index: 2;
}

.secondary-position-point.selected .secondary-position-point-dot {
  border-color: #f47721;
  background: #f47721;
  box-shadow: 0 0 0 3px rgba(244,119,33,.22), 0 1px 2px rgba(0,0,0,.18);
}

.secondary-position-point.selected .secondary-position-point-label {
  color: #fff;
  visibility: visible;
}

.secondary-position-editor {
  display: grid;
  gap: .45rem;
  padding: .7rem;
  border: 1px solid #dcebe0;
  border-radius: 12px;
  background: #f7fbf8;
}

.secondary-position-editor small {
  display: block;
  margin-top: .15rem;
  color: #6d8174;
  font-size: .72rem;
}

.secondary-position-choice-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
}

.secondary-position-choice {
  min-height: 44px;
  padding: .65rem .7rem;
  border: 1px solid #cfe0d3;
  border-radius: 10px;
  background: #fff;
  color: #245d3c;
  font: inherit;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.15;
  text-align: left;
  touch-action: manipulation;
}

.secondary-position-choice.selected {
  border-color: #245d3c;
  background: #245d3c;
  color: #fff;
}

@media (max-width: 360px) {
  .secondary-position-choice-list {
    grid-template-columns: 1fr;
  }
}

.player-secondary-details {
  display: grid;
  justify-items: start;
  gap: .25rem;
  margin-top: .7rem;
}

.player-secondary-details h3 {
  margin: 0;
  color: #516b5a;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.secondary-position-selected-list {
  margin: 0;
  color: #245d3c;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.35;
}

.secondary-position-selected-list.muted {
  color: #718277;
  font-weight: 500;
}

.secondary-position-pitch.editable .secondary-position-point {
  cursor: pointer;
  touch-action: manipulation;
}

.secondary-position-pitch.editable .secondary-position-point:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.point-ac-left { left: 30%; top: 19%; }
.point-ac-right { left: 70%; top: 19%; }
.point-moc { left: 50%; top: 32%; }
.point-mg { left: 14%; top: 43%; }
.point-md { left: 86%; top: 43%; }
.point-mdc-left { left: 38%; top: 53%; }
.point-mdc-right { left: 62%; top: 53%; }
.point-dg { left: 20%; top: 68%; }
.point-dc { left: 50%; top: 68%; }
.point-dd { left: 80%; top: 68%; }
.point-gb { left: 50%; top: 87%; }

/* One compact, complete football map. The marker hit area stays generous;
   its colour is the stored position level, while white means unselected. */
.position-level-pitch .secondary-position-point-dot {
  width: 27px;
  height: 27px;
  border-width: 2px;
  background: rgba(255,255,255,.78);
}

.position-level-pitch .secondary-position-point-label {
  top: 50%;
  visibility: visible;
  color: #075b32;
  font-size: .54rem;
  transform: translate(-50%, -50%);
}

.position-level-pitch .secondary-position-point.level-green .secondary-position-point-dot {
  border-color: #d9ffe7;
  background: #159c50;
  box-shadow: 0 0 0 3px rgba(21,156,80,.25), 0 1px 2px rgba(0,0,0,.2);
}

.position-level-pitch .secondary-position-point.level-orange .secondary-position-point-dot {
  border-color: #fff0df;
  background: #f47721;
  box-shadow: 0 0 0 3px rgba(244,119,33,.25), 0 1px 2px rgba(0,0,0,.2);
}

.position-level-pitch .secondary-position-point.level-red .secondary-position-point-dot {
  border-color: #ffe2e2;
  background: #d94040;
  box-shadow: 0 0 0 3px rgba(217,64,64,.25), 0 1px 2px rgba(0,0,0,.2);
}

.position-level-pitch .secondary-position-point.level-green .secondary-position-point-label,
.position-level-pitch .secondary-position-point.level-orange .secondary-position-point-label,
.position-level-pitch .secondary-position-point.level-red .secondary-position-point-label {
  color: #fff;
}

.position-level-pitch .point-ac { left: 50%; top: 16%; }
.position-level-pitch .point-ag { left: 15%; top: 28%; }
.position-level-pitch .point-ad { left: 85%; top: 28%; }
.position-level-pitch .point-sa { left: 50%; top: 30%; }
.position-level-pitch .point-moc { left: 50%; top: 42%; }
.position-level-pitch .point-mg { left: 22%; top: 54%; }
.position-level-pitch .point-mc { left: 50%; top: 54%; }
.position-level-pitch .point-md { left: 78%; top: 54%; }
.position-level-pitch .point-mdc { left: 50%; top: 65%; }
.position-level-pitch .point-dg { left: 16%; top: 76%; }
.position-level-pitch .point-dc { left: 50%; top: 76%; }
.position-level-pitch .point-dd { left: 84%; top: 76%; }
.position-level-pitch .point-gb { left: 50%; top: 89%; }

@media (max-width: 440px) {
  .secondary-position-pitch { width: min(100%, 300px); }
  .secondary-position-point { width: 46px; height: 46px; }
  .secondary-position-point-dot { width: 20px; height: 20px; }
  .position-level-pitch .secondary-position-point-dot { width: 27px; height: 27px; }
}

/* Player facts: one stable label/value line per fact, including narrow phones. */
.player-profile-facts .player-info-row {
  grid-template-columns: 1fr;
  gap: 0;
  padding-top: .35rem;
  padding-bottom: .35rem;
}

.player-profile-facts .player-info-extra {
  gap: 0;
  padding-top: 0;
  padding-bottom: .35rem;
}

.player-profile-facts .player-info-row span,
.player-profile-facts .player-info-extra span {
  display: grid;
  grid-template-columns: minmax(0, max-content) minmax(0, 1fr);
  align-items: center;
  gap: .55rem;
  min-width: 0;
  padding: .35rem .55rem;
  border: 0;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}

.player-profile-facts .player-info-row b,
.player-profile-facts .player-info-extra b {
  display: block;
  min-width: 0;
  margin: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.player-profile-facts .player-info-row span:not(:last-child):after {
  display: none;
}

@media (max-width: 440px) {
  .player-profile-facts .player-info-row span,
  .player-profile-facts .player-info-extra span {
    gap: .35rem;
    padding-left: .35rem;
    padding-right: .35rem;
    font-size: .68rem;
  }
}

/* Keep every player fact in one uniform vertical rhythm, including Pied fort. */
.player-profile-facts {
  display: grid;
  row-gap: .35rem;
}

.player-profile-facts > .player-info-row,
.player-profile-facts > .player-info-extra {
  display: contents;
  margin: 0;
  padding: 0;
  border: 0;
}

/* Stats now live in the facts column: keep them contained and centered. */
.player-profile-facts > .player-stats {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: .35rem clamp(.35rem, 1.7cqw, .55rem) .55rem;
  box-sizing: border-box;
}

.player-profile-facts > .player-stats > div {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
}

.player-profile-facts > .player-stats span {
  min-width: 0;
  padding: .2rem .1rem;
  text-align: center;
  font-size: .54rem;
  letter-spacing: -.02em;
  white-space: nowrap;
  overflow-wrap: normal;
}

.player-profile-facts > .player-stats b {
  font-size: 1.25rem;
}

.player-profile-facts > .player-stats span::before,
.player-profile-facts > .player-stats span::after {
  content: none;
}

.roster-photo-actions > button.danger {
  border-color: #efc7c4;
  background: #fff;
  color: var(--red);
}

.roster-photo-actions input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

@media (max-width:420px) {
  .roster-photo-actions {
    grid-template-columns: 1fr;
  }
}

.photo-editing-surface {
  cursor: grab;
  touch-action: none;
  overscroll-behavior: contain;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  user-select: none;
}

.photo-editing-surface:active {
  cursor: grabbing;
}

.photo-editing-surface img {
  pointer-events: none;
  -webkit-user-drag: none;
}

.photo-card-tools {
  padding: .6rem .8rem;
  border-top: 1px solid #cfe3d4;
  background: #f7fbf8;
}

.photo-card-tools .roster-photo-actions {
  margin: 0;
}

.photo-card-tools .photo-reposition-actions {
  max-width: none;
  margin-top: .45rem;
}

.photo-card-tools .form-error {
  margin: .45rem 0 0;
  font-size: .68rem;
}

.photo-reposition-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .55rem;
  max-width: 360px;
}

.photo-reposition-actions button {
  min-height: 32px;
  padding: .35rem .6rem;
  border: 1px solid #a7cfb2;
  border-radius: 8px;
  background: #fff;
  color: #075b32;
  font-size: .66rem;
  font-weight: 900;
}

.player-banner .player-position {
  margin-top: .45rem;
}

.player-banner .player-banner-highlight {
  margin-top: .45rem;
}

@media (max-width:650px) {
  .player-banner .player-position {
    margin-top: .35rem;
  }
  .player-banner .player-banner-highlight {
    margin-top: .35rem;
  }
}

/* ===== fluidReferenceScale ===== */

.player-card {
  container-type: inline-size;
}

.player-banner {
  min-height: 0;
  height: min(340px, 64.7727cqw);
  flex: 0 0 auto;
}

.player-banner.has-highlight {
  min-height: 0;
  height: min(340px, 77.2727cqw);
  flex-basis: auto;
}

.player-identity {
  min-height: 0;
  height: 100%;
}

.player-banner.has-highlight .player-banner-highlight p {
  overflow: visible;
  display: block;
  -webkit-line-clamp: unset;
  -webkit-box-orient: initial;
}

.player-profile-top {
  grid-template-columns: minmax(0, 1fr) minmax(140px, clamp(140px, 42cqw, 210px));
  gap: clamp(.45rem, 2cqw, 1rem);
}

/* ===== compact collector card ===== */

.player-card {
  overflow: hidden;
  border: 6px solid #fff;
  border-radius: 18px;
  color: #e7f4eb;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #06452d url("../assets/images/player-card-texture.webp") center top / 100% auto no-repeat;
}

.player-card * {
  font-family: inherit !important;
}

.player-details,
.player-profile-top,
.player-profile-facts,
.player-info-row,
.player-info-extra,
.player-stats {
  background: transparent;
}

.player-card-actions {
  border-top-color: transparent;
}

.player-card-actions .player-details-toggle {
  color: #d8f3df;
}

.player-info-row,
.player-info-extra {
  color: #f1f8f3;
  line-height: 1.18;
}

.player-info-row span,
.player-info-extra span {
  border-color: rgba(202, 235, 211, .2);
  color: #f1f8f3;
  line-height: 1.18;
}

.player-info-row b,
.player-info-extra b,
.player-stats h3 {
  color: #b4e2c0;
  line-height: 1.12;
}

.player-stats {
  border-top-color: rgba(202, 235, 211, .2);
}

.player-stats span {
  color: #c8d8ce;
  line-height: 1.15;
}

.player-stats b {
  color: #f4fbf6;
  line-height: 1;
}

.player-card-capture {
  color: #b9ebc8;
}

.player-options-toggle {
  border-color: rgba(191, 230, 202, .24);
  background: rgba(255, 255, 255, .045);
  box-shadow: none;
  color: #d8f3df;
}

/* Une seule texture portée par toute la carte, sans couche indépendante dans la bannière. */
.player-banner,
.player-banner::after,
.player-shapes {
  background: transparent;
}

/* Structure de carte : la texture est portée uniquement par .player-card.
   Les sous-sections restent transparentes afin qu'elle soit continue à l'ouverture. */
.player-card {
  position: relative;
  display: block;
}

.player-banner {
  position: relative;
  z-index: 1;
}

.player-card-actions {
  position: relative;
  z-index: 4;
  min-height: 32px;
  margin-top: -32px;
  padding: 0 .8rem;
  border-top: 0;
  background: transparent;
  text-shadow: 0 1px 8px rgba(0, 25, 15, .72);
}

.player-card-actions .player-details-toggle {
  width: 28px;
  min-height: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  color: #e1f5e6;
}

.player-details {
  position: relative;
  z-index: 2;
  margin-top: 0;
  background: transparent;
}

.roster-list > [data-roster-member][hidden] {
  display: none !important;
}

.player-banner {
  isolation: isolate;
  min-height: 0;
  height: auto;
  aspect-ratio: 1.64 / 1;
  flex-basis: auto;
  overflow: hidden;
  background: transparent;
}

.player-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, transparent 54%, rgba(3, 48, 31, .1) 68%, rgba(3, 48, 31, .5) 100%);
}

.player-shapes {
  z-index: 0;
  opacity: 0;
  background: transparent;
}

.player-watermark {
  left: 28%;
  top: 52%;
  z-index: 1;
  width: 38%;
  opacity: .09;
  filter: brightness(0) invert(1);
  mix-blend-mode: screen;
}

.player-identity {
  z-index: 4;
  display: block;
  width: 55%;
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding: clamp(1.6rem, 7cqw, 2.8rem) clamp(.85rem, 5cqw, 1.45rem) 1rem;
  background: transparent;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 25, 15, .72);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.player-number {
  background: transparent;
  background-clip: border-box;
  -webkit-background-clip: border-box;
  color: #f7faf8;
  font-size: clamp(3.25rem, 19cqw, 6.4rem);
  line-height: .72;
  text-shadow: 0 3px 0 #021f14;
}

.player-lastname {
  margin-top: clamp(.65rem, 3cqw, 1rem);
  width: max-content;
  max-width: calc(100% + 1rem);
  color: #f7faf8;
  font-size: clamp(.95rem, 5.8cqw, 2rem);
  line-height: 1;
  letter-spacing: -.035em;
  overflow-wrap: normal;
  word-break: normal;
  white-space: nowrap;
}

.player-name {
  margin: -.12rem 0 0;
  width: max-content;
  max-width: calc(100% + 1rem);
  color: #dfe9e3;
  font-size: clamp(.78rem, 4.6cqw, 1.65rem);
  line-height: 1.05;
  text-transform: none;
  letter-spacing: -.025em;
  overflow-wrap: normal;
  word-break: normal;
  white-space: nowrap;
}

.player-nickname {
  position: absolute;
  top: 35cqw;
  left: clamp(.85rem, 5cqw, 1.45rem);
  right: 0;
  margin: 0;
  margin: 0;
  color: #d7eadc;
  font-size: clamp(.65rem, 2.7cqw, .82rem);
  letter-spacing: .02em;
}

.player-position {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  position: absolute;
  top: 40cqw;
  left: clamp(.85rem, 5cqw, 1.45rem);
  margin-top: 0;
  padding: .28rem .7rem;
  border: 0;
  border-radius: 999px;
  background: #087d47;
  color: #fff;
  font-size: clamp(.58rem, 2.6cqw, .76rem);
  letter-spacing: .06em;
}

.player-position::before {
  display: none;
}

.player-position {
  border: 0;
  border-left: 3px solid #36bd78;
  border-radius: 0;
  background: transparent;
  color: #fff;
  box-shadow: none;
  font-family: Arial, sans-serif;
  font-size: clamp(.5rem, 3.1cqw, .86rem);
  font-weight: 950;
  letter-spacing: .08em;
  padding: .05rem 0 .05rem .55rem;
  text-shadow: 0 1px 2px #001f1280;
}

.player-position > span {
  color: #76d99b;
  font-family: Arial, sans-serif;
  font-size: inherit;
  font-weight: 950;
  letter-spacing: inherit;
  text-shadow: none;
}

.player-nickname {
  color: #e0f1e5;
  font-size: clamp(.56rem, 2.2cqw, .68rem);
  font-style: italic;
  font-weight: 600;
}

.player-photo {
  right: 0;
  bottom: 0;
  z-index: 3;
  width: 54%;
  height: 100%;
  overflow: hidden;
  filter: drop-shadow(-12px 10px 10px #001c1090);
}

.player-photo::after {
  display: block;
  background: linear-gradient(90deg, transparent 0%, transparent 18%, #063b2708 48%, transparent 100%);
}

/* Le bas du détouré se dissout dans la texture unique de la fiche ouverte,
   sans créer un second panneau ni une ligne de séparation. */
.player-photo:not(.photo-editing-surface)::after {
  background: transparent;
}

.player-photo img,
.player-banner-initials {
  object-fit: contain;
  object-position: right bottom;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 17%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 17%, #000 100%);
}

/* Les détourages contiennent une marge transparente sous le joueur : on la
   décale hors du cadre pour que la silhouette atteigne le bas de la bannière. */
.player-photo:not(.photo-editing-surface) img {
  position: absolute;
  right: 0;
  bottom: -16%;
  height: 116%;
}

.player-banner-initials {
  background: transparent;
  color: #ffffffaa;
  font-size: clamp(3rem, 15cqw, 5rem);
}

.player-banner.has-highlight {
  height: auto;
  aspect-ratio: 1.64 / 1;
}

.player-banner.has-highlight .player-banner-highlight {
  position: absolute;
  top: 51cqw;
  right: 0;
  bottom: auto;
  left: clamp(.85rem, 5cqw, 1.45rem);
  margin-top: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #fff;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  opacity: .72;
}

.player-banner.has-highlight .player-banner-highlight span,
.player-banner.has-highlight .player-banner-highlight p {
  color: #fff;
}

.player-banner.has-highlight .player-banner-highlight span {
  white-space: nowrap;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(.44rem, 1.7cqw, .58rem);
  font-weight: 700;
  letter-spacing: .04em;
}

.player-banner.has-highlight .player-banner-highlight p {
  margin-top: .3rem;
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(.5rem, 1.8cqw, .62rem);
  font-weight: 600;
  letter-spacing: .01em;
}

/* Keep the player pitch clear of the open-card corner. */
.player-profile-top .secondary-position-pitch {
  margin-top: clamp(1rem, 4cqw, 1.5rem);
  margin-right: clamp(.55rem, 2cqw, 1rem);
  margin-bottom: clamp(.55rem, 2cqw, 1rem);
  width: min(calc(100% - clamp(.55rem, 2cqw, 1rem)), 180px);
}

.player-profile-top .position-level-pitch .secondary-position-point-dot {
  width: 19px;
  height: 19px;
}

.player-profile-top .position-level-pitch .secondary-position-point-label {
  font-size: .4rem;
}

.player-profile-top .position-level-pitch .secondary-position-point.level-green .secondary-position-point-dot {
  box-shadow: 0 0 0 2px rgba(21,156,80,.25), 0 1px 2px rgba(0,0,0,.2);
}

.player-profile-top .position-level-pitch .secondary-position-point.level-orange .secondary-position-point-dot {
  box-shadow: 0 0 0 2px rgba(244,119,33,.25), 0 1px 2px rgba(0,0,0,.2);
}

.player-profile-top .position-level-pitch .secondary-position-point.level-red .secondary-position-point-dot {
  box-shadow: 0 0 0 2px rgba(217,64,64,.25), 0 1px 2px rgba(0,0,0,.2);
}

/* Smoothly reveal the real height of an opened player card. */
.player-details {
  display: grid;
  grid-template-rows: 0fr;
  content-visibility: hidden;
  max-height: none;
  overflow: visible;
  overflow-anchor: none;
  opacity: 0;
  transition: grid-template-rows .42s cubic-bezier(.22,.72,.22,1), opacity .2s ease;
}

.player-details.open {
  grid-template-rows: 1fr;
  content-visibility: visible;
  max-height: none;
  overflow: visible;
  opacity: 1;
}

.player-details > .player-profile-top {
  min-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-.35rem);
  transition: opacity .24s ease .08s, transform .36s cubic-bezier(.22,.72,.22,1);
}

.player-details.open > .player-profile-top {
  opacity: 1;
  transform: translateY(0);
}

/* La transition traverse la jonction : elle part de la bannière et se poursuit
   sur le début des détails, sur toute la largeur de la carte. */
.player-details {
  position: relative;
  isolation: isolate;
}

.player-details::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  left: 0;
  height: clamp(4rem, 12cqw, 7rem);
  pointer-events: none;
  background: linear-gradient(180deg, rgba(3, 48, 31, .5) 0%, rgba(3, 48, 31, .22) 48%, transparent 100%);
}

.player-details > .player-profile-top {
  position: relative;
  z-index: 1;
}

/* A tap should not leave a browser focus frame around mobile cards. */
@media (hover: none) and (pointer: coarse) {
  .player-match-panel,
  .player-match-panel button,
  .player-details-toggle {
    -webkit-tap-highlight-color: transparent;
  }

  .player-match-panel:focus,
  .player-match-panel button:focus,
  .player-details-toggle:focus {
    outline: none;
    box-shadow: none;
  }
}
