form {
  display: grid;
  gap: 16px;
}
label {
  display: grid;
  gap: 7px;
  font-size: 14px;
  font-weight: 600;
}
input,
select,
textarea {
  font: inherit;
  border: 1px solid #cbd1df;
  border-radius: 6px;
  padding: 12px;
  width: 100%;
  min-width: 0;
  background: white;
  color: #172e70;
}
.player-photo-field > input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.player-form-photo {
  display: grid;
  grid-template-columns: 84px 1fr;
  align-items: center;
  gap: 2px 12px;
  padding: 12px;
  border: 2px dashed #cbd4e4;
  border-radius: 9px;
  background: #f7f8fb;
  cursor: pointer;
}
.player-form-photo > span,
.player-form-photo > img {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 9px;
  object-fit: contain;
  color: white;
  background: #172e70;
  font-size: 24px;
}
.player-form-photo > img {
  padding: 4px;
  background: white;
  box-shadow: inset 0 0 0 1px #dfe3ed;
}
.player-form-photo small {
  color: #6a778e;
  font-weight: 400;
}
.player-photo-field:focus-within .player-form-photo {
  border-color: #6c6df0;
  outline: 2px solid #6c6df0;
}
.field-status {
  min-height: 18px;
  color: #617087;
  font-size: 12px;
  font-weight: 500;
}
.field-status.error {
  color: #a31d1a;
}
.field-status.success {
  color: #27713d;
}
textarea {
  resize: vertical;
  min-height: 96px;
}
input[type="color"] {
  padding: 4px;
  height: 47px;
}
#status {
  padding: 16px 0;
  line-height: 1.5;
  font-size: 14px;
  color: #172e70;
  min-height: 54px;
}
.manager-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
}
.manager-toolbar label {
  min-width: 240px;
}
.manager-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: 28px;
  align-items: start;
}
.manager-grid h2,
[data-panel="trades"] h2,
[data-panel="requests"] h2,
.me-account ~ .panel h2 {
  font:
    600 28px "Barlow Condensed",
    sans-serif;
  text-transform: uppercase;
}
.admin-teams {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.admin-team {
  background: white;
  border: 1px solid #dfe3ed;
  border-radius: 9px;
  padding: 20px;
  min-width: 0;
}
.admin-team h3 {
  font-size: 20px;
  margin: 14px 0 8px;
  overflow-wrap: anywhere;
}
.team-image {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: #f4f5f9;
  border-radius: 8px;
  display: block;
}
.admin-team .crest {
  width: 55px;
  height: 60px;
}
.admin-team .actions {
  margin-top: 18px;
}
.upload {
  display: inline-flex;
  border: 1px solid #cbd1df;
  border-radius: 5px;
  padding: 10px 12px;
  font-size: 13px;
  cursor: pointer;
}
.upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.upload:focus-within {
  outline: 3px solid #6c6df0;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.actions button {
  font-size: 14px;
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
#games form {
  margin-bottom: 18px;
}
#games .game-meta {
  margin-bottom: 0;
}
.score-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.score-inputs input {
  font-weight: 700;
  font-size: 24px;
  text-align: center;
}
.score-inputs label {
  font-size: 14px;
}
.admin-team .muted {
  margin: 0;
}
.roster-panel {
  margin-top: 20px;
}
.player-manager-grid > div {
  display: contents;
}
.player-manager-grid > div > .panel:first-child {
  grid-column: 1;
  grid-row: 2;
}
.player-manager-grid > section {
  grid-column: 2;
  grid-row: 2;
}
.player-manager-grid .roster-panel {
  grid-column: 1 / -1;
  grid-row: 1;
  margin-top: 0;
}
#players-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
  align-items: stretch;
  margin-top: 24px;
}
.roster-team[data-roster-team="unassigned"] {
  grid-column: 1 / -1;
  background: #f2f5fc;
  border-color: #cad4e8;
  padding: 20px;
}
.roster-team[data-roster-team="unassigned"] .roster-players {
  display: grid;
  grid-template-columns: repeat(4, minmax(185px, 1fr));
  gap: 8px 14px;
}
.roster-team h3 {
  margin: 0;
  color: #172e70;
  font-size: 18px;
  line-height: 1.1;
}
.roster-team {
  border: 2px solid #e0e5ef;
  border-top: 5px solid var(--roster-color, #172e70);
  border-radius: 12px;
  padding: 16px;
  min-height: 210px;
  background: #fff;
  box-shadow: 0 8px 24px rgb(23 46 112 / 6%);
  transition:
    border-color 0.15s,
    background 0.15s,
    transform 0.15s;
}
.roster-team-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 6px;
  border-bottom: 1px solid #e8ebf2;
}
.roster-team-head .team-image,
.roster-team-head .crest,
.draft-pool-mark {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  object-fit: contain;
  border-radius: 10px;
}
.roster-team-head .team-image {
  background: #f5f6fa;
  padding: 3px;
}
.draft-pool-mark {
  display: grid;
  place-items: center;
  color: white;
  background: #172e70;
  font:
    800 25px "Barlow Condensed",
    sans-serif;
}
.draft-pool-mark svg {
  width: 44px;
  height: 44px;
}
.roster-label {
  display: block;
  margin-bottom: 3px;
  color: #6a778e;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.roster-count {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  margin-left: auto;
  border-radius: 50%;
  color: #172e70;
  background: #fff;
  border: 3px solid var(--roster-color, #172e70);
  font-size: 14px;
  font-weight: 800;
}
.roster-team.drop-target {
  border-color: #c52a27;
  background: #fff7f7;
  transform: translateY(-3px);
}
.player-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  margin-top: 7px;
  border: 1px solid #e4e8f0;
  border-radius: 8px;
  background: white;
}
.player-photo-picker {
  position: relative;
  display: block;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  cursor: pointer;
}
.player-photo-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.player-photo,
.player-photo.fallback {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 2px solid white;
  border-radius: 50%;
  object-fit: cover;
  background: #dfe5f1;
  color: #172e70;
  box-shadow: 0 0 0 1px #cdd5e4;
  font-weight: 800;
}
.camera-badge {
  position: absolute;
  right: -3px;
  bottom: -2px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 2px solid white;
  border-radius: 50%;
  color: white;
  background: #c52a27;
  font-size: 13px;
  line-height: 1;
}
.player-photo-picker:focus-within .player-photo {
  outline: 3px solid #6c6df0;
  outline-offset: 3px;
}
.player-identity {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.player-identity small {
  color: #6a778e;
  font-size: 11px;
}
.roster-team:not([data-roster-team="unassigned"]) .player-row {
  flex-wrap: wrap;
}
.roster-team:not([data-roster-team="unassigned"]) .player-row .install {
  margin-left: auto;
}
.player-row[draggable="true"] {
  cursor: grab;
}
.player-row.dragging {
  opacity: 0.4;
}
.player-row:hover {
  border-color: #aebbd5;
  box-shadow: 0 3px 10px rgb(23 46 112 / 8%);
}
.player-row .install {
  padding: 8px 10px;
  font-size: 12px;
}
.empty-roster {
  min-height: 86px;
  margin: 10px 0 0;
  padding: 28px 12px;
  border: 2px dashed #cfd6e3;
  border-radius: 8px;
  color: #6a778e;
  text-align: center;
  font-size: 13px;
}
.drag-handle {
  color: #8a94a7;
  font-weight: 800;
  letter-spacing: -3px;
}
@media (max-width: 1050px) {
  #players-list,
  .roster-team[data-roster-team="unassigned"] .roster-players {
    grid-template-columns: repeat(2, minmax(190px, 1fr));
  }
}
@media (max-width: 620px) {
  #players-list,
  .roster-team[data-roster-team="unassigned"] .roster-players {
    grid-template-columns: 1fr;
  }
}
.player-row + .player-row {
  border-top-color: #e4e8f0;
}
.player-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-right: 8px;
  border-radius: 50%;
  background: #e8ebf3;
  color: #172e70;
  font-weight: 800;
}
.game-picker {
  margin-bottom: 18px;
}
.live-scoreboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  padding: 20px;
  border-radius: 12px;
  color: white;
  background: #172e70;
}
.score-team {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 72px;
  align-items: center;
  gap: 12px;
}
.score-team.away {
  grid-template-columns: 72px minmax(0, 1fr) 58px;
  text-align: right;
}
.score-team.away .team-image,
.score-team.away .crest {
  grid-column: 3;
  grid-row: 1;
}
.score-team.away strong {
  grid-column: 2;
  grid-row: 1;
}
.score-team.away input {
  grid-column: 1;
  grid-row: 1;
}
.score-team .team-image,
.score-team .crest {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border-radius: 9px;
  background: white;
  padding: 3px;
}
.score-team strong {
  line-height: 1.15;
}
.score-team input {
  padding: 8px;
  border: 0;
  font:
    800 27px "Barlow Condensed",
    sans-serif;
  text-align: center;
}
.score-center {
  display: grid;
  justify-items: center;
  gap: 5px;
}
.score-center span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
}
.score-center b {
  font:
    800 22px "Barlow Condensed",
    sans-serif;
}
.score-center .solid {
  padding: 7px 10px;
  border: 1px solid white;
  font-size: 11px;
}
.live-team-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.live-team {
  padding-top: 12px;
  border-top: 5px solid var(--roster-color);
}
.live-team > header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.live-team > header .team-image,
.live-team > header .crest {
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  object-fit: contain;
  border-radius: 8px;
}
.live-team > header h3 {
  margin: 0;
}
.stats-empty {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border: 2px dashed #cbd4e4;
  border-radius: 10px;
  background: #f7f8fb;
}
.stats-empty h3,
.stats-empty p {
  margin-bottom: 4px;
}
.stats-empty p {
  color: #617087;
  font-size: 13px;
}
.stats-empty .solid {
  margin-left: auto;
  white-space: nowrap;
}
.live-player {
  background: white;
  border: 1px solid #dfe3ed;
  border-radius: 9px;
  padding: 18px;
  margin-bottom: 14px;
}
.live-player-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 14px;
}
.live-player-name {
  display: flex;
  align-items: center;
  gap: 10px;
}
.live-player-name .player-photo {
  width: 46px;
  height: 46px;
}
.live-player-head h3 {
  margin: 0;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.stat-control {
  border: 1px solid #e0e4ed;
  border-radius: 7px;
  padding: 10px;
  text-align: center;
}
.stat-label {
  display: block;
  min-height: 30px;
  color: #617087;
  font-size: 12px;
  line-height: 1.25;
}
.stat-stepper {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
}
.stat-stepper button {
  border: 1px solid #cbd1df;
  border-radius: 5px;
  background: #f4f5f9;
  color: #172e70;
  min-height: 34px;
  font-weight: 800;
}
.stat-value {
  font-size: 20px;
  font-weight: 800;
  color: #172e70;
}
.saving-dot {
  font-size: 12px;
  color: #617087;
}
.heading h1 {
  font-size: clamp(38px, 5vw, 64px);
}
[hidden] {
  display: none !important;
}
@media (max-width: 760px) {
  .manager-grid {
    grid-template-columns: 1fr;
  }
  .manager-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .admin-teams {
    grid-template-columns: 1fr 1fr;
  }
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .live-scoreboard {
    grid-template-columns: 1fr;
  }
  .score-center {
    grid-row: 2;
  }
  .live-team-grid {
    grid-template-columns: 1fr;
  }
  .stats-empty {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .stats-empty .solid {
    width: 100%;
    margin-left: 0;
  }
  .player-manager-grid > div > .panel:first-child {
    grid-column: 1;
    grid-row: 2;
  }
  .player-manager-grid > section {
    grid-column: 1;
    grid-row: 3;
  }
  .player-manager-grid .roster-panel {
    grid-column: 1;
    grid-row: 1;
  }
}
@media (max-width: 440px) {
  .admin-teams {
    grid-template-columns: 1fr;
  }
  .header .brand-name {
    max-width: 140px;
  }
  .header .install {
    font-size: 12px;
  }
  .stat-grid {
    grid-template-columns: 1fr;
  }
}

/* Players & draft stacks the board above the player form. */
.player-manager-grid {
  grid-template-columns: minmax(0, 1fr);
}
.player-manager-grid > div > .panel:first-child {
  max-width: 760px;
}
/* Stat values accept typing as well as the steppers. */
input.stat-value {
  width: 100%;
  min-width: 0;
  padding: 4px 0;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  font: inherit;
  font-size: 20px;
  font-weight: 800;
  text-align: center;
  color: #172e70;
  -moz-appearance: textfield;
}
input.stat-value::-webkit-inner-spin-button,
input.stat-value::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input.stat-value:focus {
  border-color: #172e70;
  background: #fff;
  outline: none;
}
.stat-stepper button {
  min-height: 40px;
}
.stat-stepper {
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.stat-stepper input.stat-value {
  grid-column: 1 / -1;
  grid-row: 1;
}
@media (max-width: 760px) {
  .stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .stat-control {
    padding: 8px 6px;
  }
  .stat-label {
    font-size: 11px;
  }
}

.passcode-panel {
  max-width: 420px;
  margin: 8px 0 24px;
}
.passcode-panel label {
  margin-bottom: 8px;
}

.history-admin-list {
  display: grid;
  gap: 10px;
}
.admin-history {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid #dfe3ed;
  border-left: 5px solid #172e70;
  border-radius: 8px;
  background: #fff;
}
.admin-history.kind-season {
  border-left-color: #e3a82b;
}
.admin-history.kind-award {
  border-left-color: #c52a27;
}
.admin-history.kind-trade {
  border-left-color: #3b6fd8;
}
.admin-history h3 {
  margin: 2px 0 4px;
}
.admin-history .muted {
  margin: 0;
}
.admin-history .actions {
  flex-shrink: 0;
}
.install.danger {
  color: #c52a27;
  border-color: #f0c9c8;
}
@media (max-width: 560px) {
  .admin-history {
    flex-direction: column;
    align-items: flex-start;
  }
}

.avatar-picker {
  margin: 0 0 14px;
  padding: 0;
  border: 0;
}
.avatar-picker legend {
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
}
.avatar-picker legend small {
  display: block;
  color: #617087;
  font-size: 12px;
  font-weight: 400;
}
.avatar-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(62px, 1fr));
  gap: 8px;
}
.avatar-option {
  display: grid;
  justify-items: center;
  gap: 3px;
  margin: 0;
  padding: 6px 2px;
  border: 2px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  color: #617087;
}
.avatar-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.avatar-option span {
  width: 46px;
  height: 46px;
}
.avatar-option:has(input:checked) {
  border-color: #c52a27;
  background: #fff4f3;
  color: #172e70;
  font-weight: 700;
}
.avatar-option:has(input:focus-visible) {
  outline: 3px solid #c52a27;
  outline-offset: 2px;
}

.avatar-group {
  grid-column: 1 / -1;
  margin: 6px 0 0;
  color: #617087;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Full player names read left to right beside the avatar. */
.player-identity {
  flex: 1;
  min-width: 0;
  text-align: left;
}
/* Roster columns wide enough for full names; they reflow on smaller screens. */
#players-list {
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
}
.roster-team[data-roster-team="unassigned"] .roster-players {
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
}
@media (max-width: 620px) {
  /* Phones use Edit to move players, so the drag handle can go and names get the room. */
  .roster-panel {
    padding: 16px 10px;
  }
  .roster-team {
    padding: 12px 10px;
  }
  .player-row {
    gap: 10px;
    padding: 8px;
  }
  .drag-handle {
    display: none;
  }
  .player-identity strong {
    font-size: 15px;
  }
}

/* Jersey designer in the team form */
.jersey-editor {
  margin: 4px 0 14px;
  padding: 0;
  border: 0;
}
.jersey-editor legend {
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
}
.jersey-sides {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.jersey-side {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #dfe3ed;
  border-radius: 10px;
  background: #f7f8fb;
}
.jersey-side > strong {
  text-align: center;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.jersey-preview {
  width: 100%;
  max-width: 190px;
  margin: 0 auto;
}
.jersey-colors {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.jersey-colors label,
.jersey-side > label {
  margin: 0;
  font-size: 11px;
}
.jersey-colors input[type="color"] {
  width: 100%;
  height: 32px;
  padding: 2px;
}
.field-status.warning {
  color: #b45309;
  font-weight: 600;
}
@media (max-width: 440px) {
  .jersey-sides {
    grid-template-columns: 1fr;
  }
}
/* Home and away sit side by side only when the form is wide enough. */
.jersey-sides {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.jersey-side {
  min-width: 0;
}

/* Move log with undo, collapsed below the draft board */
.recent-moves {
  margin-top: 18px;
  border: 1px solid #e4e8f0;
  border-radius: 8px;
  background: #f8f9fc;
}
.recent-moves summary {
  padding: 12px 14px;
  color: #172e70;
  font-weight: 800;
  cursor: pointer;
}
.recent-moves summary .muted {
  margin-left: 6px;
  font-weight: 500;
  font-size: 13px;
}
.recent-moves ol {
  display: grid;
  gap: 6px;
  max-height: 420px;
  margin: 0;
  padding: 0 12px 12px;
  overflow-y: auto;
  list-style: none;
}
.recent-moves li {
  display: grid;
  grid-template-columns: 90px 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border: 1px solid #e4e8f0;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
}
.recent-moves time,
.move-later {
  color: #617087;
  font-size: 12px;
  white-space: nowrap;
}
.recent-moves .install {
  padding: 6px 12px;
  font-size: 12px;
}
.undo-link {
  color: #c52a27;
  text-decoration: underline;
}
@media (max-width: 620px) {
  .recent-moves li {
    grid-template-columns: 1fr auto;
  }
  .recent-moves .move-text {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

/* A player's latest move, tagged on their roster row for a week */
.move-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  padding: 2px 3px 2px 7px;
  border-radius: 6px;
  white-space: nowrap;
  background: #e8f5ec;
  color: #1d6b3a;
  font-size: 11px;
  font-weight: 700;
}
.move-tag.kind-trade {
  background: #fff3dc;
  color: #8a5a00;
}
.move-tag.kind-release {
  background: #eef1f6;
  color: #4d5a70;
}
.player-row:has(.move-line) {
  flex-wrap: wrap;
}
.move-line {
  flex-basis: 100%;
  margin-top: -4px;
  padding-left: 76px;
}
.move-tag time {
  font-weight: 500;
}
.undo-chip {
  margin-left: 2px;
  padding: 1px 6px;
  border: 0;
  border-radius: 4px;
  background: #fff;
  color: #c52a27;
  font: inherit;
  cursor: pointer;
}
.undo-chip:hover,
.undo-chip:focus-visible {
  background: #c52a27;
  color: #fff;
}
.player-row.just-moved {
  animation: just-moved 2.4s ease-out;
}
@keyframes just-moved {
  0%,
  40% {
    border-color: #2e9d57;
    box-shadow: 0 0 0 3px rgb(46 157 87 / 25%);
  }
}

/* Trades: two teams side by side, each ticking what it sends */
[data-panel="trades"] > .panel + .panel {
  margin-top: 22px;
}
.trade-sides {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: start;
}
.trade-side {
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid #e4e8f0;
  border-radius: 10px;
  background: #f8f9fc;
}
.trade-side legend {
  padding: 0 6px;
  color: #6a778e;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.trade-swap {
  align-self: center;
  color: #c52a27;
  font-size: 28px;
  font-weight: 800;
}
.trade-count {
  margin: 10px 0 4px;
  color: #617087;
  font-size: 13px;
  font-weight: 700;
}
.trade-count.full {
  color: #c52a27;
}
.trade-side h3.roster-label {
  margin: 12px 0 6px;
}
.trade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 6px;
}
.trade-grid.picks {
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}
.trade-asset {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid #e4e8f0;
  border-radius: 8px;
  background: #fff;
  color: #172e70;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.trade-asset input {
  flex: 0 0 auto;
  width: auto;
  margin: 0;
  accent-color: #c52a27;
}
.trade-asset .player-photo {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
}
.trade-asset span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.trade-asset.chosen {
  border-color: #c52a27;
  background: #fff5f5;
}
.trade-asset:has(input:disabled) {
  opacity: 0.5;
  cursor: not-allowed;
}
.trade-summary {
  margin: 16px 0 12px;
}
.trade-summary p {
  margin: 4px 0;
}
.trade-card {
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid #e4e8f0;
  border-radius: 10px;
  background: #fff;
}
.trade-card header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.trade-card time {
  color: #617087;
  font-size: 12px;
}
.trade-card-sides {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: start;
  margin: 6px 0 10px;
}
.trade-card h3 {
  margin: 0 0 4px;
  font-size: 15px;
}
.trade-card ul {
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
}
@media (max-width: 760px) {
  .trade-sides,
  .trade-card-sides {
    grid-template-columns: 1fr;
  }
  .trade-swap {
    justify-self: center;
    transform: rotate(90deg);
  }
}

/* Email sign-in and who can manage */
.passcode-panel form {
  display: grid;
  gap: 10px;
}
.passcode-panel .text-button {
  justify-self: start;
  margin-top: 6px;
  color: #172e70;
  font-size: 13px;
  text-decoration: underline;
}
.account {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #617087;
  font-size: 13px;
}
.account .text-button {
  color: #c52a27;
  font-size: 13px;
  text-decoration: underline;
}
.member-list {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}
.member-list li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #e4e8f0;
  border-radius: 8px;
  background: #fff;
  overflow-wrap: anywhere;
}
.member-list .roster-label {
  margin: 0;
}
.member-list .install {
  padding: 6px 10px;
  font-size: 12px;
}

/* Team managers: their own teams only, no drafting */
.team-manager .drag-handle {
  display: none;
}
.member-list li small {
  display: block;
  color: #617087;
  font-size: 12px;
}
.member-actions {
  display: flex;
  gap: 6px;
}
.member-teams {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #e4e8f0;
  border-radius: 8px;
}
.member-teams legend {
  padding: 0 4px;
  font-weight: 700;
  font-size: 13px;
}
label.check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-weight: 600;
}
label.check input {
  width: auto;
  margin: 0;
}
@media (max-width: 620px) {
  .member-list li {
    grid-template-columns: 1fr auto;
  }
  .member-actions {
    grid-column: 1 / -1;
  }
}

/* Trade offers and player requests */
.offer-note {
  margin: 6px 0;
  font-style: italic;
}
.offer-by {
  margin: 4px 0 8px;
  font-size: 12px;
}
.offer-declined,
.offer-cancelled,
.request-declined {
  opacity: 0.7;
}
.offer-history {
  margin-top: 12px;
}
.offer-history summary {
  color: #172e70;
  font-weight: 700;
  cursor: pointer;
}
.trade-note {
  margin-bottom: 12px;
}
.request-card {
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid #e4e8f0;
  border-radius: 10px;
  background: #fff;
}
.request-card header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.request-card time {
  color: #617087;
  font-size: 12px;
}
.request-card dl {
  display: grid;
  gap: 6px;
  margin: 10px 0;
}
.request-card dl div {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 10px;
}
.request-card dt {
  color: #617087;
  font-size: 13px;
  font-weight: 700;
}
.request-card dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.request-card .was {
  color: #8a94a7;
  text-decoration: line-through;
}
@media (max-width: 620px) {
  .request-card dl div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* My PFL */
.me-account {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}
.me-account h2 {
  margin: 2px 0;
  overflow-wrap: anywhere;
}
.button-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.small-print {
  font-size: 12px;
}
.me-profile {
  display: flex;
  gap: 16px;
  align-items: center;
}
.me-profile h3 {
  margin: 0 0 4px;
  font-size: 22px;
}
.me-profile p {
  margin: 0;
}
.me-photo {
  flex: 0 0 84px;
  width: 84px;
  height: 84px;
  overflow: hidden;
  border-radius: 50%;
  object-fit: cover;
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 3px #cdd5e4;
}
.me-photo svg {
  width: 100%;
  height: 100%;
}
.me-details,
.me-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  margin: 16px 0;
}
.me-details dt,
.me-stats dt {
  color: #617087;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.me-details dd,
.me-stats dd {
  margin: 2px 0 0;
  font-weight: 700;
}
.me-stats dd {
  font:
    700 22px "Barlow Condensed",
    sans-serif;
}
.follow-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.follow-team {
  padding: 8px 10px;
  border: 1px solid #e4e8f0;
  border-radius: 8px;
  background: #fff;
}
.follow-team img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.follow-team:has(input:checked) {
  border-color: #c52a27;
  background: #fff5f5;
}
/* When the side form is hidden (team managers), the list uses the full width. */
.manager-grid:has(> .panel[hidden]) {
  grid-template-columns: 1fr;
}
/* League settings: the access list gets the wide column. */
[data-panel="access"] .manager-grid {
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
}
@media (max-width: 900px) {
  [data-panel="access"] .manager-grid {
    grid-template-columns: 1fr;
  }
}

.passcode-link {
  display: inline-block;
  margin-top: 4px;
  color: #172e70;
  font-size: 13px;
  text-decoration: underline;
}

/* A player's Manage menu on the draft board */
.player-menu {
  position: relative;
}
.player-menu > summary {
  list-style: none;
  cursor: pointer;
}
.player-menu > summary::-webkit-details-marker {
  display: none;
}
.player-menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
  display: grid;
  min-width: 190px;
  padding: 6px;
  border: 1px solid #dfe3ed;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 24px rgb(23 46 112 / 16%);
}
.player-menu-list button {
  padding: 9px 10px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: #172e70;
  font:
    600 14px "DM Sans",
    Arial,
    sans-serif;
  text-align: left;
  cursor: pointer;
}
.player-menu-list button:hover,
.player-menu-list button:focus-visible {
  background: #f1f4fa;
}
.player-menu-list .danger-text {
  color: #c52a27;
}
.player-row .player-menu > summary {
  padding: 8px 10px;
  font-size: 12px;
}
.roster-team:not([data-roster-team="unassigned"]) .player-row .player-menu {
  margin-left: auto;
}
.draft-fields {
  margin: 4px 0 8px;
  padding: 10px 12px;
  border: 1px solid #e4e8f0;
  border-radius: 8px;
}
.draft-fields legend {
  padding: 0 4px;
  font-weight: 700;
  font-size: 13px;
}
.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.draft-fields {
  margin: 4px 0 8px;
  padding: 10px 12px;
  border: 1px solid #e4e8f0;
  border-radius: 8px;
}
.draft-fields legend {
  padding: 0 4px;
  font-weight: 700;
  font-size: 13px;
}
.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

/* Draft progress and Finish draft on the draft board */
.draft-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 16px;
  border: 1px solid #dfe3ed;
  border-left: 4px solid #172e70;
  border-radius: 10px;
  background: #f5f7fb;
}
.draft-status.done {
  border-left-color: #2e9d57;
  background: #f0faf3;
}
.draft-status div {
  display: grid;
  gap: 2px;
}
.draft-status span {
  color: #617087;
  font-size: 13px;
}
.draft-status .solid:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.draft-status .text-button {
  color: #c52a27;
  font-size: 13px;
  text-decoration: underline;
}

/* Honor teams in the manager's History list */
.honor-names {
  margin: 4px 0 0;
  color: #172e70;
  font-weight: 700;
}
.honor-players {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 6px;
}
