.topbar .brand {
  min-width: 0;
  flex: 1 1 auto;
}

.topbar .brand > div {
  min-width: 0;
}

.topbar .brand strong {
  line-height: 1.15;
}

.auth-card .brand strong,
.auth-card .brand small {
  line-height: 1.25;
}

@media (max-width: 680px) {
  body.function-menu-mode .topbar {
    min-height: 76px;
    height: auto;
    gap: 9px;
    padding: 8px 12px;
  }

  body.function-menu-mode .topbar .brand {
    min-width: 0;
    gap: 0;
    align-items: center;
  }

  body.function-menu-mode .topbar .brand img {
    display: none;
  }

  body.function-menu-mode .topbar .brand strong {
    display: block !important;
    max-width: none;
    font-size: clamp(.8rem, 3.5vw, .96rem);
    line-height: 1.12;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  body.function-menu-mode .topbar .brand small {
    display: block !important;
    margin-top: 3px;
    color: #c9e4ee;
    font-size: .68rem;
    line-height: 1.15;
    white-space: normal;
  }

  body.function-menu-mode .user-menu {
    flex: 0 0 auto;
    gap: 0;
  }

  body.function-menu-mode .user-menu span,
  body.function-menu-mode #logout {
    display: none !important;
  }

  body.function-menu-mode .install-btn {
    min-height: 38px;
    padding: 7px 10px;
    font-size: .78rem;
    white-space: nowrap;
  }

  body.function-menu-mode .install-btn[hidden] {
    display: none !important;
  }
}

@media (max-width: 420px) {
  body.function-menu-mode .topbar {
    padding-inline: 10px;
    gap: 7px;
  }

  body.function-menu-mode .topbar .brand strong {
    font-size: .76rem;
  }

  body.function-menu-mode .topbar .brand small {
    font-size: .61rem;
  }

  body.function-menu-mode .install-btn {
    padding-inline: 8px;
    font-size: .72rem;
  }
}
