@media (min-width:1200px) {
  #pepper-app > div > .row:first-child > .col-md-6:first-child {
    position:relative !important;
  }

  .player-roster {
    position:absolute !important;
    z-index:72 !important;
    left:0 !important;
    top:0 !important;
    width:100% !important;
    height:140px !important;
    min-height:140px !important;
    max-height:140px !important;
    box-sizing:border-box !important;
    padding:12px 14px !important;
    border:1px solid #2b3d4d !important;
    border-radius:14px !important;
    background:linear-gradient(145deg,#111d27,#0d1821) !important;
    box-shadow:0 16px 36px rgba(0,0,0,.18) !important;
    color:#eef3f7 !important;
    overflow:hidden !important;
  }

  .player-roster[hidden] {
    display:none !important;
  }

  .player-roster__header {
    margin-bottom:8px !important;
  }

  .player-roster__eyebrow {
    display:none !important;
  }

  .player-roster__title {
    font-size:18px !important;
  }

  .player-roster__teams {
    gap:8px !important;
  }

  .player-roster__team {
    padding:7px !important;
  }

  .player-roster__team-title {
    margin-bottom:5px !important;
    font-size:11px !important;
  }

  .player-roster__team-list {
    gap:3px !important;
  }

  .player-roster__player {
    height:22px !important;
    padding:2px 5px !important;
  }

  .player-roster__name {
    font-size:11px !important;
  }

  .player-roster__seat {
    width:22px !important;
    font-size:9px !important;
  }

  .player-roster__turn,
  .player-roster__you,
  .player-roster__bid {
    font-size:8px !important;
  }

  /* When the current contract is present, keep both pieces of information in
     the same top-left header card. The contract becomes a compact strip above
     the team/player rows instead of covering the roster. */
  #pepper-app > div > .row:first-child > .col-md-6:first-child:has(.winning-bid-summary:not([hidden])) .player-roster__header {
    display:none !important;
  }

  #pepper-app > div > .row:first-child > .col-md-6:first-child:has(.winning-bid-summary:not([hidden])) .player-roster {
    padding-top:48px !important;
  }

  #pepper-app > div > .row:first-child > .col-md-6:first-child .winning-bid-summary {
    z-index:74 !important;
    left:10px !important;
    top:8px !important;
    width:calc(100% - 20px) !important;
    height:34px !important;
    min-height:34px !important;
    max-height:34px !important;
    padding:6px 10px !important;
    display:flex !important;
    flex-direction:row !important;
    align-items:center !important;
    justify-content:flex-start !important;
    gap:8px !important;
    border-radius:9px !important;
    box-shadow:none !important;
  }

  #pepper-app > div > .row:first-child > .col-md-6:first-child .winning-bid-summary[hidden] {
    display:none !important;
  }

  #pepper-app > div > .row:first-child > .col-md-6:first-child .winning-bid-summary__eyebrow {
    margin:0 !important;
    font-size:9px !important;
    letter-spacing:.08em !important;
    white-space:nowrap !important;
  }

  #pepper-app > div > .row:first-child > .col-md-6:first-child .winning-bid-summary__team {
    min-width:0 !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    font-size:12px !important;
    line-height:1 !important;
    white-space:nowrap !important;
  }

  #pepper-app > div > .row:first-child > .col-md-6:first-child .winning-bid-summary__detail {
    flex:0 0 auto !important;
    margin:0 0 0 auto !important;
    font-size:11px !important;
    line-height:1 !important;
    white-space:nowrap !important;
  }
}

.player-roster__header {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}

.player-roster__eyebrow {
  margin-bottom:3px;
  color:#8193a3;
  font-size:11px;
  line-height:1;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.player-roster__title {
  margin:0;
  color:#f4f7fa;
  font-size:20px;
  line-height:1.1;
  font-weight:800;
}

.player-roster__legend {
  display:flex;
  align-items:center;
  gap:6px;
  color:#93a2af;
  font-size:11px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.06em;
}

.player-roster__legend-dot,
.player-roster__turn-dot {
  width:8px;
  height:8px;
  border-radius:50%;
  background:#e6b84b;
  box-shadow:0 0 0 3px rgba(230,184,75,.14);
}

.player-roster__teams {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:12px;
}

.player-roster__team {
  min-width:0;
  padding:10px;
  border:1px solid #2a3a48;
  border-radius:11px;
  background:#0d1720;
}

.player-roster__team--1 {
  border-color:rgba(71,122,170,.52);
}

.player-roster__team--2 {
  border-color:rgba(55,139,87,.52);
}

.player-roster__team-title {
  margin-bottom:7px;
  font-size:12px;
  line-height:1;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.player-roster__team--1 .player-roster__team-title {
  color:#9dc8f0;
}

.player-roster__team--2 .player-roster__team-title {
  color:#9ed6af;
}

.player-roster__team-list {
  display:flex;
  flex-direction:column;
  gap:5px;
}

.player-roster__player {
  display:flex;
  align-items:center;
  min-width:0;
  height:27px;
  padding:3px 6px;
  border:1px solid transparent;
  border-radius:7px;
  color:#d9e1e7;
  background:rgba(255,255,255,.025);
}

.player-roster__player.is-active {
  border-color:rgba(230,184,75,.68);
  background:rgba(230,184,75,.10);
  color:#ffffff;
}

.player-roster__seat {
  flex:0 0 auto;
  width:25px;
  color:#7f91a0;
  font-size:10px;
  font-weight:800;
}

.player-roster__name {
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:12px;
  font-weight:700;
}

.player-roster__you {
  flex:0 0 auto;
  margin-left:5px;
  color:#8fa0ad;
  font-size:9px;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
}

.player-roster__bid {
  flex:0 0 auto;
  min-width:30px;
  margin-left:auto;
  padding:2px 6px;
  border:1px solid rgba(143,166,184,.36);
  border-radius:999px;
  background:rgba(143,166,184,.09);
  color:#d6e0e8;
  font-size:9px;
  line-height:1.1;
  font-weight:900;
  letter-spacing:.03em;
  text-align:center;
  white-space:nowrap;
}

.player-roster__bid.is-pass {
  color:#9eacb7;
  background:rgba(143,166,184,.05);
}

.player-roster__bid.is-high-bid {
  border-color:rgba(230,184,75,.68);
  background:rgba(230,184,75,.13);
  color:#f1c968;
}

.player-roster__turn {
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:5px;
  margin-left:auto;
  padding-left:6px;
  color:#f1c968;
  font-size:9px;
  font-weight:900;
  letter-spacing:.06em;
  text-transform:uppercase;
}

.player-roster__turn-dot {
  width:7px;
  height:7px;
}

@media (prefers-reduced-motion: no-preference) {
  .player-roster__player.is-active .player-roster__turn-dot {
    animation:pepper-turn-pulse 1.2s ease-in-out infinite alternate;
  }
}

@keyframes pepper-turn-pulse {
  from { opacity:.55; transform:scale(.88); }
  to { opacity:1; transform:scale(1.08); }
}

@media (max-width:1199px) {
  .player-roster {
    margin-top:16px;
    padding:18px;
    border:1px solid #2b3d4d;
    border-radius:14px;
    background:linear-gradient(145deg,#111d27,#0d1821);
    color:#eef3f7;
  }
}

@media (max-width:767px) {
  .player-roster__bid {
    min-width:28px;
    padding:2px 5px;
    font-size:8px;
  }
}
