html,
body {
  max-width: 100%;
  overflow-x: clip;
}

img,
video,
svg {
  max-width: 100%;
}

.mobile-menu-toggle {
  display: none;
}

@media (max-width: 880px) {
  .nav-inner {
    position: relative;
    height: 64px !important;
    min-height: 64px;
    padding: 10px 0;
    flex-wrap: nowrap;
    gap: 8px !important;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    display: none !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(360px, calc(100vw - 24px));
    gap: 8px !important;
    padding: 12px;
    overflow: visible;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 16px;
    background: rgba(8, 11, 16, .98);
    box-shadow: 0 18px 44px rgba(0, 0, 0, .42);
    backdrop-filter: blur(18px);
  }

  .nav-inner.is-menu-open .nav-links {
    display: grid !important;
  }

  .nav-links > a,
  .nav-links > button {
    display: inline-flex !important;
    width: 100%;
    min-width: 0;
    min-height: 44px !important;
    padding: 5px 8px !important;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: normal;
    line-height: 1.25;
    order: initial !important;
  }

  .mobile-menu-toggle {
    display: inline-flex;
    width: 44px;
    height: 44px;
    margin-left: auto;
    padding: 0;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 12px;
    color: #f5f1e8;
    background: rgba(255, 255, 255, .06);
    cursor: pointer;
  }

  .mobile-menu-toggle::before {
    content: "☰";
    font-size: 22px;
    line-height: 1;
  }

  .nav-inner.is-menu-open .mobile-menu-toggle::before {
    content: "×";
    font-size: 28px;
  }

  .nav-links .nav-cta {
    display: inline-flex !important;
  }

  .top-links {
    display: flex;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .top-links::-webkit-scrollbar {
    display: none;
  }

  .top-links > * {
    flex: 0 0 auto;
    min-height: 44px;
  }

  .language-switcher {
    top: 10px !important;
    right: 66px !important;
  }
}

@media (max-width: 420px) {
  .wrap {
    width: min(100% - 24px, 1160px) !important;
  }

  .brand {
    min-width: 0;
    font-size: 13px !important;
  }

  .brand-mark,
  .mark {
    width: 34px !important;
    height: 34px !important;
  }

  .language-switcher {
    right: 60px !important;
    max-width: calc(100% - 16px);
  }
}

@media (max-width: 320px) {
  .wrap {
    width: min(100% - 16px, 1160px) !important;
  }

  .nav-links > a,
  .nav-links > button {
    padding-inline: 10px !important;
    font-size: 12px !important;
  }

  .nav-links {
    width: calc(100vw - 16px);
  }
}
