/*
 * HUMANITY layout guard v2
 * Globe Rush must remain in normal document flow. The footer is deliberately
 * separated from the lobby and live room so it cannot sit on top of game UI.
 */
html, body {
  min-height: 100%;
}

body.globe-rush-active {
  display: block;
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: clip;
}

body.globe-rush-active .site-shell {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch;
  min-height: 100vh !important;
  min-height: 100svh !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

body.globe-rush-active #main-content {
  display: block !important;
  position: relative !important;
  flex: 1 0 auto !important;
  min-width: 0;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

body.globe-rush-active #view-party:not([hidden]) {
  display: flow-root !important;
  position: relative !important;
  float: none !important;
  clear: both !important;
  box-sizing: border-box;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  contain: none !important;
  transform: none !important;
  animation: none !important;
  padding-top: 12px !important;
  padding-bottom: clamp(64px, 8svh, 110px) !important;
}

body.globe-rush-active #view-party .party-intro,
body.globe-rush-active #view-party .party-lobby,
body.globe-rush-active #view-party .party-room {
  position: relative !important;
  float: none !important;
  clear: both !important;
  height: auto;
  max-height: none;
}

body.globe-rush-active #view-party .party-lobby {
  display: grid !important;
  margin-bottom: clamp(36px, 6svh, 72px) !important;
  overflow: visible !important;
}

body.globe-rush-active #view-party .party-room:not([hidden]) {
  display: block;
  margin-top: 12px;
  margin-bottom: clamp(42px, 7svh, 84px) !important;
  overflow: visible !important;
}

body.globe-rush-active #view-party .party-centre-scene {
  min-height: clamp(320px, 48svh, 470px) !important;
}

body.globe-rush-active .site-footer {
  position: relative !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  float: none !important;
  clear: both !important;
  z-index: 2;
  flex: 0 0 auto !important;
  box-sizing: border-box;
  width: 100%;
  min-height: 74px;
  height: auto !important;
  max-height: none !important;
  margin-top: clamp(32px, 5svh, 64px) !important;
  padding: 16px 0 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: 20px;
  row-gap: 12px;
  overflow: visible !important;
}

body.globe-rush-active .site-footer > * {
  min-width: 0;
  max-width: 100%;
}

body.globe-rush-active .footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 9px 16px;
  min-width: 0;
}

@media (max-width: 900px) {
  body.globe-rush-active .site-footer {
    align-items: flex-start;
  }
  body.globe-rush-active .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 600px) {
  body.globe-rush-active #view-party:not([hidden]) {
    padding-bottom: 54px !important;
  }
  body.globe-rush-active #view-party .party-lobby {
    margin-bottom: 36px !important;
  }
  body.globe-rush-active .site-footer {
    margin-top: 24px !important;
    padding: 14px 0 18px;
    row-gap: 9px;
  }
  body.globe-rush-active .footer-links {
    gap: 8px 13px;
  }
}
