:root {
  --site-ink: #101713;
  --site-black: #08110c;
  --site-muted: #5a645d;
  --site-line: #d7ded9;
  --site-surface: #f6f8f6;
  --site-surface-strong: #edf2ee;
  --site-white: #fff;
  --site-green: #16783a;
  --site-green-deep: #0f6230;
  --site-green-soft: #e5f3e9;
  --site-danger: #a52a2a;
  --site-width: 1280px;
  --site-radius: 14px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--site-white);
  color: var(--site-ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100svh;
}

body.sitePage {
  display: flex;
  flex-direction: column;
}

body.sitePage > main {
  flex: 1 0 auto;
}

body.isNavOpen {
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

img {
  max-width: 100%;
}

:focus-visible {
  outline: 3px solid #65b980;
  outline-offset: 3px;
}

.skipLink {
  background: var(--site-green);
  border-radius: 8px;
  color: var(--site-white);
  font-size: 16px;
  font-weight: 700;
  left: 16px;
  min-height: 44px;
  padding: 11px 16px;
  position: fixed;
  top: 10px;
  transform: translateY(-160%);
  transition: transform 120ms ease;
  z-index: 100;
}

.skipLink:focus {
  transform: translateY(0);
}

.siteHeader {
  align-items: center;
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--site-line);
  display: flex;
  gap: 20px;
  justify-content: space-between;
  min-height: 70px;
  padding: 8px max(24px, calc((100vw - var(--site-width)) / 2));
  position: sticky;
  top: 0;
  z-index: 40;
}

.brand {
  align-items: center;
  color: var(--site-ink);
  display: inline-flex;
  flex: 0 1 auto;
  font-size: 20px;
  font-weight: 750;
  gap: 0;
  letter-spacing: -0.02em;
  min-height: 48px;
  white-space: nowrap;
}

.brand b {
  color: var(--site-green);
}

.brandMark {
  background: #fff url("/assets/gd.png") center / contain no-repeat;
  display: inline-block;
  flex: 0 0 112px;
  height: 80px;
  width: 112px;
}

.brand > .brandMark + span {
  display: none;
}

.headerTools {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 14px;
  justify-content: flex-end;
}

.nav {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  font-size: 15px;
  font-weight: 600;
  gap: clamp(6px, 1vw, 16px);
}

.nav a {
  align-items: center;
  color: #263029;
  display: inline-flex;
  min-height: 44px;
  padding: 4px;
  position: relative;
  white-space: nowrap;
}

.nav a:hover {
  color: var(--site-green);
}

.nav a[aria-current="page"]::after {
  background: var(--site-green);
  bottom: 2px;
  content: "";
  height: 2px;
  left: 4px;
  position: absolute;
  right: 4px;
}

.nav a.authAvatar {
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--site-ink);
  gap: 8px;
  height: 44px;
  min-height: 44px;
  padding: 2px;
  width: auto;
}

.accountAvatar {
  align-items: center;
  background: var(--site-green);
  border-radius: 50%;
  color: var(--site-white);
  display: inline-flex;
  flex: 0 0 38px;
  font-size: 14px;
  font-weight: 800;
  height: 38px;
  justify-content: center;
  object-fit: cover;
  overflow: hidden;
  width: 38px;
}

img.accountAvatar {
  display: block;
}

.accountLabel {
  display: none;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.languageSwitcher {
  align-items: center;
  border-left: 1px solid var(--site-line);
  display: inline-flex;
  gap: 4px;
  padding-left: 12px;
}

.languageSwitcher button,
.languageSwitcher a {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--site-muted);
  display: inline-flex;
  font-size: 12px;
  font-weight: 750;
  height: 40px;
  justify-content: center;
  padding: 0;
  width: 40px;
}

.languageSwitcher button:hover,
.languageSwitcher a:hover {
  background: var(--site-surface-strong);
  color: var(--site-ink);
}

.languageSwitcher button.isActive,
.languageSwitcher a.isActive {
  background: var(--site-black);
  color: var(--site-white);
}

.headerPlayButton,
.primaryButton,
.secondaryButton {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 9px;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  min-height: 46px;
  padding: 10px 18px;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, transform 120ms ease;
}

.headerPlayButton,
.primaryButton {
  background: var(--site-green);
  border-color: var(--site-green);
  color: var(--site-white);
}

.headerPlayButton {
  flex: 0 0 auto;
  font-size: 15px;
  min-height: 42px;
  padding: 8px 15px;
}

.secondaryButton {
  background: var(--site-white);
  border-color: #9da8a0;
  color: var(--site-ink);
}

.headerPlayButton:hover,
.primaryButton:hover {
  background: var(--site-green-deep);
  border-color: var(--site-green-deep);
  transform: translateY(-1px);
}

.secondaryButton:hover {
  background: var(--site-surface);
  border-color: var(--site-ink);
}

.actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.textLink,
.playerLink {
  color: var(--site-green);
  font-weight: 700;
}

.textLink:hover,
.playerLink:hover {
  color: var(--site-green-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.eyebrow {
  color: var(--site-green);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.mobileNavToggle {
  align-items: center;
  background: var(--site-white);
  border: 1px solid var(--site-line);
  border-radius: 10px;
  display: none;
  flex: 0 0 44px;
  height: 44px;
  justify-content: center;
  padding: 0;
  position: relative;
  width: 44px;
}

.mobileNavToggle span {
  background: var(--site-ink);
  height: 2px;
  left: 11px;
  position: absolute;
  transition: opacity 140ms ease, top 140ms ease, transform 140ms ease;
  width: 20px;
}

.mobileNavToggle span:nth-child(1) {
  top: 15px;
}

.mobileNavToggle span:nth-child(2) {
  top: 21px;
}

.mobileNavToggle span:nth-child(3) {
  top: 27px;
}

.isNavOpen .mobileNavToggle span:nth-child(1) {
  top: 21px;
  transform: rotate(45deg);
}

.isNavOpen .mobileNavToggle span:nth-child(2) {
  opacity: 0;
}

.isNavOpen .mobileNavToggle span:nth-child(3) {
  top: 21px;
  transform: rotate(-45deg);
}

.leaderboardPage,
.customPage,
.helpPage,
.aboutPage,
.profilePage {
  margin: 0 auto;
  max-width: var(--site-width);
  padding: 56px 24px 84px;
  width: 100%;
}

.leaderboardIntro,
.customIntro,
.helpIntro,
.profileHeader {
  align-items: center;
  background: var(--site-black);
  border-radius: var(--site-radius);
  color: var(--site-white);
  display: flex;
  gap: 32px;
  justify-content: space-between;
  min-height: 210px;
  overflow: hidden;
  padding: clamp(32px, 5vw, 64px);
  position: relative;
}

.leaderboardIntro::after,
.customIntro::after,
.helpIntro::after,
.profileHeader::after {
  border: 3px solid rgba(85, 189, 120, 0.45);
  border-left: 0;
  border-radius: 50%;
  bottom: -130px;
  content: "";
  height: 250px;
  pointer-events: none;
  position: absolute;
  right: -25px;
  transform: rotate(-12deg);
  width: 500px;
}

.leaderboardIntro > *,
.customIntro > *,
.helpIntro > *,
.profileHeader > * {
  position: relative;
  z-index: 1;
}

.leaderboardIntro h1,
.customIntro h1,
.helpIntro h1,
.profileHeader h1,
.aboutHero h1 {
  font-size: clamp(48px, 6vw, 78px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
  margin: 6px 0 12px;
}

.leaderboardIntro p,
.customIntro p,
.helpIntro p,
.profileHeader p {
  color: rgba(255, 255, 255, 0.67);
  font-size: clamp(18px, 1.7vw, 22px);
  line-height: 1.45;
  margin: 0;
  max-width: 780px;
}

.leaderboardPanel,
.profileRecordsPanel {
  background: var(--site-white);
  border: 1px solid var(--site-line);
  border-radius: var(--site-radius);
  margin-top: 26px;
  overflow: hidden;
}

.leaderboardToolbar {
  align-items: flex-start;
  background: var(--site-surface);
  border-bottom: 1px solid var(--site-line);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 24px;
}

.leaderboardToolbar h2 {
  font-size: clamp(28px, 3vw, 42px);
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin: 7px 0 0;
}

.leaderboardControls {
  align-items: flex-end;
  display: grid;
  gap: 10px;
  justify-items: end;
  max-width: 760px;
}

.leagueTabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.leagueTabs button {
  background: var(--site-white);
  border: 1px solid #aeb8b1;
  border-radius: 8px;
  color: #263029;
  font-size: 14px;
  font-weight: 700;
  min-height: 42px;
  padding: 8px 13px;
}

.leagueTabs button:hover {
  border-color: var(--site-green);
}

.leagueTabs button.isActive {
  background: var(--site-green);
  border-color: var(--site-green);
  color: var(--site-white);
}

.standardSelectors {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.standardSelectors label {
  color: var(--site-muted);
  display: grid;
  font-size: 12px;
  font-weight: 650;
  gap: 5px;
  min-width: 145px;
}

.standardSelectors select,
.customUpload input,
.authForm input {
  background: var(--site-white);
  border: 1px solid #aeb8b1;
  border-radius: 8px;
  color: var(--site-ink);
  min-height: 46px;
  padding: 9px 12px;
  width: 100%;
}

.standardSelectors select:focus,
.customUpload input:focus,
.authForm input:focus {
  border-color: var(--site-green);
}

.leaderboardTableWrap {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.leaderboardTable {
  border-collapse: collapse;
  min-width: 640px;
  width: 100%;
}

.leaderboardTable th,
.leaderboardTable td {
  border-bottom: 1px solid var(--site-line);
  padding: 18px 20px;
  text-align: left;
}

.leaderboardTable th {
  color: var(--site-muted);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.leaderboardTable td {
  font-size: 17px;
}

.leaderboardTable tr:last-child td {
  border-bottom: 0;
}

.replayLink {
  align-items: center;
  border: 1px solid var(--site-green);
  border-radius: 7px;
  color: var(--site-green);
  display: inline-flex;
  font-size: 14px;
  font-weight: 750;
  min-height: 38px;
  padding: 7px 11px;
}

.replayLink:hover {
  background: var(--site-green);
  color: var(--site-white);
}

.customGrid {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(300px, 0.7fr) minmax(0, 1.3fr);
  margin-top: 26px;
}

.customGridReadonly {
  grid-template-columns: 1fr;
}

.customUpload,
.customPack,
.customList > p {
  background: var(--site-white);
  border: 1px solid var(--site-line);
  border-radius: var(--site-radius);
}

.customUpload {
  align-self: start;
  display: grid;
  gap: 15px;
  padding: 26px;
}

.customUpload h2,
.customPack h2 {
  font-size: 28px;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0;
}

.customUpload label {
  color: var(--site-muted);
  display: grid;
  font-size: 14px;
  font-weight: 700;
  gap: 7px;
}

.customUpload input[type="file"] {
  padding: 10px;
}

.customUpload .primaryButton {
  width: 100%;
}

.formStatus {
  color: var(--site-muted);
  min-height: 22px;
  margin: 0;
}

.customList {
  display: grid;
  gap: 12px;
}

.customList > p {
  color: var(--site-muted);
  font-size: 18px;
  margin: 0;
  min-height: 150px;
  padding: 28px;
}

.customPack {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  padding: 22px;
}

.customPack p {
  color: var(--site-muted);
  margin: 7px 0 0;
}

.customPackMeta {
  color: var(--site-muted);
  display: grid;
  font-size: 13px;
  gap: 5px;
  text-align: right;
}

.customStars {
  display: flex;
  gap: 1px;
}

.customStars button {
  background: transparent;
  border: 0;
  color: var(--site-green);
  font-size: 23px;
  height: 42px;
  padding: 0 2px;
  width: 30px;
}

.helpIntro {
  display: block;
}

.helpGrid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 26px;
}

.helpGrid article {
  background: var(--site-surface);
  border: 1px solid var(--site-line);
  border-radius: var(--site-radius);
  min-height: 230px;
  padding: 26px;
}

.helpGrid article:nth-child(3n + 2) {
  background: var(--site-green-soft);
}

.helpGrid h2 {
  font-size: 25px;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0 0 14px;
}

.helpGrid p {
  color: var(--site-muted);
  font-size: 17px;
  line-height: 1.55;
  margin: 0;
}

.aboutHero {
  background: var(--site-black);
  border-radius: var(--site-radius);
  color: var(--site-white);
  padding: clamp(36px, 6vw, 76px);
}

.aboutHero .eyebrow {
  color: #83c99a;
}

.aboutHero p {
  color: rgba(255, 255, 255, 0.68);
  font-size: clamp(18px, 1.8vw, 23px);
  line-height: 1.55;
  margin: 0;
  max-width: 1000px;
}

.aboutContent {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 24px;
}

.aboutContent article {
  background: var(--site-surface);
  border: 1px solid var(--site-line);
  border-radius: var(--site-radius);
  padding: clamp(28px, 4vw, 48px);
}

.aboutContent h2 {
  font-size: clamp(30px, 3.5vw, 46px);
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin: 0 0 18px;
}

.aboutContent p {
  color: var(--site-muted);
  font-size: 18px;
  line-height: 1.6;
  margin: 0;
}

.donatePanel {
  align-items: center;
  background: var(--site-green-soft);
  border: 1px solid var(--site-line);
  border-radius: var(--site-radius);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin: 0 auto 60px;
  max-width: calc(var(--site-width) - 48px);
  padding: 28px;
}

.donatePanel h2 {
  font-size: 30px;
  margin: 0;
}

.donatePanel p {
  color: var(--site-muted);
  line-height: 1.45;
  margin: 7px 0 0;
}

.profileHeader {
  align-items: center;
}

.profileIdentity {
  align-items: center;
  display: flex;
  gap: 24px;
}

.profileAvatarWrap {
  flex: 0 0 auto;
  position: relative;
}

.profileAvatarLarge {
  align-items: center;
  background: var(--site-green-soft);
  border: 2px solid #7eb991;
  border-radius: 50%;
  color: var(--site-green-deep);
  display: flex;
  font-size: 34px;
  font-weight: 800;
  height: 108px;
  justify-content: center;
  overflow: hidden;
  width: 108px;
}

.profileAvatarLarge img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.profileAvatarPlus {
  align-items: center;
  background: var(--site-green);
  border: 3px solid var(--site-black);
  border-radius: 50%;
  bottom: 0;
  color: var(--site-white);
  display: flex;
  font-size: 22px;
  height: 38px;
  justify-content: center;
  padding: 0;
  position: absolute;
  right: 0;
  width: 38px;
}

.profileAvatarControls {
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  margin-top: 8px;
}

.profileActions {
  align-items: stretch;
  display: grid;
  gap: 8px;
  min-width: 150px;
}

.profileStats {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 24px;
}

.profileStats article {
  background: var(--site-surface);
  border: 1px solid var(--site-line);
  border-radius: 10px;
  display: grid;
  gap: 14px;
  min-height: 118px;
  padding: 20px;
}

.profileStats span {
  color: var(--site-muted);
  font-size: 14px;
  line-height: 1.3;
}

.profileStats strong {
  align-self: end;
  color: var(--site-green);
  font-size: 30px;
  letter-spacing: -0.03em;
}

.profilePager {
  align-items: center;
  border-top: 1px solid var(--site-line);
  display: flex;
  justify-content: space-between;
  padding: 16px 20px;
}

.profilePager span {
  color: var(--site-muted);
  font-size: 14px;
}

.profilePager div {
  display: flex;
  gap: 8px;
}

.profilePager button {
  background: var(--site-white);
  border: 1px solid #aeb8b1;
  border-radius: 7px;
  min-height: 40px;
  padding: 7px 13px;
}

.profilePager button:disabled {
  cursor: default;
  opacity: 0.45;
}

.profilePage.isNotFound .profileStats,
.profilePage.isNotFound .profileRecordsPanel {
  display: none;
}

.authPage {
  align-items: center;
  background:
    radial-gradient(circle at 70% 22%, rgba(85, 189, 120, 0.11), transparent 24%),
    var(--site-black);
  display: flex;
  flex: 1 0 auto;
  justify-content: center;
  min-height: 650px;
  padding: 56px 24px;
}

.authPanel {
  background: var(--site-white);
  border: 1px solid var(--site-line);
  border-radius: 18px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
  max-width: 520px;
  padding: clamp(28px, 5vw, 48px);
  width: 100%;
}

.authPanel h1 {
  font-size: clamp(42px, 6vw, 62px);
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 0;
}

.authIntro,
.authSwitch {
  color: var(--site-muted);
  font-size: 17px;
  line-height: 1.5;
}

.authIntro {
  margin: 16px 0 26px;
}

.authForm {
  display: grid;
  gap: 16px;
}

.authForm label {
  color: var(--site-muted);
  display: grid;
  font-size: 14px;
  font-weight: 700;
  gap: 7px;
}

.authError {
  color: var(--site-danger);
  line-height: 1.4;
  min-height: 21px;
  margin: -3px 0 0;
}

.authActions {
  display: grid;
  gap: 9px;
  grid-template-columns: 1fr 1fr;
}

.authSubmit {
  width: 100%;
}

.authSwitch {
  border-top: 1px solid var(--site-line);
  margin: 25px 0 0;
  padding-top: 20px;
}

.authSwitch a {
  color: var(--site-green);
  font-weight: 750;
}

.footer {
  align-items: center;
  background: var(--site-black);
  color: var(--site-white);
  display: grid;
  gap: 10px 28px;
  grid-template-columns: minmax(250px, 1fr) auto auto;
  margin-top: auto;
  padding: 18px max(24px, calc((100vw - var(--site-width)) / 2));
}

.footerDescription {
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
  max-width: 360px;
}

.footer nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  gap: 0 18px;
  justify-content: flex-end;
}

.footer nav a {
  color: rgba(255, 255, 255, 0.72);
  min-height: 36px;
  padding: 8px 0;
}

.footer nav a:hover {
  color: var(--site-white);
}

.footerMeta {
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
  grid-column: auto;
  margin: 0;
  white-space: nowrap;
}

@media (max-width: 1120px) {
  .siteHeader {
    gap: 12px;
  }

  .brand {
    font-size: 18px;
  }

  .brandMark {
    flex-basis: 100px;
    height: 71px;
    width: 100px;
  }

  .nav {
    font-size: 14px;
    gap: 5px;
  }

  .headerTools {
    gap: 8px;
  }

  .headerPlayButton {
    display: none;
  }

  .profileStats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .profileStats article:nth-child(n + 4) {
    grid-column: span 1;
  }
}

@media (max-width: 900px) {
  .siteHeader.hasMobileNav {
    min-height: 66px;
    padding: 8px 16px;
  }

  .siteHeader.hasMobileNav .brand {
    margin-right: auto;
    min-width: 0;
  }

  .mobileNavToggle {
    display: inline-flex;
  }

  .siteHeader.hasMobileNav .headerTools {
    align-items: stretch;
    background: var(--site-white);
    border-bottom: 1px solid var(--site-line);
    box-shadow: 0 18px 34px rgba(8, 17, 12, 0.17);
    display: none;
    flex-direction: column;
    gap: 14px;
    justify-content: flex-start;
    left: 0;
    max-height: calc(100svh - 66px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 16px 18px calc(20px + env(safe-area-inset-bottom));
    position: absolute;
    right: 0;
    top: 100%;
  }

  .siteHeader.hasMobileNav.isNavOpen .headerTools {
    display: flex;
  }

  .siteHeader.hasMobileNav .nav {
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    width: 100%;
  }

  .siteHeader.hasMobileNav .nav a {
    border-bottom: 1px solid var(--site-line);
    font-size: 18px;
    min-height: 50px;
    padding: 11px 2px;
  }

  .siteHeader.hasMobileNav .nav a[aria-current="page"]::after {
    bottom: 0;
    left: 2px;
    right: auto;
    width: 34px;
  }

  .siteHeader.hasMobileNav .nav a.authAvatar {
    align-self: stretch;
    border-bottom: 1px solid var(--site-line);
    border-radius: 0;
    display: flex;
    height: 54px;
    justify-content: flex-start;
    min-height: 54px;
    padding: 7px 2px;
    width: 100%;
  }

  .siteHeader.hasMobileNav .accountAvatar {
    flex-basis: 40px;
    height: 40px;
    width: 40px;
  }

  .siteHeader.hasMobileNav .accountLabel {
    display: inline;
  }

  .siteHeader.hasMobileNav .languageSwitcher {
    border: 0;
    gap: 8px;
    padding: 0;
  }

  .siteHeader.hasMobileNav .languageSwitcher button,
  .siteHeader.hasMobileNav .languageSwitcher a {
    border: 1px solid var(--site-line);
    height: 44px;
    width: 44px;
  }

  .siteHeader.hasMobileNav .headerPlayButton {
    display: inline-flex;
    min-height: 48px;
    width: 100%;
  }

  .leaderboardPage,
  .customPage,
  .helpPage,
  .aboutPage,
  .profilePage {
    padding: 34px 18px 60px;
  }

  .leaderboardToolbar {
    display: grid;
  }

  .leaderboardControls {
    justify-items: stretch;
    max-width: none;
  }

  .leagueTabs,
  .standardSelectors {
    justify-content: flex-start;
  }

  .customGrid,
  .aboutContent {
    grid-template-columns: 1fr;
  }

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

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

  .profileStats article:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .siteHeader.hasMobileNav {
    padding-inline: 12px;
  }

  .brand {
    font-size: 16px;
    gap: 0;
  }

  .brandMark {
    flex-basis: 90px;
    height: 64px;
    width: 90px;
  }

  .leaderboardPage,
  .customPage,
  .helpPage,
  .aboutPage,
  .profilePage {
    padding: 22px 12px 46px;
  }

  .leaderboardIntro,
  .customIntro,
  .helpIntro,
  .profileHeader,
  .aboutHero {
    align-items: flex-start;
    border-radius: 12px;
    flex-direction: column;
    min-height: 0;
    padding: 28px 22px;
  }

  .leaderboardIntro h1,
  .customIntro h1,
  .helpIntro h1,
  .profileHeader h1,
  .aboutHero h1 {
    font-size: clamp(40px, 13vw, 54px);
    line-height: 1.02;
  }

  .leaderboardIntro p,
  .customIntro p,
  .helpIntro p,
  .profileHeader p,
  .aboutHero p {
    font-size: 17px;
  }

  .leaderboardIntro .primaryButton,
  .customIntro .primaryButton {
    width: 100%;
  }

  .leaderboardToolbar {
    padding: 18px;
  }

  .leaderboardToolbar h2 {
    font-size: 30px;
  }

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

  .leagueTabs button {
    width: 100%;
  }

  .leagueTabs button:nth-child(3):last-child {
    grid-column: 1 / -1;
  }

  .standardSelectors {
    display: grid;
    grid-template-columns: 1fr;
  }

  .standardSelectors label {
    min-width: 0;
  }

  .leaderboardTable {
    min-width: 560px;
  }

  .leaderboardTable th,
  .leaderboardTable td {
    padding: 15px 14px;
  }

  .helpGrid {
    grid-template-columns: 1fr;
  }

  .helpGrid article {
    min-height: 0;
    padding: 22px;
  }

  .customPack {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .customPackMeta {
    display: flex;
    gap: 16px;
    text-align: left;
  }

  .profileIdentity {
    align-items: flex-start;
    flex-direction: column;
  }

  .profileActions {
    width: 100%;
  }

  .profileStats {
    gap: 8px;
  }

  .profileStats article {
    min-height: 106px;
    padding: 16px;
  }

  .profileStats strong {
    font-size: 25px;
  }

  .profilePager {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .profilePager div {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .authPage {
    align-items: flex-start;
    min-height: 0;
    padding: 30px 14px 46px;
  }

  .authPanel {
    border-radius: 14px;
    padding: 26px 20px;
  }

  .authActions {
    grid-template-columns: 1fr;
  }

  .donatePanel {
    align-items: stretch;
    flex-direction: column;
    margin: 0 12px 40px;
  }

  .footer {
    gap: 8px 20px;
    grid-template-columns: minmax(200px, 1fr) auto;
    padding: 16px 18px calc(16px + env(safe-area-inset-bottom));
  }

  .footer nav {
    display: flex;
    gap: 0 16px;
    justify-content: flex-end;
  }

  .footer nav a {
    border-bottom: 0;
  }

  .footerMeta {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .footer {
    gap: 10px;
    grid-template-columns: 1fr;
    padding: 20px 18px calc(20px + env(safe-area-inset-bottom));
  }

  .footerDescription {
    max-width: none;
  }

  .footer nav {
    justify-content: flex-start;
    width: 100%;
  }

  .footer nav a {
    min-height: 36px;
    padding: 8px 0;
  }

  .footerMeta {
    grid-column: auto;
  }
}

.seoInfo {
  margin: 54px auto 0;
  max-width: var(--site-width);
}

.seoInfoHeading {
  max-width: 720px;
}

.seoInfoHeading h2 {
  font-size: clamp(32px, 4vw, 52px);
  letter-spacing: -0.04em;
  line-height: 1.04;
  margin: 8px 0 0;
}

.seoInfoGrid {
  border: 1px solid var(--site-line);
  border-radius: var(--site-radius);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 24px;
  overflow: hidden;
}

.seoInfoGrid article {
  background: var(--site-white);
  min-height: 210px;
  padding: 30px;
}

.seoInfoGrid article + article {
  border-left: 1px solid var(--site-line);
}

.seoInfoGrid article::before {
  background: var(--site-green);
  border-radius: 99px;
  content: "";
  display: block;
  height: 5px;
  margin-bottom: 24px;
  width: 44px;
}

.seoInfoGrid h3 {
  font-size: 22px;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0;
}

.seoInfoGrid p {
  color: var(--site-muted);
  font-size: 16px;
  line-height: 1.6;
  margin: 14px 0 0;
}

@media (max-width: 760px) {
  .seoInfo {
    margin-top: 38px;
  }

  .seoInfoGrid {
    grid-template-columns: 1fr;
  }

  .seoInfoGrid article {
    min-height: 0;
    padding: 24px;
  }

  .seoInfoGrid article + article {
    border-left: 0;
    border-top: 1px solid var(--site-line);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
