html.league-page-active,
body.league-page-active {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
  background: #0e1217;
}

html.league-page-active body > :not(#createDialog):not(script) {
  display: none !important;
}

html.league-page-active #createDialog {
  position: fixed;
  inset: 0;
  display: block;
  width: 100vw;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  border: 0;
  border-radius: 0;
  background: #0e1217;
  box-shadow: none;
}

html.league-page-active #createDialog::backdrop {
  display: none;
  background: transparent;
  backdrop-filter: none;
}

html.league-page-active #createForm,
html.league-page-active .review-screen,
html.league-page-active .payment-screen,
html.league-page-active .invite-screen,
html.league-page-active .league-home,
html.league-page-active .lineup-screen,
html.league-page-active .standings-screen,
html.league-page-active .commish-screen {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
}

html.league-page-active #createForm,
html.league-page-active .review-screen,
html.league-page-active .payment-screen,
html.league-page-active .invite-screen {
  max-width: 1500px;
  margin-inline: auto;
}

html.league-page-active .league-nav {
  padding-inline:
    max(24px, calc((100vw - 1500px) / 2 + 24px));
}

html.league-page-active .league-dashboard,
html.league-page-active .lineup-page {
  width: min(100%, 1500px);
  margin-inline: auto;
}

html.league-page-active .lineup-layout.player-picker-open .player-browser table {
  min-width: 0;
}

html.league-page-active .lineup-layout.player-picker-open .player-browser th:nth-child(3),
html.league-page-active .lineup-layout.player-picker-open .player-browser td:nth-child(3),
html.league-page-active .lineup-layout.player-picker-open .player-browser th:nth-child(6),
html.league-page-active .lineup-layout.player-picker-open .player-browser td:nth-child(6),
html.league-page-active .lineup-layout.player-picker-open .player-browser th:nth-child(7),
html.league-page-active .lineup-layout.player-picker-open .player-browser td:nth-child(7) {
  display: none;
}

html.league-page-active .lineup-layout.player-picker-open .player-browser th,
html.league-page-active .lineup-layout.player-picker-open .player-browser td {
  padding-inline: 10px;
}

html.league-page-active .league-nav > .close {
  display: none;
}

.mobile-nav-toggle {
  display: none;
}

@media (max-width: 850px) {
  html.league-page-active .league-nav {
    position: relative;
    flex-wrap: wrap;
    gap: 12px;
    padding-inline: 20px;
  }

  html.league-page-active .mobile-nav-toggle {
    display: grid;
    flex: 0 0 44px;
    place-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #496171;
    border-radius: 7px;
    background: #111a20;
    cursor: pointer;
  }

  html.league-page-active .mobile-nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: #f4f3eb;
  }

  html.league-page-active .league-brand {
    flex: 1 1 120px;
    min-width: 0;
  }

  html.league-page-active .my-leagues-picker {
    flex: 0 1 170px;
  }

  html.league-page-active .my-leagues-toggle {
    min-width: 0;
    width: 100%;
  }

  html.league-page-active .league-nav nav {
    position: absolute;
    z-index: 80;
    top: calc(100% + 8px);
    left: 14px;
    display: none;
    width: min(280px, calc(100vw - 28px));
    overflow: hidden;
    flex-direction: column;
    gap: 0;
    padding: 8px;
    border: 1px solid #496171;
    border-radius: 10px;
    background: #111a20;
    box-shadow: 0 18px 50px rgba(0,0,0,.55);
  }

  html.league-page-active .league-nav.mobile-nav-open nav {
    display: flex;
  }

  html.league-page-active .league-nav nav button {
    flex: none;
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 0;
    border-left: 3px solid transparent;
    border-radius: 6px;
    text-align: left;
  }

  html.league-page-active .league-nav nav button.active {
    border-left-color: #d2aa47;
    background: #243744;
    color: #fff;
  }
}

@media (max-width: 430px) {
  html.league-page-active .league-nav {
    padding-inline: 14px;
  }

  html.league-page-active .league-brand > div small {
    display: none;
  }

  html.league-page-active .my-leagues-picker {
    flex-basis: 145px;
  }
}
