/* Mobile-only fixes for the current frozen Wanwu Jiongtai production bundle.
   Keep these selectors scoped to the map page's top-level container. */
@media (max-width: 639px) {
  @supports (height: 100dvh) {
    div.relative.h-screen.overflow-hidden.bg-background {
      height: 100dvh;
    }
  }

  /* The header wraps to two rows on a phone, so 78px overlaps its controls. */
  div.relative.h-screen.overflow-hidden.bg-background > button[class*="top-[78px]"][class*="bg-lemon"] {
    top: calc(126px + env(safe-area-inset-top, 0px));
    min-height: 44px;
  }

  /* The map-picking instructions must clear both the wrapped header and shortcut. */
  div.relative.h-screen.overflow-hidden.bg-background > div[class*="top-20"][class*="z-[1003]"] {
    top: calc(180px + env(safe-area-inset-top, 0px));
    width: calc(100% - 24px);
    justify-content: center;
  }

  /* Keep map controls and the panel above devices' bottom gesture area. */
  div.relative.h-screen.overflow-hidden.bg-background > aside[class*="h-[55%]"] {
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  }

  div.relative.h-screen.overflow-hidden.bg-background > button[aria-label="折叠/展开面板"] {
    min-width: 44px;
    min-height: 44px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  div.relative.h-screen.overflow-hidden.bg-background > button[aria-label="折叠/展开面板"][class*="bottom-[calc(55%+20px)]"] {
    bottom: calc(55% + 20px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 359px) {
  div.relative.h-screen.overflow-hidden.bg-background > button[class*="top-[78px]"][class*="bg-lemon"] {
    top: calc(148px + env(safe-area-inset-top, 0px));
  }

  div.relative.h-screen.overflow-hidden.bg-background > div[class*="top-20"][class*="z-[1003]"] {
    top: calc(202px + env(safe-area-inset-top, 0px));
  }
}
