/* The SPA always renders this navigation. It belongs at the bottom of narrow
   screens only; without this base rule it participates in the desktop flex
   layout and creates a false right-side panel. */
.gc-mobile-nav {
  display: none !important;
}

@media (max-width: 768px) {
  .gc-mobile-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: 100%;
    min-width: 0;
    min-height: 64px;
    padding: 6px max(8px, env(safe-area-inset-right))
      max(6px, env(safe-area-inset-bottom))
      max(8px, env(safe-area-inset-left));
    border-top: 1px solid var(--border, #e5e7eb);
    background: color-mix(in srgb, var(--background, #fff) 94%, transparent);
    box-shadow: 0 -10px 28px rgb(15 23 42 / 10%);
    backdrop-filter: blur(18px);
  }

  .gc-mobile-nav button {
    display: flex;
    min-width: 0;
    min-height: 50px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 4px 2px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--muted-foreground, #667085);
    font: 700 10px/1.1 system-ui, sans-serif;
    cursor: pointer;
  }

  .gc-mobile-nav button:hover,
  .gc-mobile-nav button:focus-visible {
    background: color-mix(in srgb, var(--primary, #ff6a00) 10%, transparent);
    color: var(--primary, #ff6a00);
    outline: none;
  }

  .gc-mobile-nav svg {
    width: 19px;
    height: 19px;
    flex: 0 0 auto;
  }

  .gc-mobile-nav span {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #root > div:first-child {
    padding-bottom: max(64px, calc(58px + env(safe-area-inset-bottom)));
  }
}
