/* Keep all main-menu actions inside the game frame and reserve the middle slot
   for the persistent Tasks launcher. Loaded last on purpose. */
.main-menu-map-buttons {
  grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr);
  column-gap: 3px;
}

.main-menu-side {
  min-width: 0;
}

body:has(.main-menu-page) .cf-newcomer-launcher {
  right: auto;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  width: 54px;
  height: 54px;
  border-radius: 17px;
  transform: translateX(-50%) translateZ(0);
}

body:has(.main-menu-page) .cf-newcomer-launcher-icon {
  font-size: 25px;
}

body:has(.main-menu-page) .cf-newcomer-launcher b {
  right: -5px;
  bottom: -4px;
  min-width: 33px;
}

@media (max-width: 430px) {
  .main-menu-map-buttons {
    grid-template-columns: minmax(0, 1fr) 58px minmax(0, 1fr);
    column-gap: 2px;
    padding-right: 10px;
    padding-left: 10px;
  }

  .main-menu-side {
    gap: clamp(4px, 1.5vw, 7px);
  }

  .map-image-button-large {
    width: clamp(56px, 16.5vw, 71px);
  }

  .map-image-button-small {
    width: clamp(44px, 12.5vw, 54px);
  }

  body:has(.main-menu-page) .cf-newcomer-launcher {
    bottom: max(12px, env(safe-area-inset-bottom));
    width: 50px;
    height: 50px;
    border-radius: 16px;
  }

  body:has(.main-menu-page) .cf-newcomer-launcher-icon {
    font-size: 23px;
  }
}

@media (max-width: 340px) {
  .main-menu-map-buttons {
    grid-template-columns: minmax(0, 1fr) 50px minmax(0, 1fr);
    padding-right: 6px;
    padding-left: 6px;
  }

  .main-menu-side {
    gap: 4px;
  }

  .map-image-button-large {
    width: clamp(52px, 16vw, 56px);
  }

  .map-image-button-small {
    width: clamp(40px, 12vw, 44px);
  }

  body:has(.main-menu-page) .cf-newcomer-launcher {
    width: 46px;
    height: 46px;
  }
}

@media (max-width: 430px) and (max-height: 720px) {
  .main-menu-map-buttons {
    bottom: max(8px, env(safe-area-inset-bottom));
  }

  body:has(.main-menu-page) .cf-newcomer-launcher {
    bottom: max(10px, env(safe-area-inset-bottom));
  }
}
