/* Load after all page themes so no legacy floating navigation rule wins. */
@media (max-width: 760px) {
  :root {
    --dock-safe-bottom: env(safe-area-inset-bottom, 0px);
    --dock-height: calc(68px + var(--dock-safe-bottom));
  }

  html {
    min-height: 100%;
    background-color: #1b1429;
    overscroll-behavior-y: none;
    scroll-padding-bottom: calc(var(--dock-height) + 16px);
  }

  body { min-height: 100vh; min-height: 100dvh; }

  body.liquid-catalog .bottom-nav,
  body .mobile-nav {
    position: fixed;
    inset: auto 0 0;
    width: 100%;
    max-width: none;
    height: var(--dock-height);
    min-height: var(--dock-height);
    margin: 0;
    transform: none;
    translate: none;
    border-radius: 0;
    border-width: 1px 0 0;
    box-sizing: border-box;
    padding: 5px max(12px, env(safe-area-inset-right, 0px))
      calc(6px + var(--dock-safe-bottom)) max(12px, env(safe-area-inset-left, 0px));
    align-items: flex-start;
    z-index: 50;
    background-color: #1b1429;
    background-image: linear-gradient(110deg, #302340bd, #1b1429 75%);
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
    box-shadow: 0 -1px 0 #d8c3ff12;
    overflow: hidden;
  }

  body.liquid-catalog .bottom-nav button,
  body .mobile-nav button {
    height: 56px;
    flex: 1;
    min-width: 0;
    margin: 0;
    justify-content: center;
  }

  body .mobile-nav { background-color: #10130d; background-image: none; }
  body.liquid-catalog .site-footer { padding-bottom: calc(var(--dock-height) + 24px); }
  body .app-main > footer { padding-bottom: calc(var(--dock-height) + 24px); }
  body.liquid-catalog .preview-toast,
  body .toast { bottom: calc(var(--dock-height) + 12px); }
}
