/* v0.9.75 · centered/taller home layout, wider leaderboard and stable viewport */

/* Prevent the elastic upward overscroll that revealed the page edge on the home screen. */
html,
body.home-screen {
  overscroll-behavior-y: none !important;
}
body.home-screen {
  min-height: 100dvh !important;
}

@media (min-width: 821px) {
  /* Keep both home surfaces centered as one group while giving the leaderboard more width. */
  body.home-screen #homeApp.home-app:not(.hidden) {
    display: grid !important;
    width: min(1020px, calc(100vw - 42px)) !important;
    grid-template-columns: minmax(0, 540px) minmax(340px, 400px) !important;
    gap: 24px !important;
    justify-content: center !important;
    align-items: stretch !important;
    margin: 20px auto 0 !important;
  }

  /* Both panels are long enough to show the complete six-button game menu. */
  body.home-screen #homeApp > .home-panel,
  body.home-screen #homeApp > .leaderboard-panel {
    width: 100% !important;
    height: auto !important;
    min-height: 780px !important;
    max-height: none !important;
    align-self: stretch !important;
    box-sizing: border-box !important;
  }

  body.home-screen #homeApp > .home-panel {
    display: flex !important;
    flex-direction: column !important;
  }

  body.home-screen #homeApp .v072-game-menu {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  body.home-screen #homeApp > .leaderboard-panel {
    display: flex !important;
    flex-direction: column !important;
  }

  body.home-screen #homeApp > .leaderboard-panel .leaderboard-list {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  /* The taller home group naturally keeps the footer lower on the page. */
  body.home-screen .site-footer {
    margin-top: 30px !important;
    margin-bottom: 24px !important;
  }
}

/* Never expose the Developer Center launcher to normal player accounts. */
#v072Developer.hidden,
#developerCenterButton.hidden {
  display: none !important;
}

@media (max-width: 820px) {
  body.home-screen #homeApp.home-app:not(.hidden) {
    width: min(680px, calc(100vw - 22px)) !important;
    margin-top: 18px !important;
  }

  body.home-screen #homeApp > .home-panel,
  body.home-screen #homeApp > .leaderboard-panel {
    min-height: 0 !important;
    height: auto !important;
  }

  body.home-screen .site-footer {
    margin-top: 28px !important;
  }
}
