.standings-page {
  min-height: 100%;
  padding-bottom: 82px;
}

.standings-back {
  text-decoration: none;
  display: grid;
  place-items: center;
  font-size: 2rem;
  line-height: 1;
}

.standings-main {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 12px 12px 18px;
}

.standings-hero {
  display: grid;
  grid-template-columns: minmax(125px, .72fr) minmax(0, 1.28fr);
  gap: 14px;
  align-items: end;
  padding: 5px 2px 11px;
}

.standings-hero h1 {
  margin: 1px 0 0;
  font-size: clamp(2rem, 7vw, 2.65rem);
  line-height: .98;
  letter-spacing: -.045em;
}

.standings-hero > p {
  margin: 0 0 2px;
  color: var(--muted, #64748b);
  font-size: .86rem;
  line-height: 1.3;
  font-weight: 650;
}

.standings-controls {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: 9px;
  margin-bottom: 11px;
}

.standings-field {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.standings-field-label {
  padding-left: 2px;
  color: var(--muted, #64748b);
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.standings-picker-trigger {
  width: 100%;
  min-width: 0;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid rgba(148, 163, 184, .35);
  border-radius: 15px;
  background: #fff;
  color: #0f172a;
  padding: 0 12px;
  font-size: 1rem;
  font-weight: 800;
  text-align: left;
}

.standings-picker-trigger > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.standings-picker-trigger:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
}

.standings-picker-trigger:disabled {
  opacity: .58;
}

.standings-chevron {
  flex: 0 0 auto;
  color: var(--muted, #64748b);
  font-size: 1.15rem;
  transform: translateY(-2px);
}

.standings-card {
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 20px;
  background: #fff;
  color: #0f172a;
  overflow: hidden;
}

.standings-heading {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, .18);
}

.standings-heading h2 {
  margin: 1px 0 0;
  font-size: 1.2rem;
  line-height: 1.05;
}

.standings-updated {
  flex: 0 0 auto;
  max-width: 95px;
  font-size: .7rem;
  line-height: 1.2;
  color: var(--muted, #64748b);
  font-weight: 750;
  text-align: right;
}

.standings-status {
  padding: 26px 14px;
  color: var(--muted, #64748b);
  font-weight: 750;
  text-align: center;
}

.standings-table-wrap {
  width: 100%;
  overflow: hidden;
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.standings-table th,
.standings-table td {
  padding: 9px 6px;
  border-bottom: 1px solid rgba(148, 163, 184, .16);
  text-align: left;
  vertical-align: middle;
}

.standings-table th {
  font-size: .66rem;
  line-height: 1;
  letter-spacing: .055em;
  text-transform: uppercase;
  color: var(--muted, #64748b);
  background: rgba(148, 163, 184, .06);
  white-space: nowrap;
}

.standings-table td {
  min-height: 43px;
  font-size: .94rem;
  line-height: 1.12;
  font-weight: 760;
}

.standings-table tbody tr:last-child td {
  border-bottom: 0;
}

.standings-table .rank-col {
  width: 34px;
  text-align: center;
}

.standings-table td.rank-col {
  color: var(--muted, #64748b);
  font-size: .82rem;
}

.standings-table .conf-col {
  width: 64px;
  text-align: center;
}

.standings-table .overall-col {
  width: 70px;
  text-align: center;
}

.standings-table .pct-col {
  width: 56px;
  text-align: center;
}

.standings-team {
  padding-right: 8px !important;
  font-weight: 900 !important;
  overflow-wrap: anywhere;
}

.standings-record,
.standings-pct {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.standings-source {
  padding: 8px 13px 10px;
  border-top: 1px solid rgba(148, 163, 184, .16);
  color: var(--muted, #64748b);
  font-size: .68rem;
  line-height: 1.3;
}

.standings-source a {
  color: inherit;
  font-weight: 900;
}

.standings-error {
  color: #b42318;
}

.standings-page .bottom-nav a {
  text-decoration: none;
}

.standings-picker-dialog {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  overflow: hidden;
}

.standings-picker-dialog::backdrop {
  background: rgba(2, 8, 23, .72);
  backdrop-filter: blur(3px);
}

.standings-picker-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: min(68dvh, 560px);
  display: flex;
  flex-direction: column;
  border-radius: 24px 24px 0 0;
  background: #fff;
  color: #0f172a;
  box-shadow: 0 -18px 50px rgba(0, 0, 0, .28);
  padding-bottom: env(safe-area-inset-bottom);
}

.standings-picker-sheet::before {
  content: "";
  width: 42px;
  height: 4px;
  margin: 8px auto 1px;
  border-radius: 999px;
  background: rgba(148, 163, 184, .55);
}

.standings-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px 9px;
  border-bottom: 1px solid rgba(148, 163, 184, .2);
}

.standings-picker-header h2 {
  margin: 0;
  font-size: 1.35rem;
}

.standings-picker-close {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 13px;
  background: rgba(148, 163, 184, .1);
  color: inherit;
  font-size: 1.55rem;
  line-height: 1;
}

.standings-picker-options {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px 10px 12px;
}

.standings-picker-option {
  width: 100%;
  min-height: 51px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid rgba(148, 163, 184, .15);
  background: transparent;
  color: inherit;
  padding: 8px 10px;
  font-size: 1rem;
  font-weight: 780;
  text-align: left;
}

.standings-picker-option:last-child {
  border-bottom: 0;
}

.standings-picker-option.selected {
  color: #2563eb;
  font-weight: 900;
}

.standings-picker-check {
  flex: 0 0 26px;
  text-align: center;
  font-size: 1.1rem;
}

@media (max-width: 560px) {
  .standings-table .pct-col {
    display: none;
  }

  .standings-table .rank-col {
    width: 30px;
  }

  .standings-table .conf-col {
    width: 58px;
  }

  .standings-table .overall-col {
    width: 64px;
  }

  .standings-table th,
  .standings-table td {
    padding-left: 5px;
    padding-right: 5px;
  }
}

@media (max-width: 390px) {
  .standings-main {
    padding-left: 10px;
    padding-right: 10px;
  }

  .standings-controls {
    grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
    gap: 7px;
  }

  .standings-picker-trigger {
    padding: 0 10px;
    font-size: .95rem;
  }

  .standings-hero {
    grid-template-columns: minmax(116px, .72fr) minmax(0, 1.28fr);
    gap: 10px;
  }

  .standings-hero > p {
    font-size: .78rem;
  }

  .standings-team {
    font-size: .9rem !important;
  }
}

@media (max-height: 780px) and (max-width: 560px) {
  .standings-main {
    padding-top: 8px;
  }

  .standings-hero {
    padding-top: 2px;
    padding-bottom: 8px;
  }

  .standings-controls {
    margin-bottom: 8px;
  }

  .standings-picker-trigger {
    min-height: 46px;
  }

  .standings-heading {
    min-height: 57px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .standings-table th,
  .standings-table td {
    padding-top: 7px;
    padding-bottom: 7px;
  }

  .standings-source {
    padding-top: 6px;
    padding-bottom: 7px;
  }
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .standings-picker-trigger,
  html:not([data-theme="light"]) .standings-card,
  html:not([data-theme="light"]) .standings-picker-sheet {
    background: #0b1d33;
    color: #eef6ff;
  }

  html:not([data-theme="light"]) .standings-table th {
    background: rgba(148, 163, 184, .09);
  }

  html:not([data-theme="light"]) .standings-picker-option.selected {
    color: #70b8ff;
  }
}

html[data-theme="dark"] .standings-picker-trigger,
html[data-theme="dark"] .standings-card,
html[data-theme="dark"] .standings-picker-sheet {
  background: #0b1d33;
  color: #eef6ff;
}

html[data-theme="dark"] .standings-table th {
  background: rgba(148, 163, 184, .09);
}

html[data-theme="dark"] .standings-picker-option.selected {
  color: #70b8ff;
}
