.search-controls {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 8px;
  align-items: end;
}

/* Listone comparison */
.list-comparison-panel {
  margin-top: 18px;
  overflow: hidden;
}

.list-comparison-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr);
  align-items: end;
  gap: 10px;
  padding: 0 22px 16px;
}

.list-comparison-controls label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #6f8097;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.list-comparison-controls select {
  width: 100%;
  border: 1px solid #cbd6e3;
  border-radius: 8px;
  padding: 10px 11px;
  color: var(--navy);
  background: #fff;
  font-size: 13px;
  outline-color: var(--purple);
}

.comparison-vs {
  padding-bottom: 11px;
  color: #9aa7b8;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.list-comparison-summary {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 22px;
  border-top: 1px solid var(--line);
  color: #8090a4;
  font-size: 12px;
}

.list-comparison-summary strong {
  color: var(--purple);
  font-size: 18px;
}

.list-comparison-summary span {
  color: #9aa7b8;
}

.list-comparison-summary .comparison-error {
  color: #a44848;
}

.list-comparison-table table {
  min-width: 620px;
}

.list-comparison-table th,
.list-comparison-table td {
  padding-top: 10px;
  padding-bottom: 10px;
}

.list-comparison-table td:nth-child(n + 2) {
  text-align: center;
}

@media (max-width: 760px) {
  .list-comparison-controls {
    grid-template-columns: 1fr;
    padding-left: 14px;
    padding-right: 14px;
  }

  .comparison-vs {
    padding: 0;
  }

  .list-comparison-summary {
    padding-left: 14px;
    padding-right: 14px;
  }
}

.role-select-label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #8797aa;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.role-select-label select {
  height: 58px;
  border: 1px solid #cfd9e5;
  border-radius: 9px;
  background: #fbfcfe;
  color: var(--navy);
  padding: 0 12px;
  font-size: 13px;
  outline-color: var(--purple);
  text-transform: none;
  letter-spacing: normal;
}

.search-hint {
  margin: 8px 0 0;
  color: #8a98aa;
  font-size: 11px;
}

@media (max-width: 760px) {
  .search-controls {
    grid-template-columns: 1fr;
  }
}

.app-shell.route-auction .topbar {
  height: 64px;
  padding-top: 9px;
  padding-bottom: 9px;
}

.app-shell.route-auction .topbar-kicker {
  font-size: 9px;
}

.app-shell.route-auction .topbar h1 {
  margin-top: 2px;
  font-size: 23px;
}

.app-shell.route-auction .content {
  padding-top: 9px;
}

.app-shell.route-auction .auction-header {
  margin-bottom: 6px;
}

.app-shell.route-auction .auction-header h2 {
  margin-top: 2px;
  font-size: 27px;
}

.app-shell.route-auction .auction-header .eyebrow {
  font-size: 9px;
}

.app-shell.route-auction .auction-header-actions .secondary-button {
  padding: 6px 9px;
  font-size: 10px;
}

.app-shell.route-auction .auction-header-actions .live-badge {
  padding: 5px 7px;
  font-size: 10px;
}

.team-crest {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  object-fit: contain;
  border-radius: 6px;
}

.team-president {
  display: block;
  margin-top: 4px;
  color: #8a98aa;
  font-size: 10px;
}

.edit-teams-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.edit-team-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 10px;
}

.crest-picker {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px dashed #cfd9e5;
  border-radius: 8px;
  padding: 5px 8px;
  background: #fbfcfe;
}

.crest-picker input {
  min-width: 0;
  width: 100%;
  border: 0;
  padding: 0;
  font-size: 10px;
  outline: 0;
}

.crest-placeholder {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 6px;
  background: #eef2f7;
  color: #8a98aa;
  font-size: 18px;
}

.edit-team-row .crest-field > small {
  display: block;
  margin-top: 4px;
  color: #8a98aa;
  font-size: 9px;
}

.market-advice {
  margin: 0 18px 12px;
  padding: 10px 12px;
  border: 1px solid #d8e6f7;
  border-radius: 10px;
  background: linear-gradient(135deg, #f9fcff, #fff);
  color: var(--navy);
}

.market-advice.is-empty {
  border-color: #e5eaf0;
  background: #fbfcfd;
}

.market-advice-state {
  color: #527399;
  font-size: 10px;
  font-weight: 800;
}

.market-advice-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 8px;
}

.market-advice-summary span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.market-advice-summary small,
.market-purchase-list small {
  color: #8a98aa;
  font-size: 9px;
}

.market-advice-summary strong {
  color: #2565a4;
  font-size: 13px;
}

.market-purchase-list {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid #e5edf6;
}

.market-purchase-list > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #5d6d82;
  font-size: 10px;
}

.market-purchase-list strong {
  color: var(--navy);
  white-space: nowrap;
}

.market-advice.is-empty > small {
  display: block;
  margin-top: 6px;
  color: #8a98aa;
  font-size: 10px;
}

.scout-advice.is-empty {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  margin-top: 0;
  margin-bottom: 12px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.scout-advice.is-empty strong {
  margin-top: 0;
  font-size: 12px;
  font-weight: 700;
  color: #6f8097;
}

@media (max-width: 760px) {
  .app-shell.route-auction .topbar {
    height: 58px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .app-shell.route-auction .topbar h1 {
    font-size: 20px;
  }

  .edit-team-row {
    grid-template-columns: 1fr;
  }
}

.auction-create-form {
  display: grid;
  grid-template-columns: minmax(145px, .8fr) minmax(145px, .8fr) minmax(115px, .55fr) minmax(230px, 1fr) minmax(300px, 1.7fr) auto;
  align-items: end;
  gap: 10px;
}

.auction-create-form > .primary-button {
  justify-self: end;
}

.call-order-config {
  min-width: 300px;
}

.call-order-config > span {
  display: block;
  margin-bottom: 8px;
  color: var(--navy);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.call-order-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.call-order-grid label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: #8a98aa;
  font-size: 10px;
}

.call-order-grid select {
  min-width: 0;
  height: 34px;
  padding: 0 6px;
  border: 1px solid #cfd9e5;
  border-radius: 8px;
  background: #fbfcfe;
  color: var(--navy);
  font-size: 10px;
}

.call-order-config small {
  display: block;
  margin-top: 7px;
  color: #8a98aa;
  font-size: 10px;
}

.edit-teams-panel {
  margin-bottom: 18px;
  overflow: hidden;
}

.edit-teams-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 0 22px 20px;
}

.edit-teams-form label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: #8a98aa;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.edit-teams-form input {
  min-width: 0;
  border: 1px solid #cfd9e5;
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--navy);
  font-size: 12px;
  outline-color: var(--purple);
  text-transform: none;
  letter-spacing: normal;
}

.edit-teams-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

@media (max-width: 1100px) {
  .auction-create-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .auction-create-form > .primary-button {
    justify-self: stretch;
  }
}

@media (max-width: 760px) {
  .auction-create-form {
    grid-template-columns: 1fr;
  }

  .call-order-config {
    min-width: 0;
  }

  .call-order-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .edit-teams-form {
    grid-template-columns: 1fr;
  }

  .edit-teams-actions {
    justify-content: stretch;
  }

  .edit-teams-actions .primary-button {
    width: 100%;
    justify-content: center;
  }
}

.active-auction-list {
  padding: 0 20px;
}

.active-auction-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.active-auction-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--purple);
  background: #f1e5fc;
}

.active-auction-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.active-auction-info strong {
  color: var(--navy);
  font-size: 13px;
}

.active-auction-info span {
  margin-top: 4px;
  color: #8a98aa;
  font-size: 11px;
}

.active-auctions .form-hint {
  margin: 8px 20px 20px;
}

@media (max-width: 760px) {
  .active-auction-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .active-auction-row .primary-button {
    margin-left: 47px;
  }
}

.role-order-config {
  flex: 1.5;
  min-width: 230px;
}

.role-order-config > span {
  display: block;
  margin-bottom: 8px;
  color: var(--navy);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.role-order-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.role-order-grid label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: #8a98aa;
  font-size: 10px;
}

.role-order-grid select {
  min-width: 0;
  height: 38px;
  padding: 0 7px;
  border: 1px solid #cfd9e5;
  border-radius: 8px;
  background: #fbfcfe;
  color: var(--navy);
  font-size: 11px;
}

.role-order-config small {
  display: block;
  margin-top: 7px;
  color: #8a98aa;
  font-size: 10px;
}

.danger-button {
  color: #a73731;
  border-color: #e5b7b2;
  background: #fff8f7;
}

@media (max-width: 760px) {
  .role-order-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.auction-layout {
  grid-template-columns: minmax(205px, .62fr) minmax(0, 1.78fr);
}

.auction-main {
  grid-column: 2;
  grid-row: 1;
}

.auction-side {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ranking-panel {
  overflow: hidden;
}

.ranking-list {
  padding: 0 16px 12px;
}

.ranking-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 3px;
  border-top: 1px solid var(--line);
  color: var(--navy);
  font-size: 11px;
}

.ranking-team {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-team i {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.ranking-row strong {
  flex: 0 0 auto;
  color: var(--blue);
  font-size: 12px;
}

.team-auction-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
}

.auction-team.is-assignable {
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease, opacity .16s ease;
}

.auction-team.is-assignable.is-eligible:hover {
  border-color: #b986df;
  box-shadow: 0 5px 14px rgba(115, 48, 170, .13);
  transform: translateY(-1px);
}

.auction-team.is-assignable.blocked {
  cursor: not-allowed;
  opacity: .55;
}

.role-purchase-counts {
  display: flex;
  gap: 4px;
  margin-top: 10px;
}

.role-purchase-counts span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 22px;
  padding: 4px 3px;
  border-radius: 5px;
  background: #f2f5f8;
  color: #7f90a5;
  font-size: 10px;
}

.role-purchase-counts b {
  color: var(--blue);
  font-size: 9px;
}

.role-purchase-counts strong {
  color: var(--navy);
  font-size: 10px;
}

.assign-hint {
  display: block;
  min-height: 12px;
  margin-top: 8px;
  color: #8a98aa;
  font-size: 9px;
  line-height: 1.3;
}

.auction-team.is-eligible .assign-hint {
  color: #7b3cb4;
  font-weight: 800;
}

.role-avatar {
  border-radius: 50%;
  background: #5e85ba;
  font-family: "Arial Narrow", sans-serif;
  font-size: 25px;
  font-weight: 900;
}

.role-avatar.P { background: #5e85ba; }
.role-avatar.D { background: #138e74; }
.role-avatar.C { background: #c47f22; }
.role-avatar.A { background: #ac4f75; }

.player-search {
  padding-bottom: 15px;
}

.search-input-wrap,
.role-select-label select {
  height: 46px;
}

.player-result {
  padding-top: 7px;
  padding-bottom: 7px;
}

.search-results {
  margin-top: 6px;
}

.search-empty {
  padding: 10px 12px;
}

@media (max-width: 1100px) {
  .auction-layout {
    grid-template-columns: 1fr;
  }

  .auction-main,
  .auction-side {
    grid-column: auto;
    grid-row: auto;
  }

  .auction-side {
    display: grid;
    grid-template-columns: minmax(220px, .8fr) 1fr;
    gap: 16px;
  }

  .team-auction-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .auction-side {
    display: flex;
    flex-direction: column;
  }

  .team-auction-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .role-purchase-counts {
    gap: 2px;
  }

  .role-purchase-counts span {
    min-width: 20px;
    padding-left: 2px;
    padding-right: 2px;
  }
}

.app-shell:has(.auction-header) .topbar {
  height: 64px;
  padding-top: 9px;
  padding-bottom: 9px;
}

.app-shell:has(.auction-header) .content {
  padding-top: 9px;
}

.auction-header {
  align-items: center;
  margin-bottom: 10px;
}

.auction-header h2 {
  font-size: 27px;
  margin-top: 2px;
}

.auction-header-actions {
  gap: 6px;
}

.auction-header-actions .secondary-button {
  padding: 8px 11px;
  gap: 8px;
  font-size: 11px;
}

.auction-header-actions .live-badge {
  padding: 6px 8px;
}

.auction-toolbar {
  padding: 9px 14px;
  margin-bottom: 10px;
}

.role-step {
  gap: 4px;
  padding-right: 6px;
  font-size: 10px;
}

.role-step b {
  width: 20px;
  height: 20px;
}

.turn-label {
  font-size: 11px;
}

.call-panel {
  min-height: 0;
}

.call-panel .panel-heading {
  padding: 13px 18px 9px;
}

.called-player {
  gap: 12px;
  padding: 0 18px 12px;
}

.called-player-info > strong {
  margin: 2px 0 5px;
  font-size: 24px;
}

.player-avatar {
  width: 56px;
  height: 56px;
}

.role-avatar {
  font-size: 22px;
}

.price-box {
  gap: 5px;
}

.price-box input {
  width: 110px;
  padding: 7px 10px;
  font-size: 18px;
}

.call-actions {
  margin-top: 6px;
}

.scout-advice {
  margin: 0 18px 12px;
  padding: 10px 12px;
}

.scout-advice-grid {
  gap: 12px;
  margin-top: 8px;
}

.scout-note-display {
  margin-top: 8px;
  padding-top: 8px;
}

.teams-panel .panel-heading {
  padding: 12px 16px 10px;
}

.team-auction-grid {
  padding: 0 8px 10px;
}

.player-search {
  padding: 0 18px 10px;
}

.search-input-wrap,
.role-select-label select {
  height: 40px;
}

.search-input-wrap {
  padding-left: 10px;
  padding-right: 10px;
}

.search-input-wrap > span {
  font-size: 20px;
}

.search-input-wrap input {
  font-size: 14px;
}

.role-select-label {
  gap: 4px;
}

.search-hint {
  margin-top: 4px;
  font-size: 10px;
}

.search-results {
  margin-top: 4px;
}

.player-result {
  gap: 8px;
  padding: 5px 10px;
}

.player-result small {
  margin-top: 1px;
  font-size: 10px;
}

.role-badge {
  padding-top: 4px;
  padding-bottom: 4px;
}

@media (max-width: 760px) {
  .app-shell:has(.auction-header) .topbar {
    height: 58px;
    padding: 8px 18px;
  }

  .app-shell:has(.auction-header) .content {
    padding-top: 9px;
  }

  .called-player {
    padding-left: 14px;
    padding-right: 14px;
  }

  .scout-advice {
    margin-left: 14px;
    margin-right: 14px;
  }
}

/* Auction callout: keep the current player row compact and make the history legible. */
.app-shell.route-auction .call-panel .panel-heading {
  padding-top: 9px;
  padding-bottom: 5px;
}

.app-shell.route-auction .called-player {
  gap: 10px;
  padding: 0 18px 8px;
}

.app-shell.route-auction .player-avatar {
  width: 48px;
  height: 48px;
}

.app-shell.route-auction .role-avatar {
  font-size: 20px;
}

.app-shell.route-auction .called-player-info > strong {
  margin: 1px 0 0;
  font-size: 23px;
}

.app-shell.route-auction .price-box {
  gap: 4px;
}

.app-shell.route-auction .price-box input {
  width: 104px;
  margin-top: 3px;
  padding: 6px 9px;
  font-size: 18px;
}

.app-shell.route-auction .call-actions {
  margin-top: 4px;
}

.market-purchase-list > div {
  align-items: center;
}

.market-purchase-league {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-purchase-values {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
}

.market-purchase-values small {
  font-weight: 500;
}

.market-purchase-adjusted {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.market-purchase-adjusted small {
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.market-purchase-values strong {
  color: #2565a4;
  font-size: 15px;
  font-weight: 900;
}

.edit-teams-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 22px 20px;
}

.edit-team-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfe;
}

.edit-team-row input {
  width: 100%;
}

.edit-team-row .crest-picker {
  width: 100%;
  cursor: pointer;
}

.edit-team-row .crest-picker input[type="file"] {
  cursor: pointer;
  border: 0;
  padding: 0;
  background: transparent;
}

.edit-teams-actions {
  grid-column: 1 / -1;
}

@media (max-width: 760px) {
  .app-shell.route-auction .called-player {
    padding-left: 14px;
    padding-right: 14px;
  }

  .market-purchase-values {
    gap: 5px;
  }

  .edit-teams-form {
    grid-template-columns: 1fr;
  }
}

.league-history-panel {
  margin-top: 18px;
  overflow: hidden;
}

.history-season-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #8190a3;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.history-season-picker select {
  border: 1px solid #d7e0eb;
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
  color: var(--blue);
  font-size: 12px;
  text-transform: none;
  letter-spacing: normal;
  outline-color: var(--purple);
}

.history-intro {
  padding: 0 22px 14px;
  font-size: 13px;
}

.history-season-meta {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 13px 22px;
  background: #fbfcfd;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.history-season-meta strong {
  font-family: "Arial Narrow", sans-serif;
  color: var(--navy);
  font-size: 21px;
}

.history-season-meta span {
  font-size: 12px;
  color: #8594a6;
}

.history-team-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  padding: 14px 22px 18px;
}

.history-team-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 7px;
  row-gap: 2px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.history-team-row strong {
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-team-row span,
.history-team-row small {
  grid-column: 2;
  font-size: 10px;
  color: #8796a8;
}

.history-team-row small {
  color: var(--blue);
}

.history-roster-layout {
  display: grid;
  grid-template-columns: 1.55fr .8fr;
  gap: 18px;
  padding: 0 22px 22px;
}

.history-roster-layout > div {
  min-width: 0;
}

.subpanel-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0 0 10px;
}

.subpanel-heading strong {
  font-family: "Arial Narrow", sans-serif;
  color: var(--navy);
  font-size: 19px;
}

.history-competitions {
  height: max-content;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.history-competitions .subpanel-heading {
  padding: 15px 16px 10px;
}

.history-competitions .competition-row {
  padding: 13px 15px;
}

.history-competitions .empty-note {
  padding: 20px 14px;
  font-size: 12px;
}

@media (max-width: 1100px) {
  .history-team-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .history-roster-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .history-season-picker {
    width: 100%;
    justify-content: space-between;
  }

  .history-season-picker select {
    flex: 1;
  }

  .history-season-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .history-team-grid {
    grid-template-columns: repeat(2, 1fr);
    padding-left: 14px;
    padding-right: 14px;
  }

  .history-roster-layout {
    padding-left: 14px;
    padding-right: 14px;
  }
}

.history-links-panel {
  margin-top: 18px;
  overflow: hidden;
}

.history-links-intro {
  padding: 0 22px 16px;
  font-size: 13px;
}

.history-links-heading-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.history-toggle-linked {
  white-space: nowrap;
}

.history-links-complete {
  padding: 18px 22px 22px;
  border-top: 1px solid var(--line);
  color: #60748d;
  font-size: 13px;
}

.history-links-seasons {
  border-top: 1px solid var(--line);
}

.history-links-season {
  border-bottom: 1px solid var(--line);
}

.history-links-season-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 22px 8px;
  background: #fbfcfd;
}

.history-links-season-head strong {
  font-family: "Arial Narrow", sans-serif;
  color: var(--navy);
  font-size: 17px;
}

.history-links-season-head span {
  color: #8796a8;
  font-size: 10px;
}

.history-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  align-items: center;
  gap: 14px;
  padding: 9px 22px;
  border-top: 1px solid #f0f2f5;
}

.history-link-row > span {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.history-link-row > span strong {
  overflow: hidden;
  color: var(--navy);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-link-row > span small {
  margin-top: 3px;
  color: #8a98aa;
  font-size: 10px;
}

.history-link-row select {
  width: 100%;
  border: 1px solid #d7e0eb;
  border-radius: 7px;
  padding: 8px 9px;
  background: #fff;
  color: var(--navy);
  font-size: 11px;
  outline-color: var(--purple);
}

.history-link-controls {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.history-link-controls select {
  flex: 1;
  min-width: 0;
}

.history-create-team {
  flex: 0 0 auto;
  border: 1px solid #d9c5ff;
  border-radius: 7px;
  padding: 8px 9px;
  background: #faf7ff;
  color: #7139bd;
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.history-create-team:hover {
  background: #f1e9ff;
}

.history-links-actions {
  display: flex;
  justify-content: flex-end;
  padding: 14px 22px 18px;
}

@media (max-width: 760px) {
  .history-links-intro {
    padding-left: 14px;
    padding-right: 14px;
  }

  .history-links-heading-actions {
    align-items: flex-end;
    flex-direction: column;
    gap: 6px;
  }

  .history-links-season-head,
  .history-link-row {
    padding-left: 14px;
    padding-right: 14px;
  }

  .history-link-row {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .history-link-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .history-links-actions {
    padding-left: 14px;
    padding-right: 14px;
  }

  .history-links-actions .primary-button {
    width: 100%;
    justify-content: center;
  }

  .history-links-complete {
    padding-left: 14px;
    padding-right: 14px;
  }
}

/* New-auction setup: one clear draggable call-order column. */
.auction-create-form .call-order-config {
  grid-column: 1 / -1;
  min-width: 0;
}

.auction-create-form .call-order-grid {
  display: block;
}

.call-order-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 278px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfe;
}

.call-order-item {
  display: grid;
  grid-template-columns: 20px 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 35px;
  padding: 6px 9px;
  border: 1px solid #dce4ed;
  border-radius: 8px;
  background: #fff;
  cursor: grab;
  user-select: none;
}

.call-order-item:hover {
  border-color: #b9c9dc;
  background: #f9fbff;
}

.call-order-item:active,
.call-order-item.is-dragging {
  cursor: grabbing;
}

.call-order-item.is-dragging {
  opacity: .45;
}

.call-order-handle {
  color: #92a2b5;
  font-size: 17px;
  line-height: 1;
  letter-spacing: -4px;
}

.call-order-position {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #eef2f7;
  color: var(--blue);
  font-size: 10px;
  font-weight: 850;
}

.call-order-item strong {
  min-width: 0;
  overflow: hidden;
  color: var(--navy);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.call-order-item small {
  color: #97a4b4;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* The live turn is the primary piece of information in the auction room. */
.app-shell.route-auction .auction-toolbar {
  align-items: stretch;
  gap: 12px;
}

.app-shell.route-auction .role-track {
  flex: 1;
  align-items: center;
}

.turn-focus {
  display: flex;
  flex: 0 0 235px;
  flex-direction: column;
  justify-content: center;
  min-height: 58px;
  padding: 8px 13px;
  border: 1px solid rgba(211, 164, 255, .45);
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(168, 85, 247, .35), rgba(74, 104, 153, .35));
}

.turn-focus > span {
  color: #dcc4f5;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .15em;
}

.turn-focus strong {
  margin-top: 2px;
  overflow: hidden;
  color: #fff;
  font-family: "Arial Narrow", sans-serif;
  font-size: 21px;
  letter-spacing: -.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.turn-focus small {
  margin-top: 1px;
  overflow: hidden;
  color: #c0cee0;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Compact called-player row: the name is rendered once, beside quote, price and cancel. */
.app-shell.route-auction .called-player {
  display: grid;
  grid-template-columns: 48px minmax(120px, 1fr) max-content max-content max-content;
  align-items: center;
  gap: 9px;
  padding: 0 18px 8px;
}

.app-shell.route-auction .called-player-info {
  min-width: 0;
}

.app-shell.route-auction .called-player-info > strong {
  margin: 1px 0 0;
  overflow: hidden;
  font-size: 22px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell.route-auction .called-player-quotation {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 54px;
}

.app-shell.route-auction .called-player-quotation small {
  color: #8b99ab;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.app-shell.route-auction .called-player-quotation strong {
  color: var(--blue);
  font-family: "Arial Narrow", sans-serif;
  font-size: 18px;
}

.app-shell.route-auction .price-box {
  gap: 3px;
}

.app-shell.route-auction .price-box input {
  width: 94px;
  margin-top: 2px;
  padding: 5px 8px;
  font-size: 17px;
}

.app-shell.route-auction .call-actions {
  align-items: center;
  margin-top: 0;
}

.app-shell.route-auction .cancel-call-button {
  padding: 8px 9px;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .app-shell.route-auction .called-player {
    grid-template-columns: 48px minmax(0, 1fr) max-content;
  }

  .app-shell.route-auction .called-player-quotation {
    grid-column: 3;
    grid-row: 1;
  }

  .app-shell.route-auction .price-box {
    grid-column: 2;
    grid-row: 2;
    align-items: start;
  }

  .app-shell.route-auction .call-actions {
    grid-column: 3;
    grid-row: 2;
    justify-self: end;
  }
}

@media (max-width: 760px) {
  .app-shell.route-auction .auction-toolbar {
    align-items: stretch;
  }

  .turn-focus {
    flex-basis: auto;
    width: 100%;
  }

  .app-shell.route-auction .called-player {
    grid-template-columns: 42px minmax(0, 1fr);
    padding-left: 14px;
    padding-right: 14px;
  }

  .app-shell.route-auction .player-avatar {
    width: 42px;
    height: 42px;
  }

  .app-shell.route-auction .called-player-quotation {
    grid-column: 2;
    grid-row: 2;
  }

  .app-shell.route-auction .price-box {
    grid-column: 2;
    grid-row: 3;
  }

  .app-shell.route-auction .call-actions {
    grid-column: 2;
    grid-row: 4;
    justify-self: start;
  }
}

/* Auction chrome: keep only the useful live information above the room. */
.app-shell.route-auction .topbar {
  display: none;
}

.app-shell.route-auction .content {
  padding-top: 13px;
}

.app-shell.route-auction .auction-header {
  align-items: center;
  gap: 12px;
  margin-bottom: 7px;
}

.app-shell.route-auction .auction-context {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  align-items: baseline;
  gap: 8px;
  overflow: hidden;
  white-space: nowrap;
}

.app-shell.route-auction .auction-context > span {
  flex: 0 0 auto;
  color: #8b9aaf;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
}

.app-shell.route-auction .auction-context > strong,
.app-shell.route-auction .auction-context > b {
  min-width: 0;
  overflow: hidden;
  color: var(--navy);
  text-overflow: ellipsis;
}

.app-shell.route-auction .auction-context > strong {
  font-size: 17px;
}

.app-shell.route-auction .auction-context > b {
  color: #6f8097;
  font-family: "Arial Narrow", sans-serif;
  font-size: 20px;
  letter-spacing: -.02em;
}

.app-shell.route-auction .auction-header-actions {
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 5px;
}

.app-shell.route-auction .auction-sync-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #56708f;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.app-shell.route-auction .auction-sync-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2fb36d;
}

.app-shell.route-auction .auction-sync-status.offline i {
  background: #e9a227;
}

.app-shell.route-auction .auction-header-actions > .icon-button {
  width: 29px;
  height: 29px;
}

.app-shell.route-auction .auction-header-actions .live-badge {
  padding: 6px 8px;
  font-size: 10px;
}

.app-shell.route-auction .auction-toolbar {
  min-height: 42px;
  padding: 5px 10px;
  margin-bottom: 8px;
}

.app-shell.route-auction .turn-focus {
  display: flex;
  flex: 0 0 auto;
  flex-direction: row;
  align-items: baseline;
  gap: 8px;
  min-height: 30px;
  padding: 5px 10px;
  white-space: nowrap;
}

.app-shell.route-auction .turn-focus > span,
.app-shell.route-auction .turn-focus strong,
.app-shell.route-auction .turn-focus b {
  flex: 0 0 auto;
}

.app-shell.route-auction .turn-focus > span::after,
.app-shell.route-auction .turn-focus strong::after {
  content: "·";
  margin-left: 8px;
  color: #c1cee0;
}

.app-shell.route-auction .turn-focus strong {
  max-width: 190px;
  margin-top: 0;
  font-size: 17px;
}

.app-shell.route-auction .turn-focus b {
  color: #e0c4f8;
  font-family: "Arial Narrow", sans-serif;
  font-size: 18px;
}

.app-shell.route-auction .turn-focus small {
  display: none;
}

.app-shell.route-auction .call-panel:not(.has-current-player) > .panel-heading {
  padding-top: 6px;
  padding-bottom: 5px;
}

.app-shell.route-auction .call-panel:not(.has-current-player) > .panel-heading h3 {
  margin-top: 0;
  font-size: 17px;
}

.app-shell.route-auction .called-player-info > strong {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.app-shell.route-auction .player-status {
  color: #7d3bb4;
  font-family: "Avenir Next", Avenir, sans-serif;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.app-shell.route-auction .teams-panel,
.app-shell.route-auction .ranking-panel {
  border-radius: 10px;
}

@media (max-width: 900px) {
  .app-shell.route-auction .auction-header {
    align-items: flex-start;
  }

  .app-shell.route-auction .auction-header-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}

@media (max-width: 760px) {
  .app-shell.route-auction .content {
    padding-top: 9px;
  }

  .app-shell.route-auction .auction-header {
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
  }

  .app-shell.route-auction .auction-context {
    flex-wrap: wrap;
    white-space: normal;
  }

  .app-shell.route-auction .auction-header-actions {
    justify-content: flex-start;
  }

  .app-shell.route-auction .turn-focus {
    width: 100%;
    justify-content: center;
  }
}

/* Desktop auction room: the called player spans the top, while teams and ranking share the row below. */
@media (min-width: 1101px) {
  .app-shell.route-auction .auction-layout {
    grid-template-columns: minmax(0, 1fr) minmax(220px, .32fr);
    gap: 10px 14px;
    align-items: start;
  }

  .app-shell.route-auction .auction-main {
    display: contents;
  }

  .app-shell.route-auction .call-panel {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .app-shell.route-auction .teams-panel {
    grid-column: 1;
    grid-row: 2;
  }

  .app-shell.route-auction .auction-side {
    grid-column: 2;
    grid-row: 2;
  }
}

.app-shell.route-auction .call-panel.has-current-player {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
}

.app-shell.route-auction .call-panel.has-current-player > .panel-heading,
.app-shell.route-auction .call-panel.has-current-player > .called-player {
  grid-column: 1 / -1;
}

.app-shell.route-auction .call-panel.has-current-player > .scout-advice,
.app-shell.route-auction .call-panel.has-current-player > .market-advice {
  width: auto;
  min-width: 0;
  margin: 0 8px 8px;
}

.app-shell.route-auction .call-panel.has-current-player > .scout-advice {
  margin-left: 18px;
}

.app-shell.route-auction .call-panel.has-current-player > .market-advice {
  margin-right: 18px;
}

.app-shell.route-auction .called-player {
  grid-template-columns: 42px minmax(120px, 1fr) max-content max-content max-content;
  gap: 8px;
  padding-bottom: 6px;
}

.app-shell.route-auction .called-player .player-avatar {
  width: 42px;
  height: 42px;
}

.app-shell.route-auction .called-player-info > strong {
  font-size: 20px;
}

.app-shell.route-auction .called-player-quotation strong {
  font-size: 17px;
}

.app-shell.route-auction .price-box input {
  width: 82px;
  padding: 4px 7px;
  font-size: 16px;
}

.app-shell.route-auction .cancel-call-button {
  padding: 7px 8px;
  font-size: 10px;
}

.app-shell.route-auction .teams-panel .panel-heading,
.app-shell.route-auction .ranking-panel .panel-heading {
  padding-top: 9px;
  padding-bottom: 7px;
}

.app-shell.route-auction .teams-panel .panel-heading h3,
.app-shell.route-auction .ranking-panel .panel-heading h3 {
  font-size: 18px;
}

.app-shell.route-auction .team-auction-grid {
  gap: 6px;
  padding: 0 8px 8px;
}

.app-shell.route-auction .auction-team {
  padding: 8px;
}

.app-shell.route-auction .auction-team-balance {
  margin: 8px 0 5px;
}

.app-shell.route-auction .auction-team-balance strong {
  font-size: 19px;
}

.app-shell.route-auction .auction-team-balance span,
.app-shell.route-auction .auction-team-footer,
.app-shell.route-auction .assign-hint {
  font-size: 9px;
}

.app-shell.route-auction .role-purchase-counts {
  gap: 3px;
  margin-top: 6px;
}

.app-shell.route-auction .role-purchase-counts span {
  min-width: 20px;
  padding-top: 3px;
  padding-bottom: 3px;
}

.app-shell.route-auction .assign-hint {
  min-height: 0;
  margin-top: 5px;
}

.app-shell.route-auction .ranking-list {
  padding: 0 12px 8px;
}

.app-shell.route-auction .ranking-row {
  padding: 6px 2px;
  font-size: 10px;
}

.app-shell.route-auction .ranking-row strong {
  font-size: 11px;
}

@media (max-width: 760px) {
  .app-shell.route-auction .call-panel.has-current-player {
    display: block;
  }

  .app-shell.route-auction .call-panel.has-current-player > .scout-advice,
  .app-shell.route-auction .call-panel.has-current-player > .market-advice {
    margin-left: 14px;
    margin-right: 14px;
  }
}

@media (max-width: 900px) {
  .app-shell.route-auction .called-player {
    grid-template-columns: 48px minmax(0, 1fr) max-content;
  }

  .app-shell.route-auction .called-player-quotation {
    grid-column: 3;
    grid-row: 1;
  }

  .app-shell.route-auction .called-player .price-box {
    grid-column: 2;
    grid-row: 2;
    align-items: start;
  }

  .app-shell.route-auction .called-player .call-actions {
    grid-column: 3;
    grid-row: 2;
    justify-self: end;
  }
}

@media (max-width: 760px) {
  .app-shell.route-auction .called-player {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .app-shell.route-auction .called-player .player-avatar {
    width: 42px;
    height: 42px;
  }

  .app-shell.route-auction .called-player-quotation {
    grid-column: 2;
    grid-row: 2;
  }

  .app-shell.route-auction .called-player .price-box {
    grid-column: 2;
    grid-row: 3;
  }

  .app-shell.route-auction .called-player .call-actions {
    grid-column: 2;
    grid-row: 4;
    justify-self: start;
  }
}

/* Editable pre-auction agenda shared by the operational league. */
.agenda-panel {
  margin-bottom: 18px;
  overflow: hidden;
}

.agenda-panel .panel-heading {
  padding-bottom: 8px;
}

.agenda-panel .panel-heading h3 {
  margin-top: 3px;
}

.agenda-progress {
  color: var(--purple);
  font-size: 11px;
  font-weight: 900;
}

.agenda-intro {
  margin: 0;
  padding: 0 22px 13px;
  color: #8090a3;
  font-size: 12px;
}

.agenda-gate {
  margin: 0;
}

.agenda-gate .agenda-intro {
  color: var(--navy);
  font-weight: 700;
}

.agenda-list {
  display: grid;
  gap: 6px;
  padding: 0 22px 12px;
}

.agenda-item {
  display: grid;
  grid-template-columns: 17px 24px 25px minmax(0, 1fr) 28px;
  gap: 8px;
  align-items: center;
  min-height: 38px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.agenda-item.is-complete {
  border-color: #cbe8d7;
  background: #f3fbf6;
}

.agenda-item.is-dragging {
  opacity: .45;
}

.agenda-handle {
  color: #a2afbf;
  cursor: grab;
  font-size: 15px;
  letter-spacing: -4px;
}

.agenda-position {
  color: #8b9aaf;
  font-size: 10px;
  font-weight: 900;
  text-align: center;
}

.agenda-check {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  cursor: pointer;
}

.agenda-check input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.agenda-check span {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border: 1px solid #bfcbda;
  border-radius: 5px;
  background: #fff;
}

.agenda-check input:checked + span {
  border-color: #2e9a64;
  background: #2e9a64;
}

.agenda-check input:checked + span::after {
  content: "✓";
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.agenda-title {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--navy);
  font-size: 12px;
}

.agenda-item.is-complete .agenda-title {
  color: #54806a;
  text-decoration: line-through;
}

.agenda-title.is-locked {
  color: #687b93;
  cursor: default;
  font-weight: 800;
}

.agenda-item.is-locked .agenda-handle {
  color: #8292a7;
}

.agenda-delete {
  width: 25px;
  height: 25px;
  border-radius: 6px;
  color: #9aa8b8;
  font-size: 18px;
  line-height: 1;
}

.agenda-delete:hover {
  background: #fff0ef;
  color: #a73731;
}

.agenda-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 0 22px 17px;
}

.agenda-actions .secondary-button,
.agenda-actions .primary-button {
  padding-top: 8px;
  padding-bottom: 8px;
  font-size: 11px;
}

.agenda-call-order {
  grid-column: 1 / -1;
  margin: 4px 0 2px 49px;
  padding-top: 9px;
  border-top: 1px solid #e4eaf1;
}

.agenda-call-order-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.agenda-call-order-heading strong {
  color: var(--navy);
  font-size: 11px;
}

.agenda-call-order-heading small {
  color: #8e9daf;
  font-size: 9px;
}

.agenda-call-order .call-order-list {
  max-height: 230px;
  padding: 4px;
}

.agenda-call-order .call-order-item {
  min-height: 31px;
  padding: 4px 8px;
}

.agenda-payments {
  grid-column: 1 / -1;
  margin: 4px 0 2px 49px;
  padding-top: 9px;
  border-top: 1px solid #e4eaf1;
}

.agenda-payments-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.agenda-payments-heading strong {
  color: var(--navy);
  font-size: 11px;
}

.agenda-payments-heading small {
  color: #8e9daf;
  font-size: 9px;
}

.agenda-payment-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.agenda-payment-item {
  display: grid;
  grid-template-columns: 19px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-height: 31px;
  padding: 5px 8px;
  border: 1px solid #dce4ed;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.agenda-payment-item input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.agenda-payment-check {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid #bfcbda;
  border-radius: 5px;
}

.agenda-payment-item input:checked + .agenda-payment-check {
  border-color: #2e9a64;
  background: #2e9a64;
}

.agenda-payment-item input:checked + .agenda-payment-check::after {
  content: "✓";
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.agenda-payment-item strong {
  min-width: 0;
  overflow: hidden;
  color: var(--navy);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agenda-payment-item small {
  color: #a06a37;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.agenda-payment-item.is-paid {
  border-color: #cbe8d7;
  background: #f3fbf6;
}

.agenda-payment-item.is-paid small {
  color: #2e9a64;
}

@media (max-width: 760px) {
  .agenda-call-order {
    margin-left: 0;
  }

  .agenda-call-order-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .agenda-payments {
    margin-left: 0;
  }

  .agenda-payments-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .agenda-payment-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .agenda-intro,
  .agenda-list,
  .agenda-actions {
    padding-left: 14px;
    padding-right: 14px;
  }

  .agenda-item {
    grid-template-columns: 15px 20px 25px minmax(0, 1fr) 25px;
    gap: 5px;
  }

  .agenda-actions {
    flex-direction: column-reverse;
  }

  .agenda-actions button {
    width: 100%;
    justify-content: center;
  }
}

/* Rose compatte per la scheda lega e per l'archivio. */
.league-rosters-panel {
  overflow: hidden;
}

.league-roster-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 0 22px 22px;
}

.league-roster-card {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.league-roster-card.is-user {
  border-color: #cca1f0;
  box-shadow: inset 0 2px 0 var(--purple);
}

.league-roster-card-head {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}

.league-roster-card-head .team-crest,
.league-roster-card-head .team-color {
  flex: 0 0 auto;
  width: 23px;
  height: 23px;
  border-radius: 5px;
}

.league-roster-card-head > div {
  min-width: 0;
  flex: 1;
}

.league-roster-card-head strong,
.league-roster-card-head span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.league-roster-card-head strong {
  color: var(--navy);
  font-size: 11px;
}

.league-roster-card-head div span {
  margin-top: 3px;
  color: #8a98aa;
  font-size: 9px;
}

.league-roster-card-head .you-badge {
  display: inline-block;
  flex: 0 0 auto;
  width: auto;
  margin-left: 0;
  overflow: visible;
}

.roster-role-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  padding-top: 9px;
}

.roster-role-column {
  min-width: 0;
}

.roster-role-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 4px;
}

.roster-role-head .role-badge {
  width: 19px;
  padding: 3px 0;
  border-radius: 4px;
  font-size: 9px;
}

.roster-role-head > b {
  color: #8a98aa;
  font-size: 9px;
}

.roster-player-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.roster-player-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 3px;
  min-width: 0;
  color: var(--navy);
  font-size: 9px;
  line-height: 1.25;
}

.roster-player-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roster-player-list li > b {
  flex: 0 0 auto;
  color: #71849e;
  font-size: 9px;
  font-weight: 700;
}

.roster-player-empty {
  color: #a0acb9 !important;
}

.history-roster-grid {
  padding: 0 0 0;
}

.history-roster-grid .league-roster-card {
  background: #fbfcfd;
}

.history-archive-closed {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 22px 22px;
  padding: 13px 15px;
  border: 1px dashed #d7e0eb;
  border-radius: 9px;
  color: #8796a8;
  font-size: 12px;
}

.history-archive-closed strong {
  color: var(--navy);
}

.president-summary-table th:first-child,
.president-summary-table td:first-child {
  width: 28px;
  color: #8b99aa;
}

.president-summary-table td:not(:nth-child(2)),
.president-summary-table th:not(:nth-child(2)) {
  text-align: right;
}

@media (max-width: 1200px) {
  .league-roster-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .league-roster-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .league-roster-grid {
    grid-template-columns: 1fr;
    padding-left: 14px;
    padding-right: 14px;
  }

  .history-roster-grid {
    padding-left: 0;
    padding-right: 0;
  }

  .history-archive-closed {
    align-items: flex-start;
    flex-direction: column;
    margin-left: 14px;
    margin-right: 14px;
  }
}

/* Lettura verticale delle rose: ogni ruolo resta su una riga dedicata. */
.roster-role-stack {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-top: 9px;
}

.roster-role-row {
  display: grid;
  grid-template-columns: 23px minmax(0, 1fr);
  align-items: start;
  gap: 7px;
  min-width: 0;
  padding-top: 7px;
  border-top: 1px solid #edf0f5;
}

.roster-role-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.roster-role-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  margin: 0;
}

.roster-role-head .role-badge {
  width: 22px;
  padding: 4px 0;
  border-radius: 5px;
  font-size: 10px;
}

.roster-role-head > b {
  color: #788ba4;
  font-size: 9px;
  line-height: 1;
}

.roster-player-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px 8px;
  min-width: 0;
  min-height: 24px;
  padding-top: 2px;
}

.roster-player-list li {
  min-width: 0;
  color: var(--navy);
  font-size: 10.5px;
  line-height: 1.35;
}

.roster-player-list li > b {
  font-size: 9.5px;
}

.history-wins-panel {
  margin: 0 22px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.history-wins-panel .subpanel-heading {
  padding: 14px 16px 10px;
}

.president-summary-row.is-clickable {
  cursor: pointer;
}

.president-summary-row.is-clickable:hover,
.president-summary-row.is-open {
  background: #faf6ff;
}

.president-summary-row td:nth-child(2) strong {
  display: block;
}

.president-summary-row td:nth-child(2) small {
  display: block;
  margin-top: 3px;
  color: #8b54b5;
  font-size: 9px;
}

.president-trophy-details td {
  padding-top: 0;
  background: #faf6ff;
}

.president-trophy-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0 0 12px;
}

.president-trophy-list span {
  display: grid;
  grid-template-columns: auto auto;
  column-gap: 7px;
  align-items: baseline;
  padding: 7px 9px;
  border: 1px solid #eadcf7;
  border-radius: 7px;
  background: #fff;
}

.president-trophy-list strong {
  color: var(--navy);
  font-size: 11px;
}

.president-trophy-list b {
  color: #7b3db3;
  font-size: 10px;
}

.president-trophy-list small {
  grid-column: 1 / -1;
  margin-top: 3px;
  color: #8796a8;
  font-size: 9px;
}

@media (max-width: 760px) {
  .history-wins-panel {
    margin-left: 14px;
    margin-right: 14px;
  }

  .roster-player-list {
    grid-template-columns: 1fr;
  }
}

/* Una sola colonna di nomi per ogni ruolo: più spazio e lettura immediata. */
.roster-player-list {
  grid-template-columns: 1fr;
}

/* Il pannello competizioni resta utile ma non deve sottrarre spazio alle rose. */
.detail-grid {
  grid-template-columns: minmax(0, 1fr) 270px;
}

.history-roster-layout {
  grid-template-columns: minmax(0, 1fr) 240px;
}

.competition-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 1100px) {
  .history-roster-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

/* L'albo d'oro resta compatto: i dati sono leggibili senza dilatare tutto il pannello. */
.historical-summary-panel {
  max-width: 1120px;
}

.history-wins-panel {
  max-width: 1076px;
}

.president-trophy-group > div:last-child span {
  width: 100%;
  justify-content: flex-end;
  text-align: right;
}

.president-trophy-group > div:last-child span b {
  font-size: 11px;
}

/* Scudetti più visibili nella rosa della lega, nell'asta privata e nella vista pubblica. */
.league-roster-card-head .team-crest,
.league-roster-card-head .team-crest-placeholder {
  width: 31px;
  height: 31px;
  border-radius: 6px;
}

.auction-team-head .team-crest,
.auction-team-head .team-crest-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.public-room .public-team-name .team-crest,
.public-room .public-team-name .team-crest-placeholder {
  width: 31px;
  height: 31px;
  border-radius: 6px;
}

.auction-roster-player-field {
  flex: 1.4 1 260px;
  min-width: 220px;
}

.auction-roster-player-results {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 126px;
  overflow-y: auto;
  margin-top: 3px;
}

.auction-roster-player-result {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 4px 6px;
  border: 1px solid #dfe6ef;
  border-radius: 6px;
  background: #fff;
  color: var(--navy);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.auction-roster-player-result:hover,
.auction-roster-player-result:focus-visible {
  border-color: #9fb9dc;
  background: #f5f8fc;
  outline: none;
}

.auction-roster-player-result strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auction-roster-player-result small {
  overflow: hidden;
  margin-left: auto;
  color: #8798ad;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auction-roster-player-selected {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  color: var(--navy);
  font-size: 10px;
  font-weight: 700;
}

.auction-roster-search-empty,
.auction-roster-add-hint {
  display: block;
  margin-top: 4px;
  color: #8798ad;
  font-size: 10px;
}

.auction-roster-add button:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.app-shell.route-auction .auction-team-balance {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 8px 0 5px;
}

.app-shell.route-auction .auction-team-balance > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.app-shell.route-auction .auction-team-balance > span + span {
  align-items: flex-end;
  text-align: right;
}

.app-shell.route-auction .auction-team-balance small {
  color: #8b99ab;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .05em;
  line-height: 1.1;
  text-transform: uppercase;
}

.app-shell.route-auction .auction-team-balance strong {
  color: var(--navy);
  font-family: "Arial Narrow", sans-serif;
  font-size: 19px;
  letter-spacing: -.03em;
  line-height: 1;
}

.auction-order-panel {
  margin: 0 0 10px;
  padding: 10px 14px;
}

.auction-order-panel .panel-heading {
  padding: 0 0 8px;
}

.auction-order-panel .panel-heading h3 {
  font-size: 16px;
}

.auction-order-panel .call-order-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.auction-order-panel .call-order-item {
  min-height: 32px;
  padding: 5px 8px;
}

.auction-order-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 8px;
}

.auction-order-actions small {
  color: #8290a3;
  font-size: 10px;
}

.auction-order-actions .primary-button {
  flex: 0 0 auto;
  padding: 7px 11px;
}

.auction-rosters-panel {
  margin-top: 10px;
  overflow: hidden;
  padding-bottom: 10px;
}

.auction-rosters-panel > .panel-heading {
  padding: 10px 14px 8px;
}

.auction-rosters-panel > .panel-heading h3 {
  font-size: 16px;
}

.auction-roster-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  padding: 0 10px 10px;
}

.auction-roster-team {
  min-width: 0;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.auction-roster-team-head {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.auction-roster-team-head .team-crest,
.auction-roster-team-head .team-crest-placeholder {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  flex: 0 0 auto;
}

.auction-roster-team-head strong,
.auction-roster-player strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auction-roster-team-head strong {
  font-size: 11px;
}

.auction-roster-player {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 48px 24px 24px;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 4px 0;
  border-top: 1px solid #edf0f5;
}

.auction-roster-player .role-badge {
  width: 20px;
  height: 20px;
  font-size: 10px;
}

.auction-roster-player strong {
  font-size: 10px;
}

.auction-roster-player input {
  width: 48px;
  padding: 4px 3px;
  border: 1px solid #cbd6e3;
  border-radius: 5px;
  font-size: 11px;
  text-align: right;
}

.auction-roster-action {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: #eef2f7;
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
}

.auction-roster-action.danger {
  color: #a44848;
}

.auction-roster-price {
  color: var(--navy);
  font-size: 11px;
  font-weight: 800;
  text-align: right;
}

.auction-roster-empty {
  margin: 6px 0 2px;
  color: #9aa7b7;
  font-size: 10px;
}

.auction-roster-add {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  padding: 8px 10px 0;
  border-top: 1px solid var(--line);
}

.auction-roster-add label {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  color: #8190a3;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.auction-roster-add select,
.auction-roster-add input {
  min-width: 0;
  width: 100%;
  padding: 7px 8px;
  border: 1px solid #cbd6e3;
  border-radius: 6px;
  background: #fff;
  color: var(--navy);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
}

.auction-roster-add label:last-of-type {
  flex: 0 0 76px;
}

.auction-roster-add .primary-button {
  flex: 0 0 auto;
  padding: 7px 11px;
}

@media (max-width: 1100px) {
  .auction-roster-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .app-shell.route-auction .auction-team-balance strong {
    font-size: 17px;
  }

  .auction-order-panel .call-order-list {
    grid-template-columns: 1fr;
  }

  .auction-order-actions,
  .auction-roster-add {
    flex-wrap: wrap;
  }

  .auction-order-actions .primary-button {
    width: 100%;
  }

  .auction-roster-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .auction-roster-add label {
    flex-basis: calc(50% - 4px);
  }

  .auction-roster-add label:last-of-type {
    flex-basis: calc(50% - 4px);
  }

  .auction-roster-add .primary-button {
    width: 100%;
  }
}

/* Logo della lega più protagonista nelle schede e nelle due viste d'asta. */
.league-card-logo {
  width: 60px;
  height: 64px;
}

.league-detail-title .league-detail-logo {
  width: 66px;
  height: 76px;
}

.auction-league-logo {
  width: 48px;
  height: 58px;
}

.public-league-logo {
  width: 52px;
  height: 62px;
}

@media (max-width: 760px) {
  .league-card-logo {
    width: 48px;
    height: 54px;
  }

  .league-detail-title .league-detail-logo {
    width: 50px;
    height: 60px;
  }

  .auction-league-logo {
    width: 40px;
    height: 48px;
  }

  .public-league-logo {
    width: 42px;
    height: 50px;
  }
}

/* Il logo di FantaCeccotti diventa il riferimento visivo della lega. */
.league-card-logo {
  width: 52px;
  height: 56px;
  object-fit: contain;
}

.league-detail-title .league-detail-logo {
  width: 58px;
  height: 68px;
  object-fit: contain;
}

.app-shell.route-auction .auction-context-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.app-shell.route-auction .auction-context-title > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.app-shell.route-auction .auction-context-title > div > span {
  flex: 0 0 auto;
  color: #8b9aaf;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
}

.app-shell.route-auction .auction-context-title > div > strong,
.app-shell.route-auction .auction-context-title > div > b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-shell.route-auction .auction-context-title > div > strong {
  color: var(--navy);
  font-size: 17px;
}

.app-shell.route-auction .auction-context-title > div > b {
  color: #6f8097;
  font-family: "Arial Narrow", sans-serif;
  font-size: 20px;
  letter-spacing: -.02em;
}

.auction-league-logo {
  width: 42px;
  height: 50px;
  object-fit: contain;
  flex: 0 0 auto;
}

.public-league-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.public-league-title > div {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.public-league-logo {
  width: 45px;
  height: 54px;
  object-fit: contain;
  flex: 0 0 auto;
}

@media (max-width: 760px) {
  .league-card-logo {
    width: 42px;
    height: 46px;
  }

  .league-detail-title .league-detail-logo {
    width: 44px;
    height: 54px;
  }

  .auction-league-logo {
    width: 35px;
    height: 42px;
  }

  .public-league-logo {
    width: 36px;
    height: 44px;
  }
}

.president-trophy-group > div:last-child span {
  width: 100%;
  justify-content: flex-end;
  text-align: right;
}

.president-trophy-groups {
  gap: 5px;
  padding-bottom: 6px;
}

.president-trophy-group {
  padding: 5px 6px;
}

.president-trophy-details td {
  padding: 0 12px 8px;
}

.president-trophy-groups {
  gap: 6px;
  padding-bottom: 8px;
}

.president-trophy-group {
  padding: 6px 7px;
  border-radius: 6px;
}

.president-trophy-group > div:last-child {
  gap: 3px;
  margin-top: 5px;
}

.president-trophy-group > div:last-child span {
  width: 100%;
  justify-content: flex-end;
  text-align: right;
}

.league-card-logo {
  display: block;
  width: 38px;
  height: 42px;
  object-fit: contain;
}

.league-detail-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.league-detail-title .league-detail-logo {
  display: block;
  width: 42px;
  height: 50px;
  object-fit: contain;
}

@media (max-width: 760px) {
  .league-card-logo {
    width: 32px;
    height: 36px;
  }

  .league-detail-title .league-detail-logo {
    width: 34px;
    height: 42px;
  }
}

.league-roster-card-head .team-crest-placeholder {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 23px;
  height: 23px;
  border-radius: 5px;
  color: #fff;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .03em;
}

.team-crest-placeholder {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 5px;
  color: #fff;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .03em;
}

.competition-icon.has-logo {
  background: transparent;
  color: var(--blue);
}

.competition-icon.has-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.competition-heading {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.competition-heading img {
  display: block;
  width: 18px;
  height: 22px;
  object-fit: contain;
}

.president-summary-table {
  min-width: 850px;
}

.president-summary-table .president-team-cell {
  min-width: 150px;
  text-align: left !important;
  white-space: normal;
}

.president-team-cell span {
  display: block;
  color: var(--navy);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.president-trophy-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0 0 12px;
}

.president-trophy-group {
  min-width: 0;
  padding: 9px;
  border: 1px solid #eadcf7;
  border-radius: 8px;
  background: #fff;
}

.president-trophy-group .competition-heading {
  color: #7b3db3;
  font-size: 10px;
  font-weight: 800;
}

.president-trophy-group .competition-heading img {
  width: 15px;
  height: 18px;
}

.president-trophy-group > div:last-child {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 7px;
}

.president-trophy-group > div:last-child span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 7px;
}

.president-trophy-group b {
  color: var(--navy);
  font-size: 10px;
}

.president-trophy-group small {
  min-width: 0;
  overflow: hidden;
  color: #8796a8;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.president-trophy-group .no-trophy {
  color: #a0acb9;
  font-size: 11px;
}

@media (max-width: 760px) {
  .president-trophy-groups {
    grid-template-columns: 1fr;
  }
}

/* Public auction room: keep the whole live board inside one desktop viewport. */
.public-room {
  height: 100vh;
  min-height: 620px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 14px clamp(18px, 3vw, 52px) 10px;
}

.public-room .public-topbar,
.public-room .public-callout,
.public-room .public-content,
.public-room .public-footer {
  width: 100%;
  max-width: 1400px;
}

.public-room .public-callout {
  min-height: 100px;
  margin: 0 auto;
  padding: 14px 24px;
  border: 1px solid rgba(190, 207, 228, .22);
  border-radius: 15px;
  background: rgba(255, 255, 255, .06);
}

.public-room .public-callout.is-waiting {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.public-waiting {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 16px;
  color: #fff;
}

.public-waiting span {
  color: #bfcee0;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .18em;
}

.public-waiting strong {
  font-family: "Arial Narrow", sans-serif;
  font-size: clamp(26px, 3vw, 42px);
  letter-spacing: -.04em;
}

.public-waiting b {
  display: inline-grid;
  min-width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  font-size: 12px;
}

.public-current-player {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 4px 24px;
  height: 100%;
}

.public-current-label {
  grid-column: 1 / -1;
  color: #bfcee0;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .18em;
}

.public-room .public-current-player h1 {
  min-width: 0;
  margin: 0;
  font-size: clamp(38px, 5vw, 70px);
  line-height: .86;
}

.public-room .public-player-meta {
  align-self: end;
  justify-content: flex-end;
  gap: 14px;
  color: #c0cede;
  font-size: 13px;
  white-space: nowrap;
}

.public-role-pill {
  display: inline-grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.public-room .public-player-meta b {
  color: #fff;
  font-weight: 900;
}

.public-room .public-content {
  min-height: 0;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 258px;
  gap: 12px;
  overflow: hidden;
}

.public-room .public-table-card,
.public-room .public-recent {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.public-room .public-card-heading {
  flex: 0 0 auto;
  padding: 11px 17px 8px;
}

.public-room .public-card-heading h2 {
  margin-top: 3px;
  font-size: 18px;
}

.public-live-note {
  color: #8a98aa;
  font-size: 10px;
}

.public-table-labels,
.public-team-row {
  display: grid;
  grid-template-columns: 32px minmax(140px, 1.15fr) minmax(205px, 1.7fr) 75px 105px;
  gap: 10px;
  align-items: center;
}

.public-table-labels {
  flex: 0 0 auto;
  padding: 0 17px 5px;
  color: #9aa8b8;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.public-table-labels span:first-child { grid-column: 2; }
.public-table-labels span:nth-child(2) { grid-column: 3; }
.public-table-labels span:nth-child(3) { grid-column: 4; text-align: right; }
.public-table-labels span:nth-child(4) { grid-column: 5; text-align: right; }

.public-room .public-team-list {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-rows: repeat(10, minmax(0, 1fr));
  padding-bottom: 0;
  overflow: hidden;
}

.public-room .public-team-row {
  min-height: 0;
  padding: 3px 17px;
  border-top: 1px solid var(--line);
  color: #8190a3;
  font-size: 11px;
}

.public-room .public-team-row .rank {
  font-size: 10px;
}

.public-room .public-team-name {
  min-width: 0;
}

.public-room .public-team-name .team-crest {
  width: 22px;
  height: 22px;
  border-radius: 4px;
}

.public-room .public-team-name strong {
  overflow: hidden;
  color: var(--navy);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-missing-slots {
  display: flex;
  align-items: center;
  gap: 4px;
}

.public-missing-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 27px;
  height: 24px;
  padding: 0 4px;
  border-radius: 5px;
  background: #edf2f8;
  color: #5d7591;
  font-size: 10px;
}

.public-missing-slot b {
  color: var(--blue);
  font-size: 9px;
}

.public-missing-slot strong {
  color: var(--navy);
  font-size: 12px;
}

.public-missing-slot.is-complete {
  opacity: .52;
}

.public-team-budget,
.public-team-max {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}

.public-team-budget small,
.public-team-max small {
  color: #9aa8b8;
  font-size: 8px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.public-team-budget b {
  color: var(--navy);
  font-family: "Arial Narrow", sans-serif;
  font-size: 18px;
  letter-spacing: -.03em;
}

.public-team-max b {
  color: #7139a6;
  font-family: "Arial Narrow", sans-serif;
  font-size: 19px;
  letter-spacing: -.03em;
}

.public-room .public-recent {
  overflow: hidden;
}

.public-room .public-recent-row {
  min-height: 0;
  padding: 8px 14px;
}

.public-room .public-recent-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-room .public-recent-row b {
  font-size: 13px;
}

.public-empty-history {
  margin: auto 16px;
  color: #8c99aa;
  font-size: 11px;
  text-align: center;
}

.public-room .public-footer {
  margin: 0 auto;
  font-size: 9px;
}

@media (max-width: 1000px) {
  .public-room {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .public-room .public-content {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .public-room .public-team-list {
    display: block;
    overflow: visible;
  }

  .public-room .public-team-row {
    min-height: 48px;
  }
}

@media (max-width: 760px) {
  .public-room {
    display: block;
    padding: 15px 12px 20px;
  }

  .public-room .public-topbar {
    margin-bottom: 10px;
  }

  .public-room .public-callout {
    min-height: 92px;
    padding: 14px;
    margin-bottom: 10px;
  }

  .public-room .public-callout.is-waiting {
    min-height: 65px;
  }

  .public-waiting {
    gap: 9px;
  }

  .public-waiting span {
    font-size: 10px;
  }

  .public-waiting strong {
    font-size: 25px;
  }

  .public-room .public-current-player {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .public-room .public-current-player h1 {
    font-size: 42px;
  }

  .public-room .public-player-meta {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px 12px;
    font-size: 11px;
  }

  .public-table-labels {
    display: none;
  }

  .public-room .public-team-row {
    grid-template-columns: 23px minmax(95px, 1fr) minmax(135px, 1.4fr) 53px 63px;
    gap: 5px;
    padding: 6px 10px;
  }

  .public-missing-slots {
    gap: 2px;
  }

  .public-missing-slot {
    min-width: 22px;
    height: 22px;
    padding: 0 2px;
    font-size: 9px;
  }

  .public-missing-slot strong {
    font-size: 10px;
  }

  .public-team-budget b,
  .public-team-max b {
    font-size: 15px;
  }

  .public-team-budget small,
  .public-team-max small {
    font-size: 7px;
  }

  .public-room .public-footer {
    margin-top: 12px;
  }
}

/* Auction agenda: an editable checklist shared by the operational league. */
.agenda-panel {
  margin-bottom: 18px;
  overflow: hidden;
}

.agenda-panel .panel-heading {
  padding-bottom: 8px;
}

.agenda-panel .panel-heading h3 {
  margin-top: 3px;
}

.agenda-progress {
  color: var(--purple);
  font-size: 11px;
  font-weight: 900;
}

.agenda-intro {
  margin: 0;
  padding: 0 22px 13px;
  color: #8090a3;
  font-size: 12px;
}

.agenda-gate {
  margin: 0;
}

.agenda-gate .agenda-intro {
  color: var(--navy);
  font-weight: 700;
}

.agenda-list {
  display: grid;
  gap: 6px;
  padding: 0 22px 12px;
}

.agenda-item {
  display: grid;
  grid-template-columns: 17px 24px 25px minmax(0, 1fr) 28px;
  gap: 8px;
  align-items: center;
  min-height: 38px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.agenda-item.is-complete {
  border-color: #cbe8d7;
  background: #f3fbf6;
}

.agenda-item.is-dragging {
  opacity: .45;
}

.agenda-handle {
  color: #a2afbf;
  cursor: grab;
  font-size: 15px;
  letter-spacing: -4px;
}

.agenda-position {
  color: #8b9aaf;
  font-size: 10px;
  font-weight: 900;
  text-align: center;
}

.agenda-check {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  cursor: pointer;
}

.agenda-check input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.agenda-check span {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border: 1px solid #bfcbda;
  border-radius: 5px;
  background: #fff;
}

.agenda-check input:checked + span {
  border-color: #2e9a64;
  background: #2e9a64;
}

.agenda-check input:checked + span::after {
  content: "✓";
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.agenda-title {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--navy);
  font-size: 12px;
}

.agenda-item.is-complete .agenda-title {
  color: #54806a;
  text-decoration: line-through;
}

.agenda-delete {
  width: 25px;
  height: 25px;
  border-radius: 6px;
  color: #9aa8b8;
  font-size: 18px;
  line-height: 1;
}

.agenda-delete:hover {
  background: #fff0ef;
  color: #a73731;
}

.agenda-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 0 22px 17px;
}

.agenda-actions .secondary-button,
.agenda-actions .primary-button {
  padding-top: 8px;
  padding-bottom: 8px;
  font-size: 11px;
}

.auction-start + .agenda-panel {
  margin-top: 0;
}

/* Compact FantaCeccotti-only ownership history shown on the called player. */
.league-history-inline,
.public-history-inline {
  display: flex;
  align-items: baseline;
  gap: 16px;
  min-width: 0;
}

.league-history-inline {
  margin: -10px 22px 12px;
  padding: 8px 2px 0;
  border-top: 1px solid #edf0f5;
  color: #7e8da0;
  font-size: 11px;
}

.league-history-inline span,
.public-history-inline span {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
}

.league-history-inline small,
.public-history-inline small {
  flex: 0 0 auto;
  color: #93a1b2;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.league-history-inline strong {
  min-width: 0;
  overflow: hidden;
  color: var(--navy);
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-history-inline {
  margin-top: 13px;
  color: #b6c5d7;
  font-size: 12px;
}

.public-history-inline small {
  color: #9db0c9;
}

.public-history-inline strong {
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 760px) {
  .agenda-intro,
  .agenda-list,
  .agenda-actions {
    padding-left: 14px;
    padding-right: 14px;
  }

  .agenda-item {
    grid-template-columns: 15px 20px 25px minmax(0, 1fr) 25px;
    gap: 5px;
  }

  .agenda-actions {
    flex-direction: column-reverse;
  }

  .agenda-actions button {
    width: 100%;
    justify-content: center;
  }

  .league-history-inline,
  .public-history-inline {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .league-history-inline {
    margin-left: 14px;
    margin-right: 14px;
  }
}

/* Rifiniture della scheda leghe e dei loghi squadra. */
.league-card-logo {
  width: 60px;
  height: 64px;
}

.league-detail-title .league-detail-logo {
  width: 66px;
  height: 76px;
}

.auction-league-logo {
  width: 48px;
  height: 58px;
}

.public-league-logo {
  width: 52px;
  height: 62px;
}

@media (max-width: 760px) {
  .league-card-logo {
    width: 48px;
    height: 54px;
  }

  .league-detail-title .league-detail-logo {
    width: 50px;
    height: 60px;
  }

  .auction-league-logo {
    width: 40px;
    height: 48px;
  }

  .public-league-logo {
    width: 42px;
    height: 50px;
  }
}

.historical-summary-panel {
  max-width: 1120px;
}

.history-wins-panel {
  max-width: 1076px;
}

.president-trophy-group > div:last-child span {
  justify-content: flex-start;
}

.president-trophy-group > div:last-child span b {
  font-size: 11px;
}

.league-roster-card-head .team-crest,
.league-roster-card-head .team-crest-placeholder {
  width: 31px;
  height: 31px;
  border-radius: 6px;
}

.auction-team-head .team-crest,
.auction-team-head .team-crest-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.public-room .public-team-name .team-crest,
.public-room .public-team-name .team-crest-placeholder {
  width: 31px;
  height: 31px;
  border-radius: 6px;
}
